summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2022-12-02 13:21:14 +0100
committerYorhel <git@yorhel.nl>2022-12-02 13:21:17 +0100
commit19e3e2be431f17c48844a14aef7f1df59ea87783 (patch)
tree53e7a69f8832a900334c1ef347fba27bfe4a0d66
parent4bfb246c93d41668ab8cd4221b0d645cfd43dd69 (diff)
API2: Fix loading of LangPref in onlyapi modeHEADmaster
Looks like there's a dependency from AdvSearch -> UList::Lib -> Releases::Lib -> LangPref imports. Probably fixes #37.
-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 {