summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/VNWeb/LangPref.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/VNWeb/LangPref.pm b/lib/VNWeb/LangPref.pm
index 153a406b..40b0d3de 100644
--- a/lib/VNWeb/LangPref.pm
+++ b/lib/VNWeb/LangPref.pm
@@ -8,8 +8,6 @@ use VNWeb::DB;
use VNWeb::Validation;
use Exporter 'import';
-return 1 if $main::ONLYAPI;
-
our @EXPORT = qw/
langpref_parse
langpref_fmt
@@ -139,6 +137,9 @@ sub run_with_defaults {
$r;
}
+
+return 1 if $main::ONLYAPI;
+
TUWF::hook db_connect => sub { $CURRENT_SESSION = $DEFAULT_SESSION };
TUWF::hook before => sub {