mirror of
https://github.com/gnosygnu/xowa.git
synced 2025-06-02 15:34:37 +00:00
Parser: Add Init_once for wiki [#553]
This commit is contained in:
parent
5b2db5badf
commit
a082e3cf5d
@ -212,6 +212,12 @@ public class Xowe_wiki implements Xow_wiki, Gfo_invk, Gfo_evt_itm {
|
||||
}
|
||||
}
|
||||
}
|
||||
private boolean init_once_done = false;
|
||||
public void Init_once() {
|
||||
if (init_once_done) return;
|
||||
init_once_done = true;
|
||||
app.Addon_mgr().Load_by_wiki(this);
|
||||
}
|
||||
private void Init_wiki(Xoue_user user) { // NOTE: (a) one-time initialization for all wikis; (b) not called by tests
|
||||
if (init_in_process) {
|
||||
app.Usr_dlg().Log_many("", "", "wiki.init: circular call canceled: ~{0}", domain_str);
|
||||
@ -254,7 +260,7 @@ public class Xowe_wiki implements Xow_wiki, Gfo_invk, Gfo_evt_itm {
|
||||
init_in_process = false;
|
||||
// app.Api_root().Wikis().Get(domain_bry).Subscribe(this);
|
||||
app.Site_cfg_mgr().Load(this);
|
||||
app.Addon_mgr().Load_by_wiki(this);
|
||||
Init_once();
|
||||
ctg_pagebox_wtr.Init_by_wiki(this);
|
||||
ctg_catpage_mgr.Init_by_wiki(this);
|
||||
|
||||
|
@ -116,10 +116,16 @@ public class Xowv_wiki implements Xow_wiki, Xow_ttl_parser, Gfo_invk {
|
||||
data_mgr__core_mgr.Db__core().Tbl__ns().Select_all(ns_mgr);
|
||||
data_mgr__core_mgr.Db__core().Tbl__site_stats().Select(stats);
|
||||
html__hdump_mgr.Init_by_db(this);
|
||||
app.Addon_mgr().Load_by_wiki(this);
|
||||
Init_once();
|
||||
ctg_pagebox_wtr.Init_by_wiki(this);
|
||||
ctg_catpage_mgr.Init_by_wiki(this);
|
||||
}
|
||||
private boolean init_once_done = false;
|
||||
private void Init_once() {
|
||||
if (init_once_done) return;
|
||||
init_once_done = true;
|
||||
app.Addon_mgr().Load_by_wiki(this);
|
||||
}
|
||||
public void Init_by_wiki__force() {init_needed = true; Init_by_wiki();}
|
||||
public void Init_by_make(Xowd_core_db_props props, gplx.xowa.bldrs.infos.Xob_info_session info_session) {
|
||||
data_mgr__core_mgr = new Xow_db_mgr(fsys_mgr.Root_dir(), this.domain_str);
|
||||
|
Loading…
Reference in New Issue
Block a user