mirror of
https://github.com/gnosygnu/xowa.git
synced 2026-03-02 03:49:30 +00:00
v2.9.3.1
This commit is contained in:
@@ -16,8 +16,9 @@ You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package gplx.xowa.wikis; import gplx.*; import gplx.xowa.*;
|
||||
import gplx.xowa.langs.*; import gplx.xowa.apps.langs.*; import gplx.xowa.xtns.wdatas.*;
|
||||
import gplx.xowa.wikis.domains.*; import gplx.xowa.wikis.domains.crts.*;
|
||||
import gplx.xowa.langs.*; import gplx.xowa.langs.cfgs.*; import gplx.xowa.xtns.wdatas.*;
|
||||
import gplx.xowa.nss.*;
|
||||
import gplx.xowa.wikis.metas.*; import gplx.xowa.wikis.domains.*; import gplx.xowa.wikis.domains.crts.*;
|
||||
import gplx.xowa.wikis.xwikis.cfgs.*;
|
||||
public class Xoae_wiki_mgr implements Xoa_wiki_mgr, GfoInvkAble {
|
||||
private Xoae_app app;
|
||||
@@ -71,7 +72,7 @@ public class Xoae_wiki_mgr implements Xoa_wiki_mgr, GfoInvkAble {
|
||||
for (int i = 0; i < list_len; i++) {
|
||||
Xowe_wiki wiki = (Xowe_wiki)list.Get_at(i);
|
||||
// wiki.Defn_cache().ReduceCache();
|
||||
if (clear_ctx) wiki.Ctx().Clear(); // NOTE: clear_ctx will reset toc and refs
|
||||
if (clear_ctx) wiki.Parser_mgr().Ctx().Clear(); // NOTE: clear_ctx will reset toc and refs
|
||||
wiki.Cache_mgr().Page_cache().Free_mem_all();
|
||||
wiki.Cache_mgr().Tmpl_result_cache().Clear();
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@ You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package gplx.xowa.wikis; import gplx.*; import gplx.xowa.*;
|
||||
import gplx.xowa.nss.*;
|
||||
import gplx.xowa.xtns.wdatas.*;
|
||||
public class Xow_page_tid {
|
||||
public static byte Identify(int wiki_tid, int ns_id, byte[] ttl) {
|
||||
|
||||
72
400_xowa/src/gplx/xowa/wikis/Xowv_repo_mgr.java
Normal file
72
400_xowa/src/gplx/xowa/wikis/Xowv_repo_mgr.java
Normal file
@@ -0,0 +1,72 @@
|
||||
/*
|
||||
XOWA: the XOWA Offline Wiki Application
|
||||
Copyright (C) 2012 gnosygnu@gmail.com
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as
|
||||
published by the Free Software Foundation, either version 3 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package gplx.xowa.wikis; import gplx.*; import gplx.xowa.*;
|
||||
import gplx.xowa.files.repos.*;
|
||||
public class Xowv_repo_mgr implements Xow_repo_mgr {
|
||||
private final List_adp repos = List_adp_.new_();
|
||||
public Xof_repo_pair[] Repos_ary() {return (Xof_repo_pair[])repos.To_ary(Xof_repo_pair.class);}
|
||||
public Xof_repo_pair Repos_get_by_wiki(byte[] wiki) {
|
||||
int len = repos.Count();
|
||||
for (int i = 0; i < len; i++) {
|
||||
Xof_repo_pair pair = (Xof_repo_pair)repos.Get_at(i);
|
||||
if (Bry_.Eq(wiki, pair.Wiki_domain()))
|
||||
return pair;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
public Xof_repo_pair Repos_get_at(int i) {return (Xof_repo_pair)repos.Get_at(i);}
|
||||
private Xof_repo_pair Repos_get_by_id(int id) {
|
||||
int len = repos.Count();
|
||||
for (int i = 0; i < len; i++) {
|
||||
Xof_repo_pair pair = (Xof_repo_pair)repos.Get_at(i);
|
||||
if (pair.Repo_idx() == id) return pair;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
public Xof_repo_itm Get_trg_by_id_or_null(int id, byte[] lnki_ttl, byte[] page_url) {
|
||||
Xof_repo_pair pair = Repos_get_by_id(id);
|
||||
if (pair == null) {
|
||||
Xoa_app_.Usr_dlg().Warn_many("", "", "repo_mgr.invalid_repo: repo=~{0} lnki_ttl=~{1} page_url=~{2}", id, lnki_ttl, page_url);
|
||||
return null;
|
||||
}
|
||||
else
|
||||
return pair.Trg();
|
||||
}
|
||||
public Xof_repo_itm Get_src_by_id_or_null(int id, byte[] lnki_ttl, byte[] page_url) {
|
||||
Xof_repo_pair pair = Repos_get_by_id(id);
|
||||
if (pair == null) {
|
||||
Xoa_app_.Usr_dlg().Warn_many("", "", "repo_mgr.invalid_repo: repo=~{0} lnki_ttl=~{1} page_url=~{2}", id, lnki_ttl, page_url);
|
||||
return null;
|
||||
}
|
||||
else
|
||||
return pair.Src();
|
||||
}
|
||||
public Xof_repo_pair Add_repo(Xoa_app app, Io_url wiki_root, byte[] src_repo_key, byte[] trg_repo_key) {
|
||||
Xof_repo_itm src_repo = Add(app, wiki_root, src_repo_key), trg_repo = Add(app, wiki_root, trg_repo_key);
|
||||
byte[] src_wiki_key = src_repo.Wiki_domain();//, trg_wiki_key = trg_repo.Wiki_key();
|
||||
// if (!Bry_.Eq(src_wiki_key, trg_wiki_key) && !Bry_.Eq(src_wiki_key, Xow_domain_type_.Bry__home)) throw Err_mgr._.fmt_(GRP_KEY, "add_repo", "wiki keys do not match: ~{0} ~{1}", String_.new_u8(src_wiki_key), String_.new_u8(trg_wiki_key));
|
||||
Xof_repo_pair pair = new Xof_repo_pair((byte)repos.Count(), src_wiki_key, src_repo, trg_repo);
|
||||
repos.Add(pair);
|
||||
return pair;
|
||||
}
|
||||
private Xof_repo_itm Add(Xoa_app app, Io_url wiki_root, byte[] wiki_domain) {
|
||||
Xof_repo_itm itm = new Xof_repo_itm(wiki_domain, app.Fsys_mgr(), null, wiki_domain);
|
||||
itm.Root_str_(wiki_root.Raw());
|
||||
return itm;
|
||||
}
|
||||
}
|
||||
109
400_xowa/src/gplx/xowa/wikis/Xowv_wiki.java
Normal file
109
400_xowa/src/gplx/xowa/wikis/Xowv_wiki.java
Normal file
@@ -0,0 +1,109 @@
|
||||
/*
|
||||
XOWA: the XOWA Offline Wiki Application
|
||||
Copyright (C) 2012 gnosygnu@gmail.com
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as
|
||||
published by the Free Software Foundation, either version 3 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package gplx.xowa.wikis; import gplx.*; import gplx.xowa.*;
|
||||
import gplx.core.primitives.*; import gplx.core.net.*;
|
||||
import gplx.dbs.*;
|
||||
import gplx.xowa.apps.*;
|
||||
import gplx.xowa.gui.*;
|
||||
import gplx.xowa.langs.*; import gplx.xowa.langs.cases.*;
|
||||
import gplx.xowa.files.*; import gplx.xowa.files.origs.*; import gplx.xowa.files.fsdb.*; import gplx.xowa.files.bins.*;
|
||||
import gplx.xowa.wikis.domains.*; import gplx.xowa.wikis.metas.*; import gplx.xowa.wikis.data.*; import gplx.xowa.files.repos.*; import gplx.xowa.wikis.data.tbls.*; import gplx.xowa.wikis.xwikis.*; import gplx.xowa.wikis.ttls.*; import gplx.xowa.wikis.specials.*;
|
||||
import gplx.xowa.html.*; import gplx.xowa.html.wtrs.*; import gplx.xowa.html.hdumps.*; import gplx.xowa.html.hzips.*; import gplx.xowa.html.css.*; import gplx.xowa.html.bridges.dbuis.tbls.*;
|
||||
import gplx.xowa.nss.*;
|
||||
import gplx.xowa.parsers.*;
|
||||
import gplx.xowa.urls.*;
|
||||
import gplx.fsdb.*; import gplx.fsdb.meta.*;
|
||||
public class Xowv_wiki implements Xow_wiki, Xow_ttl_parser {
|
||||
private final Xof_fsdb_mgr__sql fsdb_mgr; private Fsdb_db_mgr db_core_mgr;
|
||||
private boolean init_needed = true;
|
||||
public Xowv_wiki(Xoav_app app, byte[] domain_bry, Io_url wiki_root_dir) {
|
||||
this.app = app;
|
||||
this.domain_bry = domain_bry; this.domain_str = String_.new_u8(domain_bry);
|
||||
this.domain_itm = Xow_domain_itm_.parse(domain_bry);
|
||||
this.domain_tid = domain_itm.Domain_type_id();
|
||||
this.domain_abrv = Xow_abrv_wm_.To_abrv(Xow_domain_itm_.parse(domain_bry));
|
||||
this.ns_mgr = Xow_ns_mgr_.default_(app.Utl_case_mgr());
|
||||
this.html__hzip_mgr = new Xow_hzip_mgr(app.Usr_dlg(), this);
|
||||
this.html__hdump_rdr = new Xohd_hdump_rdr(app, this);
|
||||
this.xwiki_mgr = new Xow_xwiki_mgr();
|
||||
this.special_mgr = new Xosp_special_mgr(this);
|
||||
this.fsys_mgr = new Xow_fsys_mgr(wiki_root_dir, app.Fsys_mgr().File_dir().GenSubDir(domain_str));
|
||||
this.fsdb_mgr = new Xof_fsdb_mgr__sql();
|
||||
this.url__parser = new Xoa_url_parser(this);
|
||||
}
|
||||
public Xoa_app App() {return app;}
|
||||
public boolean Type_is_edit() {return Bool_.N;}
|
||||
public byte[] Domain_bry() {return domain_bry;} private final byte[] domain_bry;
|
||||
public String Domain_str() {return domain_str;} private final String domain_str;
|
||||
public Xow_domain_itm Domain_itm() {return domain_itm;} private final Xow_domain_itm domain_itm;
|
||||
public int Domain_tid() {return domain_tid;} private final int domain_tid;
|
||||
public byte[] Domain_abrv() {return domain_abrv;} private final byte[] domain_abrv;
|
||||
public Xow_ns_mgr Ns_mgr() {return ns_mgr;} private final Xow_ns_mgr ns_mgr;
|
||||
public Xow_fsys_mgr Fsys_mgr() {return fsys_mgr;} private Xow_fsys_mgr fsys_mgr;
|
||||
public Xowd_db_mgr Data__core_mgr() {return data_mgr__core_mgr;} private Xowd_db_mgr data_mgr__core_mgr;
|
||||
public Xow_repo_mgr File__repo_mgr() {return file_mgr__repo_mgr;} private Xowv_repo_mgr file_mgr__repo_mgr = new Xowv_repo_mgr();
|
||||
public Xof_fsdb_mode File__fsdb_mode() {return file_mgr__fsdb_mode;} private final Xof_fsdb_mode file_mgr__fsdb_mode = Xof_fsdb_mode.new_v2_gui();
|
||||
public Fsdb_db_mgr File__fsdb_core() {return db_core_mgr;}
|
||||
public Xof_orig_mgr File__orig_mgr() {return orig_mgr;} private final Xof_orig_mgr orig_mgr = new Xof_orig_mgr();
|
||||
public Xof_bin_mgr File__bin_mgr() {return fsdb_mgr.Bin_mgr();}
|
||||
public Fsm_mnt_mgr File__mnt_mgr() {return fsdb_mgr.Mnt_mgr();}
|
||||
public boolean Html__hdump_enabled() {return Bool_.Y;}
|
||||
public boolean Html__css_installing() {return html__css_installing;} public void Html__css_installing_(boolean v) {html__css_installing = v;} private boolean html__css_installing;
|
||||
public Xow_hzip_mgr Html__hzip_mgr() {return html__hzip_mgr;} private final Xow_hzip_mgr html__hzip_mgr;
|
||||
public Xohd_hdump_rdr Html__hdump_rdr() {return html__hdump_rdr;} private final Xohd_hdump_rdr html__hdump_rdr;
|
||||
public Xoh_page_wtr_mgr_base Html__page_wtr_mgr() {return html__page_wtr_mgr;} private final Xohv_page_wtr_mgr html__page_wtr_mgr = new Xohv_page_wtr_mgr();
|
||||
public Xow_mw_parser_mgr Mw_parser_mgr() {return mw_parser_mgr;} private final Xow_mw_parser_mgr mw_parser_mgr = new Xow_mw_parser_mgr();
|
||||
public Xow_wiki_props Props() {return props;} private final Xow_wiki_props props = new Xow_wiki_props();
|
||||
public Xol_lang Lang() {throw Err_.new_unimplemented();}
|
||||
public Xoa_url_parser Utl__url_parser() {return url__parser;} private final Xoa_url_parser url__parser;
|
||||
|
||||
public Xosp_special_mgr Special_mgr() {return special_mgr;} private Xosp_special_mgr special_mgr;
|
||||
public Xow_xwiki_mgr Xwiki_mgr() {return xwiki_mgr;} private Xow_xwiki_mgr xwiki_mgr;
|
||||
public Xoav_app Appv() {return app;} private final Xoav_app app;
|
||||
public void Init_by_wiki() {
|
||||
if (!init_needed) return;
|
||||
init_needed = false;
|
||||
if (String_.Eq(domain_str, "xowa")) return; // FIXME: ignore "xowa" for now; WHEN:converting xowa to sqlitedb
|
||||
data_mgr__core_mgr = new Xowd_db_mgr(this, fsys_mgr.Root_dir(), domain_itm);
|
||||
Io_url core_url = gplx.xowa.wikis.Xow_fsys_mgr.Find_core_fil(fsys_mgr.Root_dir(), domain_str);
|
||||
data_mgr__core_mgr.Init_by_load(core_url);
|
||||
app.Html__css_installer().Install(this, Xowd_css_core_mgr.Key_mobile); // must init after data_mgr
|
||||
this.db_core_mgr = Fsdb_db_mgr_.new_detect(this, fsys_mgr.Root_dir(), fsys_mgr.File_dir());
|
||||
if (db_core_mgr != null) // will be null for xowa db
|
||||
fsdb_mgr.Mnt_mgr().Ctor_by_load(db_core_mgr);
|
||||
file_mgr__repo_mgr.Add_repo(app, fsys_mgr.File_dir(), Xow_domain_itm_.Bry__commons, Xow_domain_itm_.Bry__commons);
|
||||
file_mgr__repo_mgr.Add_repo(app, fsys_mgr.File_dir(), domain_bry, domain_bry);
|
||||
orig_mgr.Init_by_wiki(this, file_mgr__fsdb_mode, db_core_mgr.File__orig_tbl_ary(), Xof_url_bldr.new_v2());
|
||||
fsdb_mgr.Init_by_wiki(this);
|
||||
data_mgr__core_mgr.Db__core().Tbl__ns().Select_all(ns_mgr);
|
||||
html__hdump_rdr.Init_by_db(data_mgr__core_mgr);
|
||||
}
|
||||
public void Pages_get(Xog_page rv, Gfo_url url, Xoa_ttl ttl) {
|
||||
if (init_needed) Init_by_wiki();
|
||||
if (ttl.Ns().Id_special())
|
||||
special_mgr.Get_by_ttl(rv, url, ttl);
|
||||
else
|
||||
html__hdump_rdr.Get_by_ttl(rv, ttl);
|
||||
}
|
||||
public Xoa_ttl Ttl_parse(byte[] ttl) {return Xoa_ttl.parse(app.Utl__bfr_mkr(), app.Utl_amp_mgr(), app.Utl_case_mgr(), xwiki_mgr, ns_mgr, app.Utl_msg_log(), ttl, 0, ttl.length);}
|
||||
public Xoa_ttl Ttl_parse(int ns_id, byte[] ttl) {
|
||||
Xow_ns ns = ns_mgr.Ids_get_or_null(ns_id);
|
||||
byte[] raw = Bry_.Add(ns.Name_db_w_colon(), ttl);
|
||||
return Xoa_ttl.parse(app.Utl__bfr_mkr(), app.Utl_amp_mgr(), app.Utl_case_mgr(), xwiki_mgr, ns_mgr, app.Utl_msg_log(), raw, 0, raw.length);
|
||||
}
|
||||
}
|
||||
@@ -16,7 +16,7 @@ You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package gplx.xowa.wikis.caches; import gplx.*; import gplx.xowa.*; import gplx.xowa.wikis.*;
|
||||
import gplx.xowa.apps.langs.*;
|
||||
import gplx.xowa.langs.cfgs.*;
|
||||
public class Xow_cache_mgr {
|
||||
private Xowe_wiki wiki;
|
||||
public Xow_cache_mgr(Xowe_wiki wiki) {
|
||||
|
||||
@@ -16,7 +16,9 @@ You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package gplx.xowa.wikis.caches; import gplx.*; import gplx.xowa.*; import gplx.xowa.wikis.*;
|
||||
import gplx.intl.*;
|
||||
import gplx.core.intls.*; import gplx.core.caches.*;
|
||||
import gplx.xowa.langs.*;
|
||||
import gplx.xowa.nss.*;
|
||||
import gplx.xowa.parsers.tmpls.*;
|
||||
public class Xow_defn_cache { // stores compiled Xot_defn
|
||||
private Xol_lang lang; // needed to lowercase names;
|
||||
|
||||
@@ -17,6 +17,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package gplx.xowa.wikis.data; import gplx.*; import gplx.xowa.*; import gplx.xowa.wikis.*;
|
||||
import gplx.lists.*; /*ComparerAble*/ import gplx.xowa.bldrs.cmds.ctgs.*;
|
||||
import gplx.xowa.langs.*; import gplx.xowa.langs.vnts.*;
|
||||
import gplx.xowa.nss.*;
|
||||
import gplx.xowa.gui.views.*;
|
||||
import gplx.xowa.dbs.*; import gplx.xowa.wikis.*; import gplx.xowa.langs.msgs.*;
|
||||
import gplx.xowa.parsers.utils.*;
|
||||
import gplx.xowa.wikis.data.tbls.*;
|
||||
@@ -80,6 +83,52 @@ public class Xow_data_mgr implements GfoInvkAble {
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
public Xoae_page Load_page_by_ttl(Xoa_url url, Xoa_ttl ttl) {return Load_page_by_ttl(url, ttl, wiki.Lang(), wiki.Appe().Gui_mgr().Browser_win().Active_tab(), true);}
|
||||
public Xoae_page Load_page_by_ttl(Xoa_url url, Xoa_ttl ttl, Xog_tab_itm tab) {return Load_page_by_ttl(url, ttl, wiki.Lang(), tab, true);}
|
||||
public Xoae_page Load_page_by_ttl(Xoa_url url, Xoa_ttl ttl, Xol_lang lang, Xog_tab_itm tab, boolean parse_page) {
|
||||
wiki.Init_assert();
|
||||
Xoae_page page = Xoae_page.new_(wiki, ttl); page.Tab_data().Tab_(tab);
|
||||
this.Get_page(page, url, ttl, false, false); // get page from data_mgr
|
||||
if (page.Missing()) { // page doesn't exist
|
||||
boolean vnt_missing = true;
|
||||
Xol_vnt_mgr vnt_mgr = lang.Vnt_mgr();
|
||||
if (vnt_mgr.Enabled()) { // if vnt enabled, then try to load by vnt form; DATE:2015-09-15
|
||||
gplx.xowa.wikis.data.tbls.Xowd_page_itm page_itm = vnt_mgr.Convert_mgr().Convert_ttl(wiki, ttl);
|
||||
if (page_itm.Exists()) {
|
||||
Xoa_ttl vnt_ttl = Xoa_ttl.parse(wiki, ttl.Ns().Id(), page_itm.Ttl_page_db());
|
||||
page = this.Get_page(vnt_ttl, false);
|
||||
vnt_missing = page.Missing();
|
||||
}
|
||||
}
|
||||
if (vnt_missing) {
|
||||
if (ttl.Ns().Id_file()) {
|
||||
Xowe_wiki commons_wiki = wiki.Appe().Wiki_mgr().Get_by_key_or_null(wiki.Commons_wiki_key());
|
||||
if (commons_wiki != null) { // commons exists
|
||||
if (!Bry_.Eq(wiki.Domain_bry(), commons_wiki.Domain_bry())) { // !Bry_.Eq is recursion guard
|
||||
Xoae_page rv = commons_wiki.Data_mgr().Load_page_by_ttl(url, ttl, wiki.Lang(), tab, true);
|
||||
if (rv.Exists()) {
|
||||
rv.Commons_mgr().Source_wiki_(wiki);
|
||||
return rv;
|
||||
}
|
||||
else {
|
||||
page.Missing_(false);
|
||||
page.Commons_mgr().Xowa_mockup_(true);
|
||||
return page;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
return page.Missing_();
|
||||
}
|
||||
}
|
||||
if (page.Missing()) return page; // NOTE: commons can return null page
|
||||
page.Tab_data().Tab_(tab);
|
||||
page.Lang_(lang);
|
||||
if (parse_page)
|
||||
wiki.Parser_mgr().Parse(page, false); // NOTE: do not clear page b/c reused for search
|
||||
return page;
|
||||
}
|
||||
public Xoae_page Redirect(Xoae_page page, byte[] page_bry) {
|
||||
Xoa_ttl trg_ttl = Xoa_ttl.parse(wiki, page_bry);
|
||||
Xoa_url trg_url = Xoa_url.new_(wiki.Domain_bry(), page_bry);
|
||||
|
||||
@@ -17,6 +17,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package gplx.xowa.wikis.data; import gplx.*; import gplx.xowa.*; import gplx.xowa.wikis.*;
|
||||
import org.junit.*; import gplx.xowa.tdbs.*;
|
||||
import gplx.xowa.nss.*;
|
||||
public class Xow_data_mgr_tst {
|
||||
Xow_data_mgr_fxt fxt = new Xow_data_mgr_fxt();
|
||||
@Before public void init() {fxt.Clear(); Tfds.Now_enabled_y_();}
|
||||
|
||||
@@ -92,6 +92,10 @@ public class Xowd_db_mgr {
|
||||
props.Cfg_save(db__core.Tbl__cfg()); // NOTE: must save cfg now, especially zip_tid; latter will be reloaded after import is done;
|
||||
conn.Txn_end();
|
||||
}
|
||||
public void Create_page(Xowd_page_tbl core_tbl, Xowd_text_tbl text_tbl, int page_id, int ns_id, byte[] ttl_wo_ns, boolean redirect, DateAdp modified_on, byte[] text_zip_data, int text_raw_len, int random_int, int text_db_id, int html_db_id) {
|
||||
core_tbl.Insert_cmd_by_batch(page_id, ns_id, ttl_wo_ns, redirect, modified_on, text_raw_len, random_int, text_db_id, html_db_id);
|
||||
text_tbl.Insert_cmd_by_batch(page_id, text_zip_data);
|
||||
}
|
||||
private void Dbs__set_by_tid(Xowd_db_file db) {
|
||||
switch (db.Tid()) {
|
||||
case Xowd_db_file_.Tid_wiki_solo:
|
||||
|
||||
@@ -17,6 +17,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package gplx.xowa.wikis.data.tbls; import gplx.*; import gplx.xowa.*; import gplx.xowa.wikis.*; import gplx.xowa.wikis.data.*;
|
||||
import gplx.core.primitives.*;
|
||||
import gplx.xowa.nss.*;
|
||||
public class Xowd_page_itm {
|
||||
public Xowd_page_itm() {this.Clear();}
|
||||
public int Id() {return id;} public Xowd_page_itm Id_(int v) {id = v; id_val = null; return this;} private int id;
|
||||
|
||||
@@ -16,7 +16,7 @@ You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package gplx.xowa.wikis.data.tbls; import gplx.*; import gplx.xowa.*; import gplx.xowa.wikis.*; import gplx.xowa.wikis.data.*;
|
||||
import org.junit.*; import gplx.xowa.wikis.data.tbls.*;
|
||||
import org.junit.*; import gplx.xowa.wikis.data.tbls.*; import gplx.xowa.nss.*;
|
||||
public class Xowd_page_itm_tst {
|
||||
@Before public void init() {fxt.Init();} private Xowd_page_itm_fxt fxt = new Xowd_page_itm_fxt();
|
||||
@Test public void Ttl_() {
|
||||
|
||||
@@ -18,6 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
package gplx.xowa.wikis.data.tbls; import gplx.*; import gplx.xowa.*; import gplx.xowa.wikis.*; import gplx.xowa.wikis.data.*;
|
||||
import gplx.core.primitives.*; import gplx.core.criterias.*;
|
||||
import gplx.dbs.*; import gplx.xowa.*; import gplx.xowa.dbs.*; import gplx.dbs.qrys.*;
|
||||
import gplx.xowa.nss.*;
|
||||
public class Xowd_page_tbl implements RlsAble {
|
||||
private final String tbl_name = "page";
|
||||
private String fld_id, fld_ns, fld_title, fld_is_redirect, fld_touched, fld_len, fld_random_int, fld_text_db_id, fld_html_db_id, fld_redirect_id;
|
||||
@@ -179,7 +180,7 @@ public class Xowd_page_tbl implements RlsAble {
|
||||
}
|
||||
public void Select_for_search_suggest(Cancelable cancelable, List_adp rslt_list, Xow_ns ns, byte[] key, int max_results, int min_page_len, int browse_len, boolean include_redirects, boolean fetch_prv_item) {
|
||||
String search_bgn = String_.new_u8(key);
|
||||
String search_end = String_.new_u8(gplx.intl.Utf8_.Increment_char_at_last_pos(key));
|
||||
String search_end = String_.new_u8(gplx.core.intls.Utf8_.Increment_char_at_last_pos(key));
|
||||
String sql = String_.Format
|
||||
( "SELECT {0}, {1}, {2}, {3} FROM {4} INDEXED BY {4}__title WHERE {1} = {5} AND {2} BETWEEN '{6}' AND '{7}' ORDER BY {3} DESC LIMIT {8};"
|
||||
, fld_id, fld_ns, fld_title, fld_len
|
||||
|
||||
@@ -18,6 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
package gplx.xowa.wikis.data.tbls; import gplx.*; import gplx.xowa.*; import gplx.xowa.wikis.*; import gplx.xowa.wikis.data.*;
|
||||
import gplx.core.criterias.*;
|
||||
import gplx.dbs.*; import gplx.dbs.utls.*;
|
||||
import gplx.xowa.nss.*;
|
||||
class Xowd_page_tbl__ttl_ns extends Xowd_page_tbl__in_wkr__base {
|
||||
private Xow_ns_mgr ns_mgr; private Ordered_hash hash;
|
||||
@Override protected int Interval() {return 64;} // NOTE: 96+ overflows; PAGE:en.w:Space_Liability_Convention; DATE:2013-10-24
|
||||
|
||||
@@ -17,6 +17,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package gplx.xowa.wikis.data.tbls; import gplx.*; import gplx.xowa.*; import gplx.xowa.wikis.*; import gplx.xowa.wikis.data.*;
|
||||
import gplx.dbs.*; import gplx.dbs.qrys.*;
|
||||
import gplx.xowa.nss.*;
|
||||
public class Xowd_site_ns_tbl {
|
||||
private final String tbl_name; private final Db_meta_fld_list flds = Db_meta_fld_list.new_();
|
||||
private final String fld_id, fld_name, fld_case, fld_count, fld_is_alias;
|
||||
|
||||
@@ -16,7 +16,7 @@ You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package gplx.xowa.wikis.data.tbls; import gplx.*; import gplx.xowa.*; import gplx.xowa.wikis.*; import gplx.xowa.wikis.data.*;
|
||||
import gplx.dbs.*;
|
||||
import gplx.dbs.*; import gplx.xowa.wikis.metas.*;
|
||||
public class Xowd_site_stats_tbl {
|
||||
private final String tbl_name = "site_stats";
|
||||
private final String fld_row_id, fld_good_articles, fld_total_pages, fld_images;
|
||||
|
||||
@@ -17,6 +17,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package gplx.xowa.wikis.data.tbls; import gplx.*; import gplx.xowa.*; import gplx.xowa.wikis.*; import gplx.xowa.wikis.data.*;
|
||||
import org.junit.*; import gplx.dbs.*;
|
||||
import gplx.xowa.nss.*;
|
||||
public class Xowd_wbase_qid_tbl_tst {
|
||||
private final Xowd_wbase_qid_tbl_fxt fxt = new Xowd_wbase_qid_tbl_fxt();
|
||||
@Before public void init() {fxt.Clear();}
|
||||
|
||||
@@ -35,8 +35,8 @@ public class Xow_abrv_xo_ {
|
||||
int src_len = src.length;
|
||||
byte[] domain_bry = src; // default to src; handles unknown abrv like "a.wikia.com";"xowa";others
|
||||
Xow_domain_type type = null;
|
||||
int dot_pos = Bry_finder.Find_fwd(src, Byte_ascii.Dot);
|
||||
if (dot_pos != Bry_finder.Not_found) { // dot found; EX: "en.w"
|
||||
int dot_pos = Bry_find_.Find_fwd(src, Byte_ascii.Dot);
|
||||
if (dot_pos != Bry_find_.Not_found) { // dot found; EX: "en.w"
|
||||
type = Xow_domain_type_.Get_abrv_as_itm(src, dot_pos + 1, src_len);
|
||||
if (type != null) { // type found; EX: ".w"
|
||||
Xol_lang_itm lang = Xol_lang_itm_.Get_by_key(src, 0, dot_pos);
|
||||
|
||||
@@ -27,13 +27,13 @@ public class Xow_domain_itm_ {
|
||||
~www.~{type}.org EX: mediawiki; wikidata;
|
||||
*/
|
||||
int raw_len = raw.length;
|
||||
int dot_0 = Bry_finder.Find_fwd(raw, Byte_ascii.Dot, 0, raw_len);
|
||||
int dot_0 = Bry_find_.Find_fwd(raw, Byte_ascii.Dot, 0, raw_len);
|
||||
if (dot_0 == Bry_.NotFound) { // 0 dots; check for "home"
|
||||
return Bry_.Eq(raw, Xow_domain_type_.Bry__home)
|
||||
? Xow_domain_uid_.To_domain(Xow_domain_uid_.Tid_xowa)
|
||||
: new_other(raw);
|
||||
}
|
||||
int dot_1 = Bry_finder.Find_fwd(raw, Byte_ascii.Dot, dot_0 + 1, raw_len);
|
||||
int dot_1 = Bry_find_.Find_fwd(raw, Byte_ascii.Dot, dot_0 + 1, raw_len);
|
||||
if (dot_1 == Bry_.NotFound) { // 1 dot; check for "wikimediafoundation.org"
|
||||
return Bry_.Match(raw, 0, dot_0, Xow_domain_type_.Bry__wmforg)
|
||||
? Xow_domain_itm.new_(raw, Xow_domain_type_.Int__wmfblog, Xol_lang_itm_.Key__unknown)
|
||||
|
||||
853
400_xowa/src/gplx/xowa/wikis/domains/Xow_domain_regy.java
Normal file
853
400_xowa/src/gplx/xowa/wikis/domains/Xow_domain_regy.java
Normal file
@@ -0,0 +1,853 @@
|
||||
/*
|
||||
XOWA: the XOWA Offline Wiki Application
|
||||
Copyright (C) 2012 gnosygnu@gmail.com
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as
|
||||
published by the Free Software Foundation, either version 3 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package gplx.xowa.wikis.domains; import gplx.*; import gplx.xowa.*; import gplx.xowa.wikis.*;
|
||||
public class Xow_domain_regy {
|
||||
public static String[] All = new String[]
|
||||
{ "commons.wikimedia.org"
|
||||
, "species.wikimedia.org"
|
||||
, "meta.wikimedia.org"
|
||||
, "incubator.wikimedia.org"
|
||||
, "www.wikidata.org"
|
||||
, "www.mediawiki.org"
|
||||
, "wikimediafoundation.org"
|
||||
, "en.wikipedia.org"
|
||||
, "en.wiktionary.org"
|
||||
, "en.wikisource.org"
|
||||
, "en.wikibooks.org"
|
||||
, "en.wikiversity.org"
|
||||
, "en.wikiquote.org"
|
||||
, "en.wikinews.org"
|
||||
, "en.wikivoyage.org"
|
||||
, "de.wikipedia.org"
|
||||
, "de.wiktionary.org"
|
||||
, "de.wikisource.org"
|
||||
, "de.wikibooks.org"
|
||||
, "de.wikiversity.org"
|
||||
, "de.wikiquote.org"
|
||||
, "de.wikinews.org"
|
||||
, "de.wikivoyage.org"
|
||||
, "es.wikipedia.org"
|
||||
, "es.wiktionary.org"
|
||||
, "es.wikisource.org"
|
||||
, "es.wikibooks.org"
|
||||
, "es.wikiversity.org"
|
||||
, "es.wikiquote.org"
|
||||
, "es.wikinews.org"
|
||||
, "es.wikivoyage.org"
|
||||
, "fr.wikipedia.org"
|
||||
, "fr.wiktionary.org"
|
||||
, "fr.wikisource.org"
|
||||
, "fr.wikibooks.org"
|
||||
, "fr.wikiversity.org"
|
||||
, "fr.wikiquote.org"
|
||||
, "fr.wikinews.org"
|
||||
, "fr.wikivoyage.org"
|
||||
, "it.wikipedia.org"
|
||||
, "it.wiktionary.org"
|
||||
, "it.wikisource.org"
|
||||
, "it.wikibooks.org"
|
||||
, "it.wikiversity.org"
|
||||
, "it.wikiquote.org"
|
||||
, "it.wikinews.org"
|
||||
, "it.wikivoyage.org"
|
||||
, "ja.wikipedia.org"
|
||||
, "ja.wiktionary.org"
|
||||
, "ja.wikisource.org"
|
||||
, "ja.wikibooks.org"
|
||||
, "ja.wikiversity.org"
|
||||
, "ja.wikiquote.org"
|
||||
, "ja.wikinews.org"
|
||||
, "nl.wikipedia.org"
|
||||
, "nl.wiktionary.org"
|
||||
, "nl.wikisource.org"
|
||||
, "nl.wikibooks.org"
|
||||
, "nl.wikiquote.org"
|
||||
, "nl.wikinews.org"
|
||||
, "nl.wikivoyage.org"
|
||||
, "nl.wikimedia.org"
|
||||
, "pl.wikipedia.org"
|
||||
, "pl.wiktionary.org"
|
||||
, "pl.wikisource.org"
|
||||
, "pl.wikibooks.org"
|
||||
, "pl.wikiquote.org"
|
||||
, "pl.wikinews.org"
|
||||
, "pl.wikivoyage.org"
|
||||
, "pl.wikimedia.org"
|
||||
, "pt.wikipedia.org"
|
||||
, "pt.wiktionary.org"
|
||||
, "pt.wikisource.org"
|
||||
, "pt.wikibooks.org"
|
||||
, "pt.wikiversity.org"
|
||||
, "pt.wikiquote.org"
|
||||
, "pt.wikinews.org"
|
||||
, "pt.wikivoyage.org"
|
||||
, "ru.wikipedia.org"
|
||||
, "ru.wiktionary.org"
|
||||
, "ru.wikisource.org"
|
||||
, "ru.wikibooks.org"
|
||||
, "ru.wikiversity.org"
|
||||
, "ru.wikiquote.org"
|
||||
, "ru.wikinews.org"
|
||||
, "ru.wikivoyage.org"
|
||||
, "ru.wikimedia.org"
|
||||
, "ar.wikipedia.org"
|
||||
, "ar.wiktionary.org"
|
||||
, "ar.wikisource.org"
|
||||
, "ar.wikibooks.org"
|
||||
, "ar.wikiversity.org"
|
||||
, "ar.wikiquote.org"
|
||||
, "ar.wikinews.org"
|
||||
, "ar.wikimedia.org"
|
||||
, "ca.wikipedia.org"
|
||||
, "ca.wiktionary.org"
|
||||
, "ca.wikisource.org"
|
||||
, "ca.wikibooks.org"
|
||||
, "ca.wikiquote.org"
|
||||
, "ca.wikinews.org"
|
||||
, "ca.wikimedia.org"
|
||||
, "cs.wikipedia.org"
|
||||
, "cs.wiktionary.org"
|
||||
, "cs.wikisource.org"
|
||||
, "cs.wikibooks.org"
|
||||
, "cs.wikiversity.org"
|
||||
, "cs.wikiquote.org"
|
||||
, "cs.wikinews.org"
|
||||
, "da.wikipedia.org"
|
||||
, "da.wiktionary.org"
|
||||
, "da.wikisource.org"
|
||||
, "da.wikibooks.org"
|
||||
, "da.wikiquote.org"
|
||||
, "eo.wikipedia.org"
|
||||
, "eo.wiktionary.org"
|
||||
, "eo.wikisource.org"
|
||||
, "eo.wikibooks.org"
|
||||
, "eo.wikiquote.org"
|
||||
, "eo.wikinews.org"
|
||||
, "fa.wikipedia.org"
|
||||
, "fa.wiktionary.org"
|
||||
, "fa.wikisource.org"
|
||||
, "fa.wikibooks.org"
|
||||
, "fa.wikiquote.org"
|
||||
, "fa.wikinews.org"
|
||||
, "fa.wikivoyage.org"
|
||||
, "fi.wikipedia.org"
|
||||
, "fi.wiktionary.org"
|
||||
, "fi.wikisource.org"
|
||||
, "fi.wikibooks.org"
|
||||
, "fi.wikiversity.org"
|
||||
, "fi.wikiquote.org"
|
||||
, "fi.wikinews.org"
|
||||
, "fi.wikimedia.org"
|
||||
, "hu.wikipedia.org"
|
||||
, "hu.wiktionary.org"
|
||||
, "hu.wikisource.org"
|
||||
, "hu.wikibooks.org"
|
||||
, "hu.wikiquote.org"
|
||||
, "hu.wikinews.org"
|
||||
, "id.wikipedia.org"
|
||||
, "id.wiktionary.org"
|
||||
, "id.wikisource.org"
|
||||
, "id.wikibooks.org"
|
||||
, "id.wikiquote.org"
|
||||
, "kk.wikipedia.org"
|
||||
, "kk.wiktionary.org"
|
||||
, "kk.wikibooks.org"
|
||||
, "kk.wikiquote.org"
|
||||
, "ko.wikipedia.org"
|
||||
, "ko.wiktionary.org"
|
||||
, "ko.wikisource.org"
|
||||
, "ko.wikibooks.org"
|
||||
, "ko.wikiversity.org"
|
||||
, "ko.wikiquote.org"
|
||||
, "ko.wikinews.org"
|
||||
, "lt.wikipedia.org"
|
||||
, "lt.wiktionary.org"
|
||||
, "lt.wikisource.org"
|
||||
, "lt.wikibooks.org"
|
||||
, "lt.wikiquote.org"
|
||||
, "no.wikipedia.org"
|
||||
, "no.wiktionary.org"
|
||||
, "no.wikisource.org"
|
||||
, "no.wikibooks.org"
|
||||
, "no.wikiquote.org"
|
||||
, "no.wikinews.org"
|
||||
, "no.wikimedia.org"
|
||||
, "ro.wikipedia.org"
|
||||
, "ro.wiktionary.org"
|
||||
, "ro.wikisource.org"
|
||||
, "ro.wikibooks.org"
|
||||
, "ro.wikiquote.org"
|
||||
, "ro.wikinews.org"
|
||||
, "ro.wikivoyage.org"
|
||||
, "sk.wikipedia.org"
|
||||
, "sk.wiktionary.org"
|
||||
, "sk.wikisource.org"
|
||||
, "sk.wikibooks.org"
|
||||
, "sk.wikiquote.org"
|
||||
, "sr.wikipedia.org"
|
||||
, "sr.wiktionary.org"
|
||||
, "sr.wikisource.org"
|
||||
, "sr.wikibooks.org"
|
||||
, "sr.wikiquote.org"
|
||||
, "sr.wikinews.org"
|
||||
, "sv.wikipedia.org"
|
||||
, "sv.wiktionary.org"
|
||||
, "sv.wikisource.org"
|
||||
, "sv.wikibooks.org"
|
||||
, "sv.wikiversity.org"
|
||||
, "sv.wikiquote.org"
|
||||
, "sv.wikinews.org"
|
||||
, "sv.wikivoyage.org"
|
||||
, "tr.wikipedia.org"
|
||||
, "tr.wiktionary.org"
|
||||
, "tr.wikisource.org"
|
||||
, "tr.wikibooks.org"
|
||||
, "tr.wikiquote.org"
|
||||
, "tr.wikinews.org"
|
||||
, "tr.wikimedia.org"
|
||||
, "uk.wikipedia.org"
|
||||
, "uk.wiktionary.org"
|
||||
, "uk.wikisource.org"
|
||||
, "uk.wikibooks.org"
|
||||
, "uk.wikiquote.org"
|
||||
, "uk.wikinews.org"
|
||||
, "uk.wikivoyage.org"
|
||||
, "ua.wikimedia.org"
|
||||
, "vi.wikipedia.org"
|
||||
, "vi.wiktionary.org"
|
||||
, "vi.wikisource.org"
|
||||
, "vi.wikibooks.org"
|
||||
, "vi.wikiquote.org"
|
||||
, "vi.wikivoyage.org"
|
||||
, "zh.wikipedia.org"
|
||||
, "zh.wiktionary.org"
|
||||
, "zh.wikisource.org"
|
||||
, "zh.wikibooks.org"
|
||||
, "zh.wikiquote.org"
|
||||
, "zh.wikinews.org"
|
||||
, "zh.wikivoyage.org"
|
||||
, "bg.wikipedia.org"
|
||||
, "bg.wiktionary.org"
|
||||
, "bg.wikisource.org"
|
||||
, "bg.wikibooks.org"
|
||||
, "bg.wikiquote.org"
|
||||
, "bg.wikinews.org"
|
||||
, "el.wikipedia.org"
|
||||
, "el.wiktionary.org"
|
||||
, "el.wikisource.org"
|
||||
, "el.wikibooks.org"
|
||||
, "el.wikiversity.org"
|
||||
, "el.wikiquote.org"
|
||||
, "el.wikinews.org"
|
||||
, "el.wikivoyage.org"
|
||||
, "et.wikipedia.org"
|
||||
, "et.wiktionary.org"
|
||||
, "et.wikisource.org"
|
||||
, "et.wikibooks.org"
|
||||
, "et.wikiquote.org"
|
||||
, "et.wikimedia.org"
|
||||
, "eu.wikipedia.org"
|
||||
, "eu.wiktionary.org"
|
||||
, "eu.wikibooks.org"
|
||||
, "eu.wikiquote.org"
|
||||
, "gl.wikipedia.org"
|
||||
, "gl.wiktionary.org"
|
||||
, "gl.wikisource.org"
|
||||
, "gl.wikibooks.org"
|
||||
, "gl.wikiquote.org"
|
||||
, "he.wikipedia.org"
|
||||
, "he.wiktionary.org"
|
||||
, "he.wikisource.org"
|
||||
, "he.wikibooks.org"
|
||||
, "he.wikiquote.org"
|
||||
, "he.wikinews.org"
|
||||
, "he.wikivoyage.org"
|
||||
, "hr.wikipedia.org"
|
||||
, "hr.wiktionary.org"
|
||||
, "hr.wikisource.org"
|
||||
, "hr.wikibooks.org"
|
||||
, "hr.wikiquote.org"
|
||||
, "ms.wikipedia.org"
|
||||
, "ms.wiktionary.org"
|
||||
, "ms.wikibooks.org"
|
||||
, "nn.wikipedia.org"
|
||||
, "nn.wiktionary.org"
|
||||
, "nn.wikiquote.org"
|
||||
, "sh.wikipedia.org"
|
||||
, "sh.wiktionary.org"
|
||||
, "simple.wikipedia.org"
|
||||
, "simple.wiktionary.org"
|
||||
, "simple.wikibooks.org"
|
||||
, "simple.wikiquote.org"
|
||||
, "sl.wikipedia.org"
|
||||
, "sl.wiktionary.org"
|
||||
, "sl.wikisource.org"
|
||||
, "sl.wikibooks.org"
|
||||
, "sl.wikiversity.org"
|
||||
, "sl.wikiquote.org"
|
||||
, "th.wikipedia.org"
|
||||
, "th.wiktionary.org"
|
||||
, "th.wikisource.org"
|
||||
, "th.wikibooks.org"
|
||||
, "th.wikiquote.org"
|
||||
, "th.wikinews.org"
|
||||
, "vo.wikipedia.org"
|
||||
, "vo.wiktionary.org"
|
||||
, "vo.wikibooks.org"
|
||||
, "vo.wikiquote.org"
|
||||
, "hi.wikipedia.org"
|
||||
, "hi.wiktionary.org"
|
||||
, "hi.wikibooks.org"
|
||||
, "hi.wikiquote.org"
|
||||
, "ia.wikipedia.org"
|
||||
, "ia.wiktionary.org"
|
||||
, "ia.wikibooks.org"
|
||||
, "la.wikipedia.org"
|
||||
, "la.wiktionary.org"
|
||||
, "la.wikisource.org"
|
||||
, "la.wikibooks.org"
|
||||
, "la.wikiquote.org"
|
||||
, "aa.wikipedia.org"
|
||||
, "aa.wiktionary.org"
|
||||
, "aa.wikibooks.org"
|
||||
, "ab.wikipedia.org"
|
||||
, "ab.wiktionary.org"
|
||||
, "ace.wikipedia.org"
|
||||
, "af.wikipedia.org"
|
||||
, "af.wiktionary.org"
|
||||
, "af.wikibooks.org"
|
||||
, "af.wikiquote.org"
|
||||
, "ak.wikipedia.org"
|
||||
, "ak.wiktionary.org"
|
||||
, "ak.wikibooks.org"
|
||||
, "als.wikipedia.org"
|
||||
, "als.wiktionary.org"
|
||||
, "als.wikibooks.org"
|
||||
, "als.wikiquote.org"
|
||||
, "am.wikipedia.org"
|
||||
, "am.wiktionary.org"
|
||||
, "am.wikiquote.org"
|
||||
, "an.wikipedia.org"
|
||||
, "an.wiktionary.org"
|
||||
, "ang.wikipedia.org"
|
||||
, "ang.wiktionary.org"
|
||||
, "ang.wikisource.org"
|
||||
, "ang.wikibooks.org"
|
||||
, "ang.wikiquote.org"
|
||||
, "arc.wikipedia.org"
|
||||
, "arz.wikipedia.org"
|
||||
, "as.wikipedia.org"
|
||||
, "as.wiktionary.org"
|
||||
, "as.wikisource.org"
|
||||
, "as.wikibooks.org"
|
||||
, "ast.wikipedia.org"
|
||||
, "ast.wiktionary.org"
|
||||
, "ast.wikibooks.org"
|
||||
, "ast.wikiquote.org"
|
||||
, "av.wikipedia.org"
|
||||
, "av.wiktionary.org"
|
||||
, "ay.wikipedia.org"
|
||||
, "ay.wiktionary.org"
|
||||
, "ay.wikibooks.org"
|
||||
, "az.wikipedia.org"
|
||||
, "az.wiktionary.org"
|
||||
, "az.wikisource.org"
|
||||
, "az.wikibooks.org"
|
||||
, "az.wikiquote.org"
|
||||
, "ba.wikipedia.org"
|
||||
, "ba.wikibooks.org"
|
||||
, "bar.wikipedia.org"
|
||||
, "bat-smg.wikipedia.org"
|
||||
, "bcl.wikipedia.org"
|
||||
, "be.wikipedia.org"
|
||||
, "be.wiktionary.org"
|
||||
, "be.wikisource.org"
|
||||
, "be.wikibooks.org"
|
||||
, "be.wikiquote.org"
|
||||
, "be.wikimedia.org"
|
||||
, "be-x-old.wikipedia.org"
|
||||
, "bh.wikipedia.org"
|
||||
, "bh.wiktionary.org"
|
||||
, "bi.wikipedia.org"
|
||||
, "bi.wiktionary.org"
|
||||
, "bi.wikibooks.org"
|
||||
, "bjn.wikipedia.org"
|
||||
, "bm.wikipedia.org"
|
||||
, "bm.wiktionary.org"
|
||||
, "bm.wikibooks.org"
|
||||
, "bm.wikiquote.org"
|
||||
, "bn.wikipedia.org"
|
||||
, "bn.wiktionary.org"
|
||||
, "bn.wikisource.org"
|
||||
, "bn.wikibooks.org"
|
||||
, "bo.wikipedia.org"
|
||||
, "bo.wiktionary.org"
|
||||
, "bo.wikibooks.org"
|
||||
, "bpy.wikipedia.org"
|
||||
, "br.wikipedia.org"
|
||||
, "br.wiktionary.org"
|
||||
, "br.wikisource.org"
|
||||
, "br.wikiquote.org"
|
||||
, "br.wikimedia.org"
|
||||
, "bs.wikipedia.org"
|
||||
, "bs.wiktionary.org"
|
||||
, "bs.wikisource.org"
|
||||
, "bs.wikibooks.org"
|
||||
, "bs.wikiquote.org"
|
||||
, "bs.wikinews.org"
|
||||
, "bug.wikipedia.org"
|
||||
, "bxr.wikipedia.org"
|
||||
, "cbk-zam.wikipedia.org"
|
||||
, "cdo.wikipedia.org"
|
||||
, "ce.wikipedia.org"
|
||||
, "ceb.wikipedia.org"
|
||||
, "ch.wikipedia.org"
|
||||
, "ch.wiktionary.org"
|
||||
, "ch.wikibooks.org"
|
||||
, "cho.wikipedia.org"
|
||||
, "chr.wikipedia.org"
|
||||
, "chr.wiktionary.org"
|
||||
, "chy.wikipedia.org"
|
||||
, "ckb.wikipedia.org"
|
||||
, "co.wikipedia.org"
|
||||
, "co.wiktionary.org"
|
||||
, "co.wikibooks.org"
|
||||
, "co.wikiquote.org"
|
||||
, "co.wikimedia.org"
|
||||
, "cr.wikipedia.org"
|
||||
, "cr.wiktionary.org"
|
||||
, "cr.wikiquote.org"
|
||||
, "crh.wikipedia.org"
|
||||
, "csb.wikipedia.org"
|
||||
, "csb.wiktionary.org"
|
||||
, "cu.wikipedia.org"
|
||||
, "cv.wikipedia.org"
|
||||
, "cv.wikibooks.org"
|
||||
, "cy.wikipedia.org"
|
||||
, "cy.wiktionary.org"
|
||||
, "cy.wikisource.org"
|
||||
, "cy.wikibooks.org"
|
||||
, "cy.wikiquote.org"
|
||||
, "diq.wikipedia.org"
|
||||
, "dsb.wikipedia.org"
|
||||
, "dv.wikipedia.org"
|
||||
, "dv.wiktionary.org"
|
||||
, "dz.wikipedia.org"
|
||||
, "dz.wiktionary.org"
|
||||
, "ee.wikipedia.org"
|
||||
, "eml.wikipedia.org"
|
||||
, "ext.wikipedia.org"
|
||||
, "ff.wikipedia.org"
|
||||
, "fiu-vro.wikipedia.org"
|
||||
, "fj.wikipedia.org"
|
||||
, "fj.wiktionary.org"
|
||||
, "fo.wikipedia.org"
|
||||
, "fo.wiktionary.org"
|
||||
, "fo.wikisource.org"
|
||||
, "frp.wikipedia.org"
|
||||
, "frr.wikipedia.org"
|
||||
, "fur.wikipedia.org"
|
||||
, "fy.wikipedia.org"
|
||||
, "fy.wiktionary.org"
|
||||
, "fy.wikibooks.org"
|
||||
, "ga.wikipedia.org"
|
||||
, "ga.wiktionary.org"
|
||||
, "ga.wikibooks.org"
|
||||
, "ga.wikiquote.org"
|
||||
, "gag.wikipedia.org"
|
||||
, "gan.wikipedia.org"
|
||||
, "gd.wikipedia.org"
|
||||
, "gd.wiktionary.org"
|
||||
, "glk.wikipedia.org"
|
||||
, "gn.wikipedia.org"
|
||||
, "gn.wiktionary.org"
|
||||
, "gn.wikibooks.org"
|
||||
, "got.wikipedia.org"
|
||||
, "got.wikibooks.org"
|
||||
, "gu.wikipedia.org"
|
||||
, "gu.wiktionary.org"
|
||||
, "gu.wikisource.org"
|
||||
, "gu.wikibooks.org"
|
||||
, "gu.wikiquote.org"
|
||||
, "gv.wikipedia.org"
|
||||
, "gv.wiktionary.org"
|
||||
, "ha.wikipedia.org"
|
||||
, "ha.wiktionary.org"
|
||||
, "hak.wikipedia.org"
|
||||
, "haw.wikipedia.org"
|
||||
, "hif.wikipedia.org"
|
||||
, "ho.wikipedia.org"
|
||||
, "hsb.wikipedia.org"
|
||||
, "hsb.wiktionary.org"
|
||||
, "ht.wikipedia.org"
|
||||
, "ht.wikisource.org"
|
||||
, "hy.wikipedia.org"
|
||||
, "hy.wiktionary.org"
|
||||
, "hy.wikisource.org"
|
||||
, "hy.wikibooks.org"
|
||||
, "hy.wikiquote.org"
|
||||
, "hz.wikipedia.org"
|
||||
, "ie.wikipedia.org"
|
||||
, "ie.wiktionary.org"
|
||||
, "ie.wikibooks.org"
|
||||
, "ig.wikipedia.org"
|
||||
, "ii.wikipedia.org"
|
||||
, "ik.wikipedia.org"
|
||||
, "ik.wiktionary.org"
|
||||
, "ilo.wikipedia.org"
|
||||
, "io.wikipedia.org"
|
||||
, "io.wiktionary.org"
|
||||
, "is.wikipedia.org"
|
||||
, "is.wiktionary.org"
|
||||
, "is.wikisource.org"
|
||||
, "is.wikibooks.org"
|
||||
, "is.wikiquote.org"
|
||||
, "iu.wikipedia.org"
|
||||
, "iu.wiktionary.org"
|
||||
, "jbo.wikipedia.org"
|
||||
, "jbo.wiktionary.org"
|
||||
, "jv.wikipedia.org"
|
||||
, "jv.wiktionary.org"
|
||||
, "ka.wikipedia.org"
|
||||
, "ka.wiktionary.org"
|
||||
, "ka.wikibooks.org"
|
||||
, "ka.wikiquote.org"
|
||||
, "kaa.wikipedia.org"
|
||||
, "kab.wikipedia.org"
|
||||
, "kbd.wikipedia.org"
|
||||
, "kg.wikipedia.org"
|
||||
, "ki.wikipedia.org"
|
||||
, "kj.wikipedia.org"
|
||||
, "kl.wikipedia.org"
|
||||
, "kl.wiktionary.org"
|
||||
, "km.wikipedia.org"
|
||||
, "km.wiktionary.org"
|
||||
, "km.wikibooks.org"
|
||||
, "kn.wikipedia.org"
|
||||
, "kn.wiktionary.org"
|
||||
, "kn.wikisource.org"
|
||||
, "kn.wikibooks.org"
|
||||
, "kn.wikiquote.org"
|
||||
, "koi.wikipedia.org"
|
||||
, "kr.wikipedia.org"
|
||||
, "kr.wikiquote.org"
|
||||
, "krc.wikipedia.org"
|
||||
, "ks.wikipedia.org"
|
||||
, "ks.wiktionary.org"
|
||||
, "ks.wikibooks.org"
|
||||
, "ks.wikiquote.org"
|
||||
, "ksh.wikipedia.org"
|
||||
, "ku.wikipedia.org"
|
||||
, "ku.wiktionary.org"
|
||||
, "ku.wikibooks.org"
|
||||
, "ku.wikiquote.org"
|
||||
, "kv.wikipedia.org"
|
||||
, "kw.wikipedia.org"
|
||||
, "kw.wiktionary.org"
|
||||
, "kw.wikiquote.org"
|
||||
, "ky.wikipedia.org"
|
||||
, "ky.wiktionary.org"
|
||||
, "ky.wikibooks.org"
|
||||
, "ky.wikiquote.org"
|
||||
, "lad.wikipedia.org"
|
||||
, "lb.wikipedia.org"
|
||||
, "lb.wiktionary.org"
|
||||
, "lb.wikibooks.org"
|
||||
, "lb.wikiquote.org"
|
||||
, "lbe.wikipedia.org"
|
||||
, "lez.wikipedia.org"
|
||||
, "lg.wikipedia.org"
|
||||
, "li.wikipedia.org"
|
||||
, "li.wiktionary.org"
|
||||
, "li.wikisource.org"
|
||||
, "li.wikibooks.org"
|
||||
, "li.wikiquote.org"
|
||||
, "lij.wikipedia.org"
|
||||
, "lmo.wikipedia.org"
|
||||
, "ln.wikipedia.org"
|
||||
, "ln.wiktionary.org"
|
||||
, "ln.wikibooks.org"
|
||||
, "lo.wikipedia.org"
|
||||
, "lo.wiktionary.org"
|
||||
, "ltg.wikipedia.org"
|
||||
, "lv.wikipedia.org"
|
||||
, "lv.wiktionary.org"
|
||||
, "lv.wikibooks.org"
|
||||
, "mai.wikipedia.org"
|
||||
, "map-bms.wikipedia.org"
|
||||
, "mdf.wikipedia.org"
|
||||
, "mg.wikipedia.org"
|
||||
, "mg.wiktionary.org"
|
||||
, "mg.wikibooks.org"
|
||||
, "mh.wikipedia.org"
|
||||
, "mh.wiktionary.org"
|
||||
, "mhr.wikipedia.org"
|
||||
, "mi.wikipedia.org"
|
||||
, "mi.wiktionary.org"
|
||||
, "mi.wikibooks.org"
|
||||
, "min.wikipedia.org"
|
||||
, "mk.wikipedia.org"
|
||||
, "mk.wiktionary.org"
|
||||
, "mk.wikisource.org"
|
||||
, "mk.wikibooks.org"
|
||||
, "mk.wikimedia.org"
|
||||
, "ml.wikipedia.org"
|
||||
, "ml.wiktionary.org"
|
||||
, "ml.wikisource.org"
|
||||
, "ml.wikibooks.org"
|
||||
, "ml.wikiquote.org"
|
||||
, "mn.wikipedia.org"
|
||||
, "mn.wiktionary.org"
|
||||
, "mn.wikibooks.org"
|
||||
, "mo.wikipedia.org"
|
||||
, "mo.wiktionary.org"
|
||||
, "mr.wikipedia.org"
|
||||
, "mr.wiktionary.org"
|
||||
, "mr.wikisource.org"
|
||||
, "mr.wikibooks.org"
|
||||
, "mr.wikiquote.org"
|
||||
, "mrj.wikipedia.org"
|
||||
, "mt.wikipedia.org"
|
||||
, "mt.wiktionary.org"
|
||||
, "mus.wikipedia.org"
|
||||
, "mwl.wikipedia.org"
|
||||
, "my.wikipedia.org"
|
||||
, "my.wiktionary.org"
|
||||
, "my.wikibooks.org"
|
||||
, "myv.wikipedia.org"
|
||||
, "mzn.wikipedia.org"
|
||||
, "na.wikipedia.org"
|
||||
, "na.wiktionary.org"
|
||||
, "na.wikibooks.org"
|
||||
, "na.wikiquote.org"
|
||||
, "nah.wikipedia.org"
|
||||
, "nah.wiktionary.org"
|
||||
, "nah.wikibooks.org"
|
||||
, "nap.wikipedia.org"
|
||||
, "nds.wikipedia.org"
|
||||
, "nds.wiktionary.org"
|
||||
, "nds.wikibooks.org"
|
||||
, "nds.wikiquote.org"
|
||||
, "nds-nl.wikipedia.org"
|
||||
, "ne.wikipedia.org"
|
||||
, "ne.wiktionary.org"
|
||||
, "ne.wikibooks.org"
|
||||
, "new.wikipedia.org"
|
||||
, "ng.wikipedia.org"
|
||||
, "nov.wikipedia.org"
|
||||
, "nrm.wikipedia.org"
|
||||
, "nso.wikipedia.org"
|
||||
, "nv.wikipedia.org"
|
||||
, "ny.wikipedia.org"
|
||||
, "oc.wikipedia.org"
|
||||
, "oc.wiktionary.org"
|
||||
, "oc.wikibooks.org"
|
||||
, "om.wikipedia.org"
|
||||
, "om.wiktionary.org"
|
||||
, "or.wikipedia.org"
|
||||
, "or.wiktionary.org"
|
||||
, "or.wikisource.org"
|
||||
, "os.wikipedia.org"
|
||||
, "pa.wikipedia.org"
|
||||
, "pa.wiktionary.org"
|
||||
, "pa.wikibooks.org"
|
||||
, "pag.wikipedia.org"
|
||||
, "pam.wikipedia.org"
|
||||
, "pap.wikipedia.org"
|
||||
, "pcd.wikipedia.org"
|
||||
, "pdc.wikipedia.org"
|
||||
, "pfl.wikipedia.org"
|
||||
, "pi.wikipedia.org"
|
||||
, "pi.wiktionary.org"
|
||||
, "pih.wikipedia.org"
|
||||
, "pms.wikipedia.org"
|
||||
, "pnb.wikipedia.org"
|
||||
, "pnb.wiktionary.org"
|
||||
, "pnt.wikipedia.org"
|
||||
, "ps.wikipedia.org"
|
||||
, "ps.wiktionary.org"
|
||||
, "ps.wikibooks.org"
|
||||
, "qu.wikipedia.org"
|
||||
, "qu.wiktionary.org"
|
||||
, "qu.wikibooks.org"
|
||||
, "qu.wikiquote.org"
|
||||
, "rm.wikipedia.org"
|
||||
, "rm.wiktionary.org"
|
||||
, "rm.wikibooks.org"
|
||||
, "rmy.wikipedia.org"
|
||||
, "rn.wikipedia.org"
|
||||
, "rn.wiktionary.org"
|
||||
, "roa-rup.wikipedia.org"
|
||||
, "roa-rup.wiktionary.org"
|
||||
, "roa-tara.wikipedia.org"
|
||||
, "rue.wikipedia.org"
|
||||
, "rw.wikipedia.org"
|
||||
, "rw.wiktionary.org"
|
||||
, "sa.wikipedia.org"
|
||||
, "sa.wiktionary.org"
|
||||
, "sa.wikisource.org"
|
||||
, "sa.wikibooks.org"
|
||||
, "sa.wikiquote.org"
|
||||
, "sah.wikipedia.org"
|
||||
, "sah.wikisource.org"
|
||||
, "sc.wikipedia.org"
|
||||
, "sc.wiktionary.org"
|
||||
, "scn.wikipedia.org"
|
||||
, "scn.wiktionary.org"
|
||||
, "sco.wikipedia.org"
|
||||
, "sd.wikipedia.org"
|
||||
, "sd.wiktionary.org"
|
||||
, "sd.wikinews.org"
|
||||
, "se.wikipedia.org"
|
||||
, "se.wikibooks.org"
|
||||
, "se.wikimedia.org"
|
||||
, "sg.wikipedia.org"
|
||||
, "sg.wiktionary.org"
|
||||
, "si.wikipedia.org"
|
||||
, "si.wiktionary.org"
|
||||
, "si.wikibooks.org"
|
||||
, "sm.wikipedia.org"
|
||||
, "sm.wiktionary.org"
|
||||
, "sn.wikipedia.org"
|
||||
, "sn.wiktionary.org"
|
||||
, "so.wikipedia.org"
|
||||
, "so.wiktionary.org"
|
||||
, "sq.wikipedia.org"
|
||||
, "sq.wiktionary.org"
|
||||
, "sq.wikibooks.org"
|
||||
, "sq.wikiquote.org"
|
||||
, "sq.wikinews.org"
|
||||
, "srn.wikipedia.org"
|
||||
, "ss.wikipedia.org"
|
||||
, "ss.wiktionary.org"
|
||||
, "st.wikipedia.org"
|
||||
, "st.wiktionary.org"
|
||||
, "stq.wikipedia.org"
|
||||
, "su.wikipedia.org"
|
||||
, "su.wiktionary.org"
|
||||
, "su.wikibooks.org"
|
||||
, "su.wikiquote.org"
|
||||
, "sw.wikipedia.org"
|
||||
, "sw.wiktionary.org"
|
||||
, "sw.wikibooks.org"
|
||||
, "szl.wikipedia.org"
|
||||
, "ta.wikipedia.org"
|
||||
, "ta.wiktionary.org"
|
||||
, "ta.wikisource.org"
|
||||
, "ta.wikibooks.org"
|
||||
, "ta.wikiquote.org"
|
||||
, "ta.wikinews.org"
|
||||
, "te.wikipedia.org"
|
||||
, "te.wiktionary.org"
|
||||
, "te.wikisource.org"
|
||||
, "te.wikibooks.org"
|
||||
, "te.wikiquote.org"
|
||||
, "tet.wikipedia.org"
|
||||
, "tg.wikipedia.org"
|
||||
, "tg.wiktionary.org"
|
||||
, "tg.wikibooks.org"
|
||||
, "ti.wikipedia.org"
|
||||
, "ti.wiktionary.org"
|
||||
, "tk.wikipedia.org"
|
||||
, "tk.wiktionary.org"
|
||||
, "tk.wikibooks.org"
|
||||
, "tk.wikiquote.org"
|
||||
, "tl.wikipedia.org"
|
||||
, "tl.wiktionary.org"
|
||||
, "tl.wikibooks.org"
|
||||
, "tn.wikipedia.org"
|
||||
, "tn.wiktionary.org"
|
||||
, "to.wikipedia.org"
|
||||
, "to.wiktionary.org"
|
||||
, "tpi.wikipedia.org"
|
||||
, "tpi.wiktionary.org"
|
||||
, "ts.wikipedia.org"
|
||||
, "ts.wiktionary.org"
|
||||
, "tt.wikipedia.org"
|
||||
, "tt.wiktionary.org"
|
||||
, "tt.wikibooks.org"
|
||||
, "tt.wikiquote.org"
|
||||
, "tum.wikipedia.org"
|
||||
, "tw.wikipedia.org"
|
||||
, "tw.wiktionary.org"
|
||||
, "ty.wikipedia.org"
|
||||
, "tyv.wikipedia.org"
|
||||
, "udm.wikipedia.org"
|
||||
, "ug.wikipedia.org"
|
||||
, "ug.wiktionary.org"
|
||||
, "ug.wikibooks.org"
|
||||
, "ug.wikiquote.org"
|
||||
, "ur.wikipedia.org"
|
||||
, "ur.wiktionary.org"
|
||||
, "ur.wikibooks.org"
|
||||
, "ur.wikiquote.org"
|
||||
, "uz.wikipedia.org"
|
||||
, "uz.wiktionary.org"
|
||||
, "uz.wikibooks.org"
|
||||
, "uz.wikiquote.org"
|
||||
, "ve.wikipedia.org"
|
||||
, "vec.wikipedia.org"
|
||||
, "vec.wiktionary.org"
|
||||
, "vec.wikisource.org"
|
||||
, "vep.wikipedia.org"
|
||||
, "vls.wikipedia.org"
|
||||
, "wa.wikipedia.org"
|
||||
, "wa.wiktionary.org"
|
||||
, "wa.wikibooks.org"
|
||||
, "war.wikipedia.org"
|
||||
, "wo.wikipedia.org"
|
||||
, "wo.wiktionary.org"
|
||||
, "wo.wikiquote.org"
|
||||
, "wuu.wikipedia.org"
|
||||
, "xal.wikipedia.org"
|
||||
, "xh.wikipedia.org"
|
||||
, "xh.wiktionary.org"
|
||||
, "xh.wikibooks.org"
|
||||
, "xmf.wikipedia.org"
|
||||
, "yi.wikipedia.org"
|
||||
, "yi.wiktionary.org"
|
||||
, "yi.wikisource.org"
|
||||
, "yo.wikipedia.org"
|
||||
, "yo.wiktionary.org"
|
||||
, "yo.wikibooks.org"
|
||||
, "za.wikipedia.org"
|
||||
, "za.wiktionary.org"
|
||||
, "za.wikibooks.org"
|
||||
, "za.wikiquote.org"
|
||||
, "zea.wikipedia.org"
|
||||
, "zh-classical.wikipedia.org"
|
||||
, "zh-min-nan.wikipedia.org"
|
||||
, "zh-min-nan.wiktionary.org"
|
||||
, "zh-min-nan.wikisource.org"
|
||||
, "zh-min-nan.wikibooks.org"
|
||||
, "zh-min-nan.wikiquote.org"
|
||||
, "zh-yue.wikipedia.org"
|
||||
, "zu.wikipedia.org"
|
||||
, "zu.wiktionary.org"
|
||||
, "zu.wikibooks.org"
|
||||
, "gom.wikipedia.org"
|
||||
, "lrc.wikipedia.org"
|
||||
, "azb.wikipedia.org"
|
||||
};
|
||||
//, "als.wikisource.org"
|
||||
//, "als.wikinews.org"
|
||||
//, "nds.wikinews.org"
|
||||
//, "ba.wiktionary.org"
|
||||
//, "tokipona.wikibooks.org"
|
||||
//, "ve.wikimedia.org" // NOTE: moved:DATE:2015-04-06
|
||||
}
|
||||
@@ -28,12 +28,12 @@ class Xow_domain_crt_itm_parser {
|
||||
}
|
||||
public List_adp Parse_as_obj_or_null(byte[] raw, boolean is_ary) {
|
||||
List_adp rv = List_adp_.new_();
|
||||
byte[][] line_ary = Bry_.Split_lines(raw);
|
||||
byte[][] line_ary = Bry_split_.Split_lines(raw);
|
||||
int line_len = line_ary.length;
|
||||
for (int i = 0; i < line_len; ++i) {
|
||||
byte[] line = line_ary[i];
|
||||
if (line.length == 0) continue; // ignore blank lines
|
||||
byte[][] word_ary = Bry_.Split(line, Byte_ascii.Pipe);
|
||||
byte[][] word_ary = Bry_split_.Split(line, Byte_ascii.Pipe);
|
||||
int word_len = word_ary.length;
|
||||
if (word_len != 2) return null; // not A|B; exit now;
|
||||
Xow_domain_crt_itm key_itm = Xow_domain_crt_itm_parser.I.Parse_as_in(word_ary[0]);
|
||||
@@ -56,7 +56,7 @@ class Xow_domain_crt_itm_parser {
|
||||
return in_ary == null ? Xow_domain_crt_itm_.Null : new Xow_domain_crt_itm__in(in_ary);
|
||||
}
|
||||
public Xow_domain_crt_itm[] Parse_as_ary(byte[] raw) {
|
||||
byte[][] terms = Bry_.Split(raw, Byte_ascii.Comma, Bool_.Y);
|
||||
byte[][] terms = Bry_split_.Split(raw, Byte_ascii.Comma, Bool_.Y);
|
||||
int len = terms.length;
|
||||
Xow_domain_crt_itm[] rv_ary = new Xow_domain_crt_itm[len];
|
||||
for (int i = 0; i < len; ++i) {
|
||||
|
||||
31
400_xowa/src/gplx/xowa/wikis/metas/Bfmtr_eval_wiki.java
Normal file
31
400_xowa/src/gplx/xowa/wikis/metas/Bfmtr_eval_wiki.java
Normal file
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
XOWA: the XOWA Offline Wiki Application
|
||||
Copyright (C) 2012 gnosygnu@gmail.com
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as
|
||||
published by the Free Software Foundation, either version 3 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package gplx.xowa.wikis.metas; import gplx.*; import gplx.xowa.*; import gplx.xowa.wikis.*;
|
||||
public class Bfmtr_eval_wiki implements Bry_fmtr_eval_mgr {
|
||||
public Bfmtr_eval_wiki(Xowe_wiki wiki) {this.wiki = wiki;} private Xowe_wiki wiki;
|
||||
public boolean Enabled() {return enabled;} public void Enabled_(boolean v) {enabled = v;} private boolean enabled = true;
|
||||
public byte[] Eval(byte[] cmd) {
|
||||
Object rslt = GfsCore._.Exec_bry(cmd, wiki);
|
||||
return Bry_.new_u8(Object_.Xto_str_strict_or_null_mark(rslt));
|
||||
}
|
||||
public void Eval_mgr_(Bry_fmtr... fmtrs) {
|
||||
int fmtrs_len = fmtrs.length;
|
||||
for (int i = 0; i < fmtrs_len; i++)
|
||||
fmtrs[i].Eval_mgr_(this);
|
||||
}
|
||||
}
|
||||
36
400_xowa/src/gplx/xowa/wikis/metas/Xow_html_util.java
Normal file
36
400_xowa/src/gplx/xowa/wikis/metas/Xow_html_util.java
Normal file
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
XOWA: the XOWA Offline Wiki Application
|
||||
Copyright (C) 2012 gnosygnu@gmail.com
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as
|
||||
published by the Free Software Foundation, either version 3 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package gplx.xowa.wikis.metas; import gplx.*; import gplx.xowa.*; import gplx.xowa.wikis.*;
|
||||
public class Xow_html_util implements GfoInvkAble {
|
||||
public Xow_html_util(Xowe_wiki wiki) {this.wiki = wiki;} private Xowe_wiki wiki;
|
||||
public Object Invk(GfsCtx ctx, int ikey, String k, GfoMsg m) {
|
||||
if (ctx.Match(k, Invk_if_bool)) return If_bool(m.ReadStr("expr"), m.ReadStr("true_val"), m.ReadStr("false_val"));
|
||||
else if (ctx.Match(k, Invk_if_yn)) return If_yn(m.ReadStr("expr"), m.ReadStr("true_val"), m.ReadStr("false_val"));
|
||||
else return GfoInvkAble_.Rv_unhandled;
|
||||
} private static final String Invk_if_bool = "if_bool", Invk_if_yn = "if_yn";
|
||||
String If_bool(String expr, String true_val, String false_val) {
|
||||
Object o = wiki.Appe().Gfs_mgr().Run_str(expr);
|
||||
try {return Bool_.cast(o) ? true_val : false_val;}
|
||||
catch (Exception e) {Err_.Noop(e); return "expr failed: " + expr;}
|
||||
}
|
||||
String If_yn(String expr, String true_val, String false_val) {
|
||||
String o = String_.as_(wiki.Appe().Gfs_mgr().Run_str(expr));
|
||||
try {return Yn.parse(o) ? true_val : false_val;}
|
||||
catch (Exception e) {Err_.Noop(e); return "expr failed: " + expr;}
|
||||
}
|
||||
}
|
||||
58
400_xowa/src/gplx/xowa/wikis/metas/Xow_script_mgr.java
Normal file
58
400_xowa/src/gplx/xowa/wikis/metas/Xow_script_mgr.java
Normal file
@@ -0,0 +1,58 @@
|
||||
/*
|
||||
XOWA: the XOWA Offline Wiki Application
|
||||
Copyright (C) 2012 gnosygnu@gmail.com
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as
|
||||
published by the Free Software Foundation, either version 3 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package gplx.xowa.wikis.metas; import gplx.*; import gplx.xowa.*; import gplx.xowa.wikis.*;
|
||||
import gplx.xowa.wikis.domains.*;
|
||||
public class Xow_script_mgr implements GfoInvkAble {
|
||||
public Object Invk(GfsCtx ctx, int ikey, String k, GfoMsg m) {
|
||||
if (ctx.Match(k, Invk_set)) Set(m.ReadBry("key"), m.ReadBry("wiki_type"), m.ReadBry("script"));
|
||||
else return GfoInvkAble_.Rv_unhandled;
|
||||
return this;
|
||||
} private static final String Invk_set = "set";
|
||||
public void Exec(Xowe_wiki wiki) {
|
||||
int len = hash.Count();
|
||||
Bry_bfr bfr = wiki.Utl__bfr_mkr().Get_k004();
|
||||
for (int i = 0; i < len; i++) {
|
||||
Xow_script_itm itm = (Xow_script_itm)hash.Get_at(i);
|
||||
int wiki_tid = wiki.Domain_tid();
|
||||
if (Int_.In(wiki_tid, itm.Wiki_tids())) // wiki_tid matches itm
|
||||
itm.Fmtr().Bld_bfr_many(bfr, wiki.Domain_bry(), Xow_domain_type_.Get_type_as_bry(wiki_tid), wiki.Lang().Key_bry());
|
||||
}
|
||||
String gfs_script = String_.Replace(bfr.Xto_str_and_clear(), Op_sys.Wnt.Nl_str(), Op_sys.Lnx.Nl_str());
|
||||
wiki.Appe().Gfs_mgr().Run_str(gfs_script);
|
||||
bfr.Mkr_rls();
|
||||
}
|
||||
public void Set(byte[] key, byte[] wiki_types_raw, byte[] script) {
|
||||
byte[][] wiki_tid_names = Bry_split_.Split(wiki_types_raw, Byte_ascii.Tilde);
|
||||
int len = wiki_tid_names.length;
|
||||
int[] wiki_tids = new int[len];
|
||||
for (int i = 0; i < len; i++)
|
||||
wiki_tids[i] = Xow_domain_type_.Get_type_as_tid(wiki_tid_names[i]);
|
||||
|
||||
Xow_script_itm itm = new Xow_script_itm(key, wiki_tids, script);
|
||||
hash.Add_if_dupe_use_nth(itm.Key(), itm);
|
||||
}
|
||||
public Ordered_hash hash = Ordered_hash_.new_bry_();
|
||||
}
|
||||
class Xow_script_itm {
|
||||
public Xow_script_itm(byte[] key, int[] wiki_tids, byte[] script) {
|
||||
this.key = key; this.wiki_tids = wiki_tids; this.fmtr = Bry_fmtr.new_bry_(script, "wiki_key", "wiki_type_name", "wiki_lang");
|
||||
}
|
||||
public byte[] Key() {return key;} private byte[] key;
|
||||
public int[] Wiki_tids() {return wiki_tids;} private int[] wiki_tids;
|
||||
public Bry_fmtr Fmtr() {return fmtr;} Bry_fmtr fmtr;
|
||||
}
|
||||
29
400_xowa/src/gplx/xowa/wikis/metas/Xow_sys_cfg.java
Normal file
29
400_xowa/src/gplx/xowa/wikis/metas/Xow_sys_cfg.java
Normal file
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
XOWA: the XOWA Offline Wiki Application
|
||||
Copyright (C) 2012 gnosygnu@gmail.com
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as
|
||||
published by the Free Software Foundation, either version 3 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package gplx.xowa.wikis.metas; import gplx.*; import gplx.xowa.*; import gplx.xowa.wikis.*;
|
||||
public class Xow_sys_cfg implements GfoInvkAble {
|
||||
public Xow_sys_cfg(Xowe_wiki wiki) {}
|
||||
public boolean Xowa_cmd_enabled() {return xowa_cmd_enabled;} public Xow_sys_cfg Xowa_cmd_enabled_(boolean v) {xowa_cmd_enabled = v; return this;} private boolean xowa_cmd_enabled;
|
||||
public boolean Xowa_proto_enabled() {return xowa_proto_enabled;} public Xow_sys_cfg Xowa_proto_enabled_(boolean v) {xowa_proto_enabled = v; return this;} private boolean xowa_proto_enabled;
|
||||
public Object Invk(GfsCtx ctx, int ikey, String k, GfoMsg m) {
|
||||
if (ctx.Match(k, Invk_xowa_cmd_enabled_)) xowa_cmd_enabled = m.ReadYn("v");
|
||||
else if (ctx.Match(k, Invk_xowa_cmd_enabled_)) xowa_proto_enabled = m.ReadYn("v");
|
||||
else return GfoInvkAble_.Rv_unhandled;
|
||||
return this;
|
||||
} private static final String Invk_xowa_cmd_enabled_ = "xowa_cmd_enabled_";
|
||||
}
|
||||
@@ -15,11 +15,12 @@ GNU Affero General Public License for more details.
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package gplx.xowa.wikis; import gplx.*; import gplx.xowa.*;
|
||||
import gplx.xowa.wikis.data.tbls.*;
|
||||
public class Xow_page_mgr {
|
||||
public void Create(Xowd_page_tbl core_tbl, Xowd_text_tbl text_tbl, int page_id, int ns_id, byte[] ttl_wo_ns, boolean redirect, DateAdp modified_on, byte[] text_zip_data, int text_raw_len, int random_int, int text_db_id, int html_db_id) {
|
||||
core_tbl.Insert_cmd_by_batch(page_id, ns_id, ttl_wo_ns, redirect, modified_on, text_raw_len, random_int, text_db_id, html_db_id);
|
||||
text_tbl.Insert_cmd_by_batch(page_id, text_zip_data);
|
||||
}
|
||||
package gplx.xowa.wikis.metas; import gplx.*; import gplx.xowa.*; import gplx.xowa.wikis.*;
|
||||
public class Xow_user implements GfoInvkAble {
|
||||
public byte[] Name() {return name;} private byte[] name = Bry_.new_a7("anonymous");
|
||||
public Object Invk(GfsCtx ctx, int ikey, String k, GfoMsg m) {
|
||||
if (ctx.Match(k, Invk_name_)) name = m.ReadBry("v");
|
||||
else return GfoInvkAble_.Rv_unhandled;
|
||||
return this;
|
||||
} private static final String Invk_name_ = "name_";
|
||||
}
|
||||
77
400_xowa/src/gplx/xowa/wikis/metas/Xow_wiki_props.java
Normal file
77
400_xowa/src/gplx/xowa/wikis/metas/Xow_wiki_props.java
Normal file
@@ -0,0 +1,77 @@
|
||||
/*
|
||||
XOWA: the XOWA Offline Wiki Application
|
||||
Copyright (C) 2012 gnosygnu@gmail.com
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as
|
||||
published by the Free Software Foundation, either version 3 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package gplx.xowa.wikis.metas; import gplx.*; import gplx.xowa.*; import gplx.xowa.wikis.*;
|
||||
import gplx.xowa.langs.msgs.*;
|
||||
import gplx.xowa.wikis.*; import gplx.xowa.wikis.domains.*;
|
||||
import gplx.xowa.html.hrefs.*;
|
||||
public class Xow_wiki_props implements GfoInvkAble {
|
||||
public byte[] Main_page() {return main_page;} private byte[] main_page = Xoa_page_.Main_page_bry; // HACK: default to Main_Page b/c some code tries to do Xoa_ttl.parse() which will not work with ""; DATE:2014-02-16
|
||||
public Xow_wiki_props Main_page_(byte[] v) {main_page = v; return this;}
|
||||
public void Main_page_update(Xowe_wiki wiki) {
|
||||
siteinfo_mainpage = main_page; // note that main_page came from <siteinfo>; store old value for record's sake
|
||||
main_page = Xow_mainpage_finder.Find_or(wiki, siteinfo_mainpage); // get new main_page from mainpage_finder
|
||||
}
|
||||
public byte Protocol_tid() {return protocol_tid;} private final byte protocol_tid = gplx.core.net.Gfo_protocol_itm.Tid_https; // NOTE: default protocol to https; handles external links like [//a.org]; may need to be changed for wikia or other non-WMF wikis; DATE:2015-07-27
|
||||
|
||||
public byte[] Site_name() {return site_name;} private byte[] site_name = Bry_.Empty;
|
||||
public byte[] ServerName() {return serverName;} public Xow_wiki_props ServerName_(byte[] v) {serverName = v; server = Bry_.Add(bry_http, v); return this;} private byte[] serverName = Bry_.new_a7("localhost");
|
||||
public byte[] Server() {return server;} private byte[] server = Bry_.new_a7("http://localhost"); static final byte[] bry_http = Bry_.new_a7("http://");
|
||||
public byte[] ArticlePath() {return articlePath;} public Xow_wiki_props ArticlePath_(byte[] v) {articlePath = v; return this;} private byte[] articlePath = Xoh_href_.Bry__wiki;
|
||||
public byte[] ScriptPath() {return scriptPath;} public Xow_wiki_props ScriptPath_(byte[] v) {scriptPath = v; return this;} private byte[] scriptPath = Bry_.new_a7("/wiki");
|
||||
public byte[] StylePath() {return stylePath;} public Xow_wiki_props StylePath_(byte[] v) {stylePath = v; return this;} private byte[] stylePath = Bry_.new_a7("/wiki/skins");
|
||||
public byte[] ContentLanguage() {return contentLanguage;} public Xow_wiki_props ContentLanguage_(byte[] v) {contentLanguage = v; return this;} private byte[] contentLanguage = Bry_.Empty;
|
||||
public byte[] DirectionMark() {return directionMark;} public Xow_wiki_props DirectionMark_(byte[] v) {directionMark = v; return this;} private byte[] directionMark = Bry_.Empty;
|
||||
public byte[] Current_version() {return Current_version_const;}
|
||||
public byte[] Bldr_version() {return bldr_version;} public Xow_wiki_props Bldr_version_(byte[] v) {bldr_version = v; return this;} private byte[] bldr_version = Bry_.Empty;
|
||||
public int Css_version() {return css_version;} public Xow_wiki_props Css_version_(int v) {css_version = v; return this;} private int css_version = 1;
|
||||
public byte[] Siteinfo_misc() {return siteinfo_misc;}
|
||||
public byte[] Siteinfo_mainpage() {return siteinfo_mainpage;} private byte[] siteinfo_mainpage = Bry_.Empty;
|
||||
public DateAdp Modified_latest() {return modified_latest;} private DateAdp modified_latest;
|
||||
public Xow_wiki_props SiteName_(int v) {site_name = Bry_.new_a7(String_.UpperFirst(String_.new_a7(Xow_domain_type_.Get_type_as_bry(v)))); return this;}
|
||||
public Xow_wiki_props Siteinfo_misc_(byte[] v) {
|
||||
siteinfo_misc = v;
|
||||
int pipe_0 = Bry_find_.Find_fwd(v, Byte_ascii.Pipe);
|
||||
if (pipe_0 != Bry_.NotFound)
|
||||
site_name = Bry_.Mid(siteinfo_misc, 0, pipe_0);
|
||||
return this;
|
||||
} private byte[] siteinfo_misc = Bry_.Empty;
|
||||
public void Init_by_load(Xoa_app app, gplx.dbs.cfgs.Db_cfg_tbl cfg_tbl) {
|
||||
if (app.Bldr__running()) return; // never load main_page during bldr; note that Init_by_load is called by bldr cmds like css; DATE:2015-07-24
|
||||
this.main_page = cfg_tbl.Select_bry_or(Xow_cfg_consts.Grp__wiki_init, Xow_cfg_consts.Key__init__main_page, null);
|
||||
if (main_page == null) { // main_page not found
|
||||
Xoa_app_.Usr_dlg().Warn_many("", "", "mw_props.load; main_page not found; conn=~{0}", cfg_tbl.Conn().Conn_info().Xto_api());
|
||||
this.main_page = Xoa_page_.Main_page_bry;
|
||||
}
|
||||
}
|
||||
public Object Invk(GfsCtx ctx, int ikey, String k, GfoMsg m) {
|
||||
if (ctx.Match(k, Invk_main_page_)) main_page = m.ReadBry("v");
|
||||
else if (ctx.Match(k, Invk_bldr_version_)) bldr_version = m.ReadBry("v");
|
||||
else if (ctx.Match(k, Invk_siteinfo_misc_)) Siteinfo_misc_(m.ReadBry("v"));
|
||||
else if (ctx.Match(k, Invk_siteinfo_mainpage_)) siteinfo_mainpage = m.ReadBry("v");
|
||||
else if (ctx.Match(k, Invk_css_version_)) css_version = m.ReadInt("v");
|
||||
else if (ctx.Match(k, Invk_modified_latest_)) modified_latest = m.ReadDate("v");
|
||||
else return GfoInvkAble_.Rv_unhandled;
|
||||
return this;
|
||||
}
|
||||
public static final String Invk_main_page_ = "main_page_"
|
||||
, Invk_bldr_version = "bldr_version", Invk_bldr_version_ = "bldr_version_", Invk_siteinfo_misc_ = "siteinfo_misc_", Invk_siteinfo_mainpage_ = "siteinfo_mainpage_"
|
||||
, Invk_css_version_ = "css_version_"
|
||||
, Invk_modified_latest_ = "modified_latest_"
|
||||
;
|
||||
private static final byte[] Current_version_const = Bry_.new_a7("1.21wmf11"); // approximate level of compatibility
|
||||
}
|
||||
45
400_xowa/src/gplx/xowa/wikis/metas/Xow_wiki_stats.java
Normal file
45
400_xowa/src/gplx/xowa/wikis/metas/Xow_wiki_stats.java
Normal file
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
XOWA: the XOWA Offline Wiki Application
|
||||
Copyright (C) 2012 gnosygnu@gmail.com
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as
|
||||
published by the Free Software Foundation, either version 3 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package gplx.xowa.wikis.metas; import gplx.*; import gplx.xowa.*; import gplx.xowa.wikis.*;
|
||||
import gplx.xowa.nss.*;
|
||||
public class Xow_wiki_stats implements GfoInvkAble {
|
||||
public Xow_wiki_stats(Xowe_wiki wiki) {this.wiki = wiki;} private Xowe_wiki wiki;
|
||||
public int NumPages() {return num_pages;} public Xow_wiki_stats NumPages_(int v) {num_pages = v; return this;} private int num_pages; // in entire wiki: 28,433,596
|
||||
public int NumArticles() {return num_articles;} public Xow_wiki_stats NumArticles_(int v) {num_articles = v; return this;} private int num_articles; // in main ns: 4,074,996
|
||||
public int NumFiles() {return num_files;} public Xow_wiki_stats NumFiles_(int v) {num_files = v; return this;} private int num_files;
|
||||
public int NumEdits() {return num_edits;} public Xow_wiki_stats NumEdits_(int v) {num_edits = v; return this;} private int num_edits;
|
||||
public int NumViews() {return num_views;} public Xow_wiki_stats NumViews_(int v) {num_views = v; return this;} private int num_views;
|
||||
public int NumUsers() {return num_users;} public Xow_wiki_stats NumUsers_(int v) {num_users = v; return this;} private int num_users;
|
||||
public int NumUsersActive() {return num_users_active;} public Xow_wiki_stats NumUsersActive_(int v) {num_users_active = v; return this;} private int num_users_active;
|
||||
public int NumAdmins() {return num_admins;} public Xow_wiki_stats NumAdmins_(int v) {num_admins = v; return this;} private int num_admins;
|
||||
public Object Invk(GfsCtx ctx, int ikey, String k, GfoMsg m) {
|
||||
if (ctx.Match(k, Invk_number_of_pages_)) num_pages = m.ReadInt("v");
|
||||
else if (ctx.Match(k, Invk_number_of_articles_)) num_articles = m.ReadInt("v");
|
||||
else if (ctx.Match(k, Invk_number_of_files_)) num_files = m.ReadInt("v");
|
||||
else if (ctx.Match(k, Invk_number_of_articles_in_ns_)) return Number_of_articles_in_ns_(m);
|
||||
else return GfoInvkAble_.Rv_unhandled;
|
||||
return this;
|
||||
} public static final String Invk_number_of_pages_ = "number_of_pages_", Invk_number_of_articles_ = "number_of_articles_", Invk_number_of_files_ = "number_of_files_", Invk_number_of_articles_in_ns_ = "number_of_articles_in_ns_";
|
||||
Object Number_of_articles_in_ns_(GfoMsg m) {
|
||||
int ns_id = m.ReadInt("ns_id");
|
||||
int count = m.ReadInt("count");
|
||||
Xow_ns ns = wiki.Ns_mgr().Ids_get_or_null(ns_id);
|
||||
if (ns != null) ns.Count_(count);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
54
400_xowa/src/gplx/xowa/wikis/specials/Xosp_special_mgr.java
Normal file
54
400_xowa/src/gplx/xowa/wikis/specials/Xosp_special_mgr.java
Normal file
@@ -0,0 +1,54 @@
|
||||
/*
|
||||
XOWA: the XOWA Offline Wiki Application
|
||||
Copyright (C) 2012 gnosygnu@gmail.com
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as
|
||||
published by the Free Software Foundation, either version 3 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package gplx.xowa.wikis.specials; import gplx.*; import gplx.xowa.*; import gplx.xowa.wikis.*;
|
||||
import gplx.core.net.*;
|
||||
import gplx.xowa.langs.*;
|
||||
import gplx.xowa.specials.*; import gplx.xowa.specials.xowa.file_browsers.*;
|
||||
import gplx.xowa.gui.*;
|
||||
public class Xosp_special_mgr {
|
||||
private final Xowv_wiki wiki;
|
||||
private final Hash_adp_bry hash;
|
||||
public Xosp_special_mgr(Xowv_wiki wiki) {
|
||||
this.wiki = wiki;
|
||||
// hash.Add_str_obj(Xows_special_meta_.Key__statistics , page_statistics);
|
||||
this.hash = Hash_adp_bry.cs();
|
||||
}
|
||||
public void Get_by_ttl(Xog_page rv, Gfo_url url, Xoa_ttl ttl) {
|
||||
Xosp_fbrow_rslt rslt = Xosp_fbrow_special.Gen(url.Qargs(), wiki.Appv().Wiki_mgr());
|
||||
rv.Init(wiki, -1, null, ttl);
|
||||
rv.Page_body_(rslt.Html_body());
|
||||
rv.Html_head_xtn_(rslt.Html_head());
|
||||
}
|
||||
public void Get_by_url(Xow_wiki wiki, Xoa_page page, Xoa_url url, Xoa_ttl ttl) {
|
||||
int slash_pos = Bry_find_.Find_fwd(ttl.Page_txt_wo_qargs(), Xoa_ttl.Subpage_spr); // check for slash
|
||||
byte[] special_name = slash_pos == Bry_.NotFound
|
||||
? ttl.Base_txt_wo_qarg() // no slash found; use base_txt; ignore qry args and just get page_names; EX: Search/Earth?fulltext=y; Allpages?from=Earth...
|
||||
: Bry_.Mid(ttl.Page_txt_wo_qargs(), 0, slash_pos); // slash found; use root page; EX: Special:ItemByTitle/enwiki/Earth
|
||||
Object o = hash.Get_by_bry(special_name);
|
||||
if (o == null) {
|
||||
Xol_specials_itm special_itm = wiki.Lang().Specials_mgr().Get_by_alias(special_name);
|
||||
if (special_itm != null)
|
||||
o = hash.Get_by_bry(special_itm.Special());
|
||||
}
|
||||
if (o != null) {
|
||||
// Xows_page special = (Xows_page)o;
|
||||
// page.Revision_data().Modified_on_(DateAdp_.Now());
|
||||
// special.Special_gen(wiki, page, url, ttl);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -16,6 +16,7 @@ You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package gplx.xowa.wikis.ttls; import gplx.*; import gplx.xowa.*; import gplx.xowa.wikis.*;
|
||||
import gplx.core.tests.*;
|
||||
public class Xoa_ttl_chkr implements Tst_chkr {
|
||||
public Class<?> TypeOf() {return Xoa_ttl.class;}
|
||||
public int Chk(Tst_mgr mgr, String path, Object o) {
|
||||
|
||||
@@ -16,7 +16,7 @@ You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package gplx.xowa.wikis.ttls; import gplx.*; import gplx.xowa.*; import gplx.xowa.wikis.*;
|
||||
import org.junit.*;
|
||||
import org.junit.*; import gplx.xowa.nss.*;
|
||||
public class Xow_ttl__basic_tst {
|
||||
@Before public void init() {fxt.Reset();} private Xow_ttl_fxt fxt = new Xow_ttl_fxt();
|
||||
@Test public void Ns() {fxt.Init_ttl("Help:Test") .Expd_ns_id(Xow_ns_.Id_help).Expd_page_txt("Test").Test();}
|
||||
|
||||
@@ -21,13 +21,13 @@ import gplx.xowa.langs.cases.*;
|
||||
public class Xow_ttl__i18n_tst {
|
||||
@Before public void init() {fxt.Reset();} private Xow_ttl_fxt fxt = new Xow_ttl_fxt();
|
||||
@Test public void Bidi() { // PURPOSE: handle bidirectional characters; DATE:2015-07-28; DATE:2015-08-24
|
||||
fxt.Init_ttl("A" + String_.new_u8(Bry_.ints_(0xE2, 0x80, 0x8E)) + "B").Expd_page_txt("AB").Test();
|
||||
fxt.Init_ttl("A" + String_.new_u8(Bry_.ints_(0xE2, 0x80, 0x8F)) + "B").Expd_page_txt("AB").Test();
|
||||
fxt.Init_ttl("A" + String_.new_u8(Bry_.ints_(0xE2, 0x80, 0xAA)) + "B").Expd_page_txt("AB").Test();
|
||||
fxt.Init_ttl("A" + String_.new_u8(Bry_.ints_(0xE2, 0x80, 0xAB)) + "B").Expd_page_txt("AB").Test();
|
||||
fxt.Init_ttl("A" + String_.new_u8(Bry_.ints_(0xE2, 0x80, 0xAC)) + "B").Expd_page_txt("AB").Test();
|
||||
fxt.Init_ttl("A" + String_.new_u8(Bry_.ints_(0xE2, 0x80, 0xAD)) + "B").Expd_page_txt("AB").Test();
|
||||
fxt.Init_ttl("A" + String_.new_u8(Bry_.ints_(0xE2, 0x80, 0xAE)) + "B").Expd_page_txt("AB").Test();
|
||||
fxt.Init_ttl("A" + String_.new_u8(Bry_.new_ints(0xE2, 0x80, 0x8E)) + "B").Expd_page_txt("AB").Test();
|
||||
fxt.Init_ttl("A" + String_.new_u8(Bry_.new_ints(0xE2, 0x80, 0x8F)) + "B").Expd_page_txt("AB").Test();
|
||||
fxt.Init_ttl("A" + String_.new_u8(Bry_.new_ints(0xE2, 0x80, 0xAA)) + "B").Expd_page_txt("AB").Test();
|
||||
fxt.Init_ttl("A" + String_.new_u8(Bry_.new_ints(0xE2, 0x80, 0xAB)) + "B").Expd_page_txt("AB").Test();
|
||||
fxt.Init_ttl("A" + String_.new_u8(Bry_.new_ints(0xE2, 0x80, 0xAC)) + "B").Expd_page_txt("AB").Test();
|
||||
fxt.Init_ttl("A" + String_.new_u8(Bry_.new_ints(0xE2, 0x80, 0xAD)) + "B").Expd_page_txt("AB").Test();
|
||||
fxt.Init_ttl("A" + String_.new_u8(Bry_.new_ints(0xE2, 0x80, 0xAE)) + "B").Expd_page_txt("AB").Test();
|
||||
}
|
||||
@Test public void Multi_byte_char2() { // PURPOSE: multi-byte HTML entity causes array out of index error; EX: w:List_of_Unicode_characters; DATE:2013-12-25
|
||||
fxt.Init_ttl("ⱥ").Expd_full_txt("ⱥ").Test();
|
||||
|
||||
@@ -16,7 +16,7 @@ You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package gplx.xowa.wikis.ttls; import gplx.*; import gplx.xowa.*; import gplx.xowa.wikis.*;
|
||||
import org.junit.*;
|
||||
import org.junit.*; import gplx.xowa.nss.*;
|
||||
public class Xow_ttl__xwik_tst {
|
||||
@Before public void init() {fxt.Reset();} private Xow_ttl_fxt fxt = new Xow_ttl_fxt();
|
||||
@Test public void Known() {fxt.Init_ttl("fr:a") .Expd_xwik_txt("fr").Expd_ns_id(Xow_ns_.Id_main).Expd_page_txt("a").Test();}
|
||||
|
||||
@@ -16,6 +16,7 @@ You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package gplx.xowa.wikis.ttls; import gplx.*; import gplx.xowa.*; import gplx.xowa.wikis.*;
|
||||
import gplx.xowa.nss.*;
|
||||
public interface Xow_ttl_parser {
|
||||
Xoa_ttl Ttl_parse(byte[] ttl);
|
||||
Xoa_ttl Ttl_parse(int ns_id, byte[] ttl);
|
||||
|
||||
@@ -16,7 +16,7 @@ You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package gplx.xowa.wikis.xwikis; import gplx.*; import gplx.xowa.*; import gplx.xowa.wikis.*;
|
||||
import gplx.xowa.apps.langs.*;
|
||||
import gplx.xowa.langs.cfgs.*;
|
||||
public class Xow_lang_itm {
|
||||
private final Xow_lang_grp html_grp; private final Xow_xwiki_itm xwiki; private final Xoac_lang_itm lang;
|
||||
public Xow_lang_itm(Xow_lang_grp html_grp, Xow_xwiki_itm xwiki, Xoac_lang_itm lang) {
|
||||
|
||||
@@ -18,7 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
package gplx.xowa.wikis.xwikis; import gplx.*; import gplx.xowa.*; import gplx.xowa.wikis.*;
|
||||
import gplx.xowa.langs.*; import gplx.xowa.wikis.xwikis.*; import gplx.xowa.apis.xowa.html.*; import gplx.xowa.xtns.wdatas.core.*;
|
||||
import gplx.xowa.html.hrefs.*;
|
||||
import gplx.xowa.apps.langs.*;
|
||||
import gplx.xowa.langs.cfgs.*;
|
||||
public class Xow_lang_mgr {
|
||||
Xow_lang_mgr() {
|
||||
int len = Xol_lang_itm_.Id__max;
|
||||
@@ -79,7 +79,7 @@ public class Xow_lang_mgr {
|
||||
byte[] ttl_bry = ttl.Page_txt_w_anchor();
|
||||
boolean empty_xwiki = false;
|
||||
if (Bry_.Len_eq_0(ttl_bry)) {
|
||||
ttl_bry = wiki.Ctx().Cur_page().Ttl().Page_txt();
|
||||
ttl_bry = wiki.Parser_mgr().Ctx().Cur_page().Ttl().Page_txt();
|
||||
empty_xwiki = true;
|
||||
}
|
||||
itm.Atrs_set(ttl_bry, empty_xwiki, slink.Badges());
|
||||
|
||||
@@ -50,12 +50,12 @@ public class Xow_lang_mgr_fxt {
|
||||
public Xowe_wiki Wiki() {return wiki;} private Xowe_wiki wiki;
|
||||
Xoae_app app;
|
||||
public void tst(String raw, String expd) {
|
||||
Xop_ctx ctx = wiki.Ctx();
|
||||
Xop_ctx ctx = wiki.Parser_mgr().Ctx();
|
||||
ctx.Cur_page().Ttl_(Xoa_ttl.parse(wiki, Bry_.new_a7("test_page")));
|
||||
byte[] raw_bry = Bry_.new_u8(raw);
|
||||
Bry_bfr bfr = Bry_bfr.new_();
|
||||
Xop_root_tkn root = ctx.Tkn_mkr().Root(raw_bry);
|
||||
wiki.Parser().Parse_page_all_clear(root, ctx, ctx.Tkn_mkr(), raw_bry);
|
||||
wiki.Parser_mgr().Main().Parse_page_all_clear(root, ctx, ctx.Tkn_mkr(), raw_bry);
|
||||
wiki.Html_mgr().Html_wtr().Write_all(bfr, ctx, raw_bry, root);
|
||||
|
||||
Bry_bfr html_bfr = Bry_bfr.new_();
|
||||
|
||||
@@ -17,13 +17,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package gplx.xowa.wikis.xwikis; import gplx.*; import gplx.xowa.*; import gplx.xowa.wikis.*;
|
||||
import gplx.core.net.*;
|
||||
import gplx.xowa.apps.gfss.*;
|
||||
import gplx.xowa.langs.*;
|
||||
import gplx.xowa.wikis.domains.*;
|
||||
public class Xow_xwiki_itm_bldr {
|
||||
private final Bry_bfr tmp_bfr = Bry_bfr.new_();
|
||||
private final Gfo_url_parser url_parser = new Gfo_url_parser(); private final Gfo_url url = new Gfo_url();
|
||||
public Xow_xwiki_itm Bld(Xow_domain_itm cur_domain, byte[] key, byte[] mw_url, byte[] domain_name) {
|
||||
byte[] xo_url = gplx.xowa.apps.Xoa_gfs_php_mgr.Xto_gfs(tmp_bfr, mw_url); // EX: "//commons.wikimedia.org/wiki/Category:$1" -> "//commons.wikimedia.org/wiki/Category:~{0}"
|
||||
byte[] xo_url = Xoa_gfs_php_mgr.Xto_gfs(tmp_bfr, mw_url); // EX: "//commons.wikimedia.org/wiki/Category:$1" -> "//commons.wikimedia.org/wiki/Category:~{0}"
|
||||
url_parser.Parse(url, xo_url, 0, xo_url.length);
|
||||
byte[] domain_bry = url.Segs__get_at_1st(); // extract "commons.wikimedia.org"
|
||||
Xow_domain_itm domain_itm = Xow_domain_itm_.parse(domain_bry);
|
||||
|
||||
@@ -17,7 +17,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package gplx.xowa.wikis.xwikis; import gplx.*; import gplx.xowa.*; import gplx.xowa.wikis.*;
|
||||
import gplx.core.net.*;
|
||||
import gplx.xowa.langs.*; import gplx.xowa.apps.langs.*;
|
||||
import gplx.xowa.langs.*; import gplx.xowa.langs.cfgs.*;
|
||||
import gplx.xowa.html.hrefs.*;
|
||||
import gplx.xowa.wikis.domains.*; import gplx.xowa.wikis.xwikis.cfgs.*;
|
||||
public class Xow_xwiki_mgr implements GfoInvkAble {
|
||||
@@ -28,8 +28,10 @@ public class Xow_xwiki_mgr implements GfoInvkAble {
|
||||
public Xow_xwiki_mgr(Xowe_wiki wiki, Gfo_url_parser url_parser) {
|
||||
this.wiki = wiki;
|
||||
srl = new Xow_xwiki_mgr_srl(wiki.Domain_itm(), this);
|
||||
}
|
||||
public Xow_lang_mgr Lang_mgr() {return lang_mgr;} private final Xow_lang_mgr lang_mgr = Xow_lang_mgr.dflt_();
|
||||
this.xwiki_domain_tid = Xwiki_tid(wiki.Domain_tid());
|
||||
}
|
||||
public int Xwiki_domain_tid() {return xwiki_domain_tid;} private int xwiki_domain_tid;
|
||||
public Xow_lang_mgr Lang_mgr() {return lang_mgr;} private final Xow_lang_mgr lang_mgr = Xow_lang_mgr.dflt_();
|
||||
public int Len() {return list.Count();}
|
||||
public void Clear() {hash.Clear(); list.Clear();}
|
||||
public Xow_xwiki_itm Get_at(int i) {return (Xow_xwiki_itm)list.Get_at(i);}
|
||||
@@ -66,7 +68,7 @@ public class Xow_xwiki_mgr implements GfoInvkAble {
|
||||
return (Xow_domain_itm[])rv.To_ary_and_clear(Xow_domain_itm.class);
|
||||
}
|
||||
public void Add_bulk(byte[] raw) {
|
||||
byte[][] rows = Bry_.Split(raw, Byte_ascii.Nl);
|
||||
byte[][] rows = Bry_split_.Split(raw, Byte_ascii.Nl);
|
||||
int rows_len = rows.length;
|
||||
Hash_adp_bry lang_regy = Xol_lang_itm_.Regy();
|
||||
for (int i = 0; i < rows_len; i++) {
|
||||
@@ -76,7 +78,7 @@ public class Xow_xwiki_mgr implements GfoInvkAble {
|
||||
}
|
||||
}
|
||||
public Xow_xwiki_itm Add_bulk_row(Hash_adp_bry lang_regy, byte[] row) {
|
||||
byte[][] flds = Bry_.Split(row, Byte_ascii.Pipe); int flds_len = flds.length;
|
||||
byte[][] flds = Bry_split_.Split(row, Byte_ascii.Pipe); int flds_len = flds.length;
|
||||
byte[] alias = Bry_.Empty, domain_bry = Bry_.Empty;
|
||||
for (int j = 0; j < flds_len; j++) {
|
||||
byte[] fld = flds[j];
|
||||
@@ -115,7 +117,7 @@ public class Xow_xwiki_mgr implements GfoInvkAble {
|
||||
return tmp_bfr.To_str_and_rls();
|
||||
}
|
||||
public void Add_bulk_peers(byte[] raw) {
|
||||
byte[][] keys = Bry_.Split(raw, Byte_ascii.Tilde);
|
||||
byte[][] keys = Bry_split_.Split(raw, Byte_ascii.Tilde);
|
||||
int len = keys.length;
|
||||
Ordered_hash peers = Ordered_hash_.new_();
|
||||
Cfg_nde_root peer_root = wiki.Appe().Wiki_mgr().Groups();
|
||||
@@ -216,4 +218,15 @@ public class Xow_xwiki_mgr implements GfoInvkAble {
|
||||
Invk_add_bulk = "add_bulk", Invk_add_bulk_langs = "add_bulk_langs", Invk_add_bulk_peers = "add_bulk_peers", Invk_add_many = "add_many"
|
||||
, Invk_itms_print = "itms_print", Invk_count = "count", Invk_clear = "clear"
|
||||
;
|
||||
private static int Xwiki_tid(int tid) {
|
||||
switch (tid) {
|
||||
case Xow_domain_type_.Int__commons:
|
||||
case Xow_domain_type_.Int__species:
|
||||
case Xow_domain_type_.Int__incubator:
|
||||
case Xow_domain_type_.Int__mediawiki:
|
||||
case Xow_domain_type_.Int__wmfblog:
|
||||
case Xow_domain_type_.Int__home: return Xow_domain_type_.Int__wikipedia; // set xwiki_tid to wikipedia; allows [[da:Page]] to point to da.wikipedia.org; PAGE:species:Puccinia; DATE:2014-09-14
|
||||
default: return tid;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package gplx.xowa.wikis.xwikis; import gplx.*; import gplx.xowa.*; import gplx.xowa.wikis.*;
|
||||
import gplx.srls.dsvs.*; import gplx.xowa.wikis.domains.*;
|
||||
import gplx.langs.dsvs.*; import gplx.xowa.wikis.domains.*;
|
||||
class Xow_xwiki_mgr_srl extends Dsv_wkr_base {
|
||||
private byte[] key, url_fmt, name;
|
||||
private final Xow_domain_itm cur_domain; private final Xow_xwiki_mgr mgr;
|
||||
|
||||
@@ -16,6 +16,7 @@ You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package gplx.xowa.wikis.xwikis.cfgs; import gplx.*; import gplx.xowa.*; import gplx.xowa.wikis.*; import gplx.xowa.wikis.xwikis.*;
|
||||
import gplx.xowa.langs.cfgs.*;
|
||||
interface Xoac_wiki_obj {}
|
||||
public class Xoac_wiki_grp implements Cfg_nde_obj, Xoac_wiki_obj {
|
||||
public Xoac_wiki_grp(byte[] key) {this.key_bry = key; this.name_bry = key_bry;}
|
||||
|
||||
@@ -16,8 +16,8 @@ You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package gplx.xowa.wikis.xwikis.cfgs; import gplx.*; import gplx.xowa.*; import gplx.xowa.wikis.*; import gplx.xowa.wikis.xwikis.*;
|
||||
import org.junit.*;
|
||||
import gplx.xowa.wikis.*;
|
||||
import org.junit.*; import gplx.core.tests.*;
|
||||
import gplx.xowa.wikis.*; import gplx.xowa.langs.cfgs.*;
|
||||
public class Xoac_wiki_grp_tst {
|
||||
Xoac_wiki_grp_fxt fxt = new Xoac_wiki_grp_fxt();
|
||||
@Before public void init() {fxt.Clear();}
|
||||
|
||||
@@ -16,6 +16,7 @@ You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package gplx.xowa.wikis.xwikis.cfgs; import gplx.*; import gplx.xowa.*; import gplx.xowa.wikis.*; import gplx.xowa.wikis.xwikis.*;
|
||||
import gplx.xowa.langs.cfgs.*;
|
||||
public class Xoac_wiki_itm implements Cfg_nde_obj, Xoac_wiki_obj {
|
||||
public Xoac_wiki_itm(byte[] key) {this.key_bry = key;}
|
||||
public byte[] Key_bry() {return key_bry;} private byte[] key_bry;
|
||||
@@ -30,6 +31,6 @@ public class Xoac_wiki_itm implements Cfg_nde_obj, Xoac_wiki_obj {
|
||||
public void Nde_subs_del(byte[] key) {throw Err_.new_wo_type("leafs cannot delete itms", "key", String_.new_u8(key));}
|
||||
public void Nde_atrs_set(byte[][] ary) {
|
||||
int ary_len = ary.length;
|
||||
if (ary_len > 0) aliases = Bry_.Split(ary[0], Byte_ascii.Semic);
|
||||
if (ary_len > 0) aliases = Bry_split_.Split(ary[0], Byte_ascii.Semic);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user