1
0
mirror of https://github.com/gnosygnu/xowa.git synced 2026-03-02 03:49:30 +00:00

'v3.4.2.1'

This commit is contained in:
gnosygnu
2016-04-11 00:12:19 -04:00
parent b2a06b8125
commit 14471ca656
197 changed files with 1918 additions and 1275 deletions

View File

@@ -0,0 +1,30 @@
/*
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.addons.apps.file_browsers; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.apps.*;
import gplx.xowa.specials.*;
public class Fbrow_addon implements Xoax_addon_itm, Xoax_addon_itm__sp {
public Xows_page[] Pages_ary() {
return new Xows_page[]
{ Fbrow_special_page.Prototype
, Wikis_list_page.Prototype
};
}
public static final byte[] ADDON_KEY = Bry_.new_a7("xowa.apps.file_browsers");
public byte[] Addon__key() {return ADDON_KEY;}
}

View File

@@ -0,0 +1,78 @@
/*
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.addons.apps.file_browsers; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.apps.*;
import gplx.core.ios.*;
import gplx.langs.mustaches.*;
class Fbrow_file_itm implements Mustache_doc_itm {
private final boolean is_dir, is_core_xowa;
private final byte[] owner_dir_enc, path, name, date, size, color;
private final Fbrow_file_itm[] subs;
public Fbrow_file_itm(boolean is_dir, boolean is_core_xowa, int color, byte[] owner_dir, byte[] path, byte[] name, byte[] date, byte[] size, Fbrow_file_itm[] subs) {
this.is_dir = is_dir; this.is_core_xowa = is_core_xowa;
this.color = color % 2 == 0 ? Byte_ascii.Num_0_bry : Byte_ascii.Num_1_bry;
this.owner_dir_enc = gplx.langs.htmls.encoders.Gfo_url_encoder_.Href.Encode(owner_dir);
this.path = path; this.name = name; this.date = date; this.size = size;
this.subs = subs;
}
public boolean Mustache__write(String key, Mustache_bfr bfr) {
if (String_.Eq(key, "path")) bfr.Add_bry(path);
else if (String_.Eq(key, "path_enc")) bfr.Add_bry(gplx.langs.htmls.encoders.Gfo_url_encoder_.Href.Encode(path));
else if (String_.Eq(key, "owner_dir_enc")) bfr.Add_bry(owner_dir_enc);
else if (String_.Eq(key, "name")) bfr.Add_bry(name);
else if (String_.Eq(key, "date")) bfr.Add_bry(date);
else if (String_.Eq(key, "size")) bfr.Add_bry(size);
else if (String_.Eq(key, "color")) bfr.Add_bry(color);
else return false;
return true;
}
public Mustache_doc_itm[] Mustache__subs(String key) {
if (String_.Eq(key, "is_dir")) return Mustache_doc_itm_.Ary__bool(is_dir);
else if (String_.Eq(key, "is_core_xowa")) return Mustache_doc_itm_.Ary__bool(is_core_xowa);
else if (String_.Eq(key, "subs")) return subs;
return Mustache_doc_itm_.Ary__empty;
}
public static final Fbrow_file_itm[] Ary_empty = new Fbrow_file_itm[0];
public static Fbrow_file_itm New(IoItmDir owner_dir) {
List_adp sub_list = List_adp_.new_();
New_subs(owner_dir.Url(), sub_list, owner_dir.SubDirs());
New_subs(owner_dir.Url(), sub_list, owner_dir.SubFils());
Fbrow_file_itm[] subs = (Fbrow_file_itm[])sub_list.To_ary_and_clear(Fbrow_file_itm.class);
return new Fbrow_file_itm(Bool_.Y, Bool_.N, 0, owner_dir.Url().OwnerDir().RawBry(), owner_dir.Url().RawBry(), Bry_.new_u8(owner_dir.Name()), Bry_.Empty, Bry_.Empty, subs);
}
private static void New_subs(Io_url owner_dir, List_adp list, IoItmList subs) {
subs.Sort();
int len = subs.Len();
int list_total = list.Len();
byte[] owner_dir_bry = owner_dir.RawBry();
for (int i = 0; i < len; ++i) {
IoItm_base src = (IoItm_base)subs.Get_at(i);
Fbrow_file_itm trg = null;
if (src.Type_dir()) {
byte[] trg_url = src.Url().RawBry();
trg = new Fbrow_file_itm(Bool_.Y, Bool_.N, list_total + i, owner_dir_bry, trg_url, Bry_.new_u8(src.Url().NameAndExt_noDirSpr()), Bry_.Empty, Bry_.Empty, Ary_empty);
}
else {
IoItmFil src_as_fil = (IoItmFil)src;
String size_str = Io_size_.To_str(src_as_fil.Size(), "#,###");
boolean is_xowa_core = gplx.xowa.wikis.data.Xowd_db_mgr.Maybe_core(owner_dir.NameOnly(), src.Url().NameAndExt());
trg = new Fbrow_file_itm(Bool_.N, is_xowa_core, list_total + i, owner_dir_bry, src.Url().RawBry(), Bry_.new_u8(src.Name()), Bry_.new_u8(src_as_fil.ModifiedTime().XtoStr_fmt("yyyy-MM-dd")), Bry_.new_u8(size_str), Ary_empty);
}
list.Add(trg);
}
}
}

View File

@@ -0,0 +1,51 @@
/*
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.addons.apps.file_browsers; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.apps.*;
import gplx.core.ios.*; import gplx.core.net.*;
import gplx.xowa.specials.*;
import gplx.xowa.wikis.pages.*;
public class Fbrow_special_page implements Xows_page {
public void Special__gen(Xow_wiki wiki, Xoa_page page, Xoa_url url, Xoa_ttl ttl) {
Xopage_html_data html_data = Write_html(wiki.App(), url.Qargs_ary());
html_data.Apply(page);
}
private static Xopage_html_data Write_html(Xoa_app app, Gfo_qarg_itm[] args_ary) {
// scan owner_dir
Xoa_url_arg_mgr arg_mgr = new Xoa_url_arg_mgr(null).Init(args_ary);
String owner_str = arg_mgr.Read_str_or_null("path"); if (owner_str == null) return Xopage_html_data.err_("url has unknown path");
IoItmDir owner_dir = Io_mgr.Instance.QueryDir_args(Io_url_.new_any_(owner_str)).DirInclude_(true).ExecAsDir();
Fbrow_file_itm owner_itm = Fbrow_file_itm.New(owner_dir);
// write body
Io_url addon_dir = app.Fsys_mgr().Bin_addon_dir().GenSubDir_nest("import", "file_browser");
byte[] template_src = Io_mgr.Instance.LoadFilBry(addon_dir.GenSubFil_nest("bin", "file_browser.mustache.html"));
Bry_bfr tmp_bfr = Bry_bfr.new_();
byte[] body = gplx.langs.mustaches.Mustache_wtr_.Write_to_bry(tmp_bfr, template_src, owner_itm);
// write head
Xopage_html_data rv = new Xopage_html_data(Display_ttl, body);
rv.Head_tags().Add(Xopg_tag_itm.New_css(addon_dir.GenSubFil_nest("bin", "file_browser.css")));
return rv;
}
public static final String SPECIAL_KEY = "XowaFileBrowser";
public static final byte[] Display_ttl = Bry_.new_a7("Import XOWA Wikis");
public Xows_special_meta Special__meta() {return new Xows_special_meta(Xows_special_meta_.Src__xowa, SPECIAL_KEY);}
public static final Xows_page Prototype = new Fbrow_special_page();
public Xows_page Special__clone() {return this;}
}

View File

@@ -0,0 +1,46 @@
/*
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.addons.apps.file_browsers; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.apps.*;
import gplx.core.ios.*;
import gplx.langs.mustaches.*;
class Wikis_list_mgr implements Mustache_doc_itm {
private final byte[] import_root;
private final Wikis_list_itm[] subs;
public Wikis_list_mgr(byte[] import_root, Wikis_list_itm[] subs) {this.import_root = import_root; this.subs = subs;}
public boolean Mustache__write(String key, Mustache_bfr bfr) {
if (String_.Eq(key, "import_root")) bfr.Add_bry(import_root);
return false;
}
public Mustache_doc_itm[] Mustache__subs(String key) {
if (String_.Eq(key, "subs")) return subs;
return Mustache_doc_itm_.Ary__empty;
}
}
class Wikis_list_itm implements Mustache_doc_itm {
private final byte[] domain, date;
public Wikis_list_itm(byte[] domain, byte[] date) {
this.domain = domain; this.date = date;
}
public boolean Mustache__write(String key, Mustache_bfr bfr) {
if (String_.Eq(key, "domain")) bfr.Add_bry(domain);
else if (String_.Eq(key, "date")) bfr.Add_bry(date);
else return false;
return true;
}
public Mustache_doc_itm[] Mustache__subs(String key) {return Mustache_doc_itm_.Ary__empty;}
}

View File

@@ -0,0 +1,49 @@
/*
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.addons.apps.file_browsers; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.apps.*;
import gplx.xowa.specials.*; import gplx.core.ios.*; import gplx.core.net.*;
public class Wikis_list_page implements Xows_page {
public void Special__gen(Xow_wiki wiki, Xoa_page page, Xoa_url url, Xoa_ttl ttl) {
Xoa_url_arg_mgr arg_mgr = new Xoa_url_arg_mgr(null).Init(url.Qargs_ary());
Wikis_list_wtr wtr = new Wikis_list_wtr();
byte[] cmd = arg_mgr.Read_bry_or_null("cmd");
if (cmd == null) {
Xopage_html_data html_data = wtr.Write(wiki.App(), url.Qargs_ary(), GfoInvkAble_.Null);
html_data.Apply(page);
}
else {
if (Bry_.Eq(cmd, Bry_.new_a7("add"))) {
byte[] file = arg_mgr.Read_bry_or_null("file");
if (file != null) {
if (wiki.App().Tid_is_edit()) {
wiki.App().User().User_db_mgr().Init_site_mgr();
}
wiki.App().Wiki_mgri().Import_by_url(Io_url_.new_fil_(String_.new_u8(file)));
Xopage_html_data html_data = wtr.Write(wiki.App(), url.Qargs_ary(), GfoInvkAble_.Null);
html_data.Apply(page);
}
}
}
}
public static final String SPECIAL_KEY = "XowaWikis";
public static final byte[] Display_ttl = Bry_.new_a7("XOWA Wikis");
public Xows_special_meta Special__meta() {return new Xows_special_meta(Xows_special_meta_.Src__xowa, SPECIAL_KEY);}
public static final Xows_page Prototype = new Wikis_list_page();
public Xows_page Special__clone() {return this;}
}

View File

@@ -0,0 +1,57 @@
/*
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.addons.apps.file_browsers; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.apps.*;
import gplx.core.net.*;
import gplx.xowa.wikis.xwikis.*;
import gplx.langs.mustaches.*;
import gplx.xowa.users.data.*; import gplx.xowa.wikis.pages.*;
class Wikis_list_wtr {
public Xopage_html_data Write(Xoa_app app, Gfo_qarg_itm[] args, GfoInvkAble select_invkable) {
// scan wikis
List_adp list = List_adp_.new_();
app.User().User_db_mgr().Init_site_mgr();
Xoud_site_row[] site_ary = app.User().User_db_mgr().Site_mgr().Get_all();
int len = site_ary.length;
for (int i = 0; i < len; ++i) {
Xoud_site_row site_itm = site_ary[i];
if (String_.Eq(site_itm.Domain(), gplx.xowa.wikis.domains.Xow_domain_itm_.Str__home)) continue;
list.Add(new Wikis_list_itm(Bry_.new_u8(site_itm.Domain()), Bry_.new_a7("2016-03-05")));
}
Wikis_list_mgr mgr = new Wikis_list_mgr(Get_root_url(), (Wikis_list_itm[])list.To_ary_and_clear(Wikis_list_itm.class));
// write body
Io_url addon_dir = app.Fsys_mgr().Bin_addon_dir().GenSubDir_nest("app", "wiki_list");
byte[] template_src = Io_mgr.Instance.LoadFilBry(addon_dir.GenSubFil_nest("bin", "wiki_list.mustache.html"));
Bry_bfr tmp_bfr = Bry_bfr.new_();
byte[] body = gplx.langs.mustaches.Mustache_wtr_.Write_to_bry(tmp_bfr, template_src, mgr);
// write to html
Xopage_html_data rv = new Xopage_html_data(Wikis_list_page.Display_ttl, body);
rv.Head_tags().Add(Xopg_tag_itm.New_css(addon_dir.GenSubFil_nest("bin", "wiki_list.css")));
return rv;
}
private static byte[] Get_root_url() {
byte tid = gplx.core.envs.Op_sys.Cur().Tid();
byte[] rv = Bry_.new_a7("/");
switch (tid) {
case gplx.core.envs.Op_sys.Tid_wnt : rv = Bry_.new_a7("C:\\"); break;
}
rv = gplx.langs.htmls.encoders.Gfo_url_encoder_.Href.Encode(rv);
return rv;
}
}

View File

@@ -0,0 +1,74 @@
/*
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.addons.apps.file_browsers; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.apps.*;
import gplx.core.primitives.*; import gplx.core.net.*;
class Xoa_url_arg_mgr {
private final Hash_adp_bry hash = Hash_adp_bry.cs();
private final Xoa_url_enum_mgr enm_mgr;
public Xoa_url_arg_mgr(Xoa_url_enum_mgr enm_mgr) {this.enm_mgr = enm_mgr;}
public Xoa_url_arg_mgr Init(Gfo_qarg_itm[] args) {
hash.Clear();
int len = args.length;
for (int i = 0; i < len; ++i) {
Gfo_qarg_itm arg = args[i];
hash.Add_bry_obj(arg.Key_bry(), arg);
}
return this;
}
public int Read_enm_or_neg1(byte[] key) {
Xoa_url_enum_itm enm = enm_mgr.Get(key); if (enm == null) return -1;
Gfo_qarg_itm arg = (Gfo_qarg_itm)hash.Get_by_bry(key); if (arg == null) return -1;
return enm.Get_as_int_or(arg.Val_bry(), -1);
}
public byte[] Read_bry_or_empty(byte[] key) {return Read_bry_or(key, Bry_.Empty);}
public byte[] Read_bry_or_null(String key) {return Read_bry_or_null(Bry_.new_u8(key));}
public byte[] Read_bry_or_null(byte[] key) {return Read_bry_or(key, null);}
public byte[] Read_bry_or(byte[] key, byte[] or) {
Gfo_qarg_itm arg = (Gfo_qarg_itm)hash.Get_by_bry(key);
return arg == null ? or : arg.Val_bry();
}
public String Read_str_or_null(String key) {return Read_str_or_null(Bry_.new_u8(key));}
public String Read_str_or_null(byte[] key) {
Gfo_qarg_itm arg = (Gfo_qarg_itm)hash.Get_by_bry(key);
return arg == null ? null : String_.new_u8(arg.Val_bry());
}
}
class Xoa_url_enum_mgr {
private final Hash_adp_bry hash = Hash_adp_bry.cs();
public Xoa_url_enum_mgr(Xoa_url_enum_itm... ary) {
int len = ary.length;
for (int i = 0; i < len; ++i) {
Xoa_url_enum_itm itm = ary[i];
hash.Add_bry_obj(itm.Key(), itm);
}
}
public Xoa_url_enum_itm Get(byte[] key) {return (Xoa_url_enum_itm)hash.Get_by_bry(key);}
}
class Xoa_url_enum_itm {
private final Hash_adp_bry hash = Hash_adp_bry.cs();
public Xoa_url_enum_itm(byte[] key) {this.key = key;}
public byte[] Key() {return key;} private final byte[] key;
public Xoa_url_enum_itm Add(String key, int val) {
hash.Add_bry_obj(Bry_.new_u8(key), Int_obj_val.new_(val));
return this;
}
public int Get_as_int_or(byte[] val, int or) {
Int_obj_val rv = (Int_obj_val)hash.Get_by_bry(val);
return rv == null ? or : rv.Val();
}
}

View File

@@ -0,0 +1,43 @@
/*
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.addons.apps.file_browsers; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.apps.*;
import gplx.xowa.wikis.pages.*;
public class Xopage_html_data {
public Xopage_html_data(byte[] display_ttl, byte[] body) {
this.display_ttl = display_ttl;
this.body = body;
}
public byte[] Display_ttl() {return display_ttl;} private byte[] display_ttl;
public byte[] Body() {return body;} private final byte[] body;
public Xopg_tag_mgr Head_tags() {return head_tags;} private final Xopg_tag_mgr head_tags = new Xopg_tag_mgr();
public Xopg_tag_mgr Tail_tags() {return tail_tags;} private final Xopg_tag_mgr tail_tags = new Xopg_tag_mgr();
public void Apply(Xoa_page page) {
page.Html_data().Html_restricted_n_();
page.Html_data().Skip_parse_(Bool_.Y);
Bry_bfr bfr = Bry_bfr.new_();
page.Html_data().Custom_head_end_concat(head_tags.To_html(bfr));
page.Html_data().Custom_html_end_concat(tail_tags.To_html(bfr));
page.Html_data().Display_ttl_(display_ttl);
page.Html_data().Custom_body_(this.Body());
page.Html_data().Custom_head_tags().Copy(head_tags);
page.Html_data().Custom_tail_tags().Copy(head_tags);
}
public static Xopage_html_data err_(String msg) {return new Xopage_html_data(Bry_.Empty, Bry_.new_u8(msg));}
}

View File

@@ -17,7 +17,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.xowa.addons.apps.searchs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.apps.*;
import gplx.xowa.bldrs.wkrs.*; import gplx.xowa.addons.apps.searchs.bldrs.cmds.*;
public class Xoax_builds_search_addon implements Xoax_addon_itm, Xoax_addon_bldr {
public class Xoax_builds_search_addon implements Xoax_addon_itm, Xoax_addon_itm__bldr {
public Xob_cmd[] Cmds_ary() {
return new Xob_cmd[]
{ Xobldr__link__link_score.Prototype

View File

@@ -44,38 +44,81 @@ class Srch_temp_tbl_wkr implements Srch_text_parser_wkr {
public void Term() {
// end inserts
search_temp_tbl.Insert_end();
// init
Srch_db_mgr search_db_mgr = search_addon.Db_mgr().Init(); // NOTE: must call .Init for import-offline else Cfg_tbl will be null; note that .Init will bind to newly created search_word / search_link tbl; DATE:2016-04-04
Db_conn word_conn = search_temp_tbl.conn;
Db_conn page_conn = wiki.Data__core_mgr().Tbl__page().conn;
// update search_word ids if they exist
Update_word_id(word_conn, wiki);
word_conn.Exec_sql("filling search_word (please wait)", Sql__create_word);
// update search_word ids if they exist
Srch_db_mgr.Optimize_unsafe_(word_conn, Bool_.Y);
Update_word_id(word_conn, wiki);
Search_word__insert(word_conn);
Srch_db_mgr.Optimize_unsafe_(word_conn, Bool_.N);
// create search_link
Db_conn page_conn = wiki.Data__core_mgr().Tbl__page().conn;
if (search_db_mgr.Tbl__link__len() == 1) {
// single_db; just run sql;
Xoa_app_.Usr_dlg().Plog_many("", "", "creating search_link");
Srch_link_tbl link_tbl = search_db_mgr.Tbl__link__ary()[0];
new Db_attach_mgr(word_conn, new Db_attach_itm("link_db", link_tbl.conn))
.Exec_sql(Sql__create_link__one);
.Exec_sql(String_.Concat_lines_nl_skip_last
( "INSERT INTO <link_db>search_link (word_id, page_id)"
, "SELECT w.word_id"
, ", t.page_id"
, "FROM search_temp t"
, " JOIN search_word w ON t.word_text = w.word_text"
));
link_tbl.Create_idx__page_id();
} else {
// many_db; split into main links and non-main; ASSUME:link_dbs_is_2
int len = search_db_mgr.Tbl__link__len();
Db_attach_mgr attach_mgr = new Db_attach_mgr();
for (int i = 0; i < len; ++i) {
Srch_link_tbl link_tbl = search_db_mgr.Tbl__link__ary()[i];
attach_mgr.Main_conn_(word_conn).Init
( new Db_attach_itm("page_db", page_conn)
, new Db_attach_itm("link_db", link_tbl.conn));
attach_mgr.Exec_sql(Sql__create_link__many, i == 0 ? " = 0" : " != 0");
link_tbl.Create_idx__page_id();
}
Search_link__insert(search_db_mgr, word_conn, page_conn);
}
// remove search_temp
word_conn.Meta_tbl_delete(search_temp_tbl.tbl_name);
}
private static void Search_link__insert(Srch_db_mgr search_db_mgr, Db_conn word_conn, Db_conn page_conn) {
// many_db; split into main links and non-main; ASSUME:link_dbs_is_2
Db_attach_mgr attach_mgr = new Db_attach_mgr();
// dump everything into a temp table in order to index it
page_conn.Meta_idx_create(Dbmeta_idx_itm.new_normal_by_name("page", "page_ns__page_id", "page_namespace", "page_id"));
Srch_db_mgr.Optimize_unsafe_(word_conn, Bool_.Y);
word_conn.Meta_tbl_remake(Dbmeta_tbl_itm.New("search_link_temp", Dbmeta_fld_itm.new_int("word_id"), Dbmeta_fld_itm.new_int("page_id"), Dbmeta_fld_itm.new_int("page_namespace")));
attach_mgr.Main_conn_(word_conn).Init(new Db_attach_itm("page_db", page_conn));
attach_mgr.Exec_sql_w_msg
( "filling search_link_temp (please wait)", String_.Concat_lines_nl_skip_last
( "INSERT INTO search_link_temp (word_id, page_id, page_namespace)"
, "SELECT w.word_id"
, ", t.page_id"
, ", p.page_namespace"
, "FROM search_temp t"
, " JOIN search_word w ON t.word_text = w.word_text"
, " JOIN <page_db>page p ON t.page_id = p.page_id"
));
word_conn.Meta_idx_create(Dbmeta_idx_itm.new_normal_by_name("search_link_temp", "main", "page_namespace", "word_id", "page_id"));
Srch_db_mgr.Optimize_unsafe_(word_conn, Bool_.N);
page_conn.Meta_idx_delete("page__page_ns__page_id");
int len = search_db_mgr.Tbl__link__len();
for (int i = 0; i < len; ++i) {
Xoa_app_.Usr_dlg().Plog_many("", "", "creating search_link_temp: ~{0}", i);
Srch_link_tbl link_tbl = search_db_mgr.Tbl__link__ary()[i];
Srch_db_mgr.Optimize_unsafe_(link_tbl.conn, Bool_.Y);
attach_mgr.Main_conn_(link_tbl.conn).Init(new Db_attach_itm("word_db", word_conn));
attach_mgr.Exec_sql_w_msg
( Bry_fmt.Make_str("filling search_link: ~{idx} of ~{len}", i, len), String_.Concat_lines_nl_skip_last
( "INSERT INTO search_link (word_id, page_id)"
, "SELECT t.word_id"
, ", t.page_id"
, "FROM <word_db>search_link_temp t"
, "WHERE t.page_namespace" + (i == 0 ? " = 0" : " != 0")
));
link_tbl.Create_idx__page_id();
Srch_db_mgr.Optimize_unsafe_(link_tbl.conn, Bool_.N);
}
word_conn.Meta_tbl_delete("search_link_temp");
}
public void Exec_by_wkr(int page_id, byte[] page_ttl) {
this.page_id = page_id;
title_parser.Parse(this, page_ttl);
@@ -141,34 +184,36 @@ class Srch_temp_tbl_wkr implements Srch_text_parser_wkr {
}
}
}
private static final String
Sql__create_word = String_.Concat_lines_nl
( "INSERT INTO search_word (word_id, word_text, link_count)"
, "SELECT word_id"
, ", word_text"
, ", Count(DISTINCT page_id)"
, "FROM search_temp"
, "GROUP BY "
, " word_text"
, ";"
)
, Sql__create_link__one = String_.Concat_lines_nl
( "INSERT INTO <link_db>search_link (word_id, page_id)"
, "SELECT w.word_id"
, ", t.page_id"
, "FROM search_temp t"
, " JOIN search_word w ON t.word_text = w.word_text"
, ";"
)
, Sql__create_link__many = String_.Concat_lines_nl
( "INSERT INTO <link_db>search_link (word_id, page_id)"
, "SELECT w.word_id"
, ", t.page_id"
, "FROM search_temp t"
, " JOIN search_word w ON t.word_text = w.word_text"
, " JOIN <page_db>page p ON t.page_id = p.page_id"
, "WHERE p.page_namespace {0}"
, ";"
)
;
private static void Search_word__insert(Db_conn word_conn) {
// fill search_word; need to insert into temp first b/c PRIMARY KEY on search_word will dramatically slow down insertion
word_conn.Meta_tbl_create(Dbmeta_tbl_itm.New("search_word_temp"
, Dbmeta_fld_itm.new_int("word_id")
, Dbmeta_fld_itm.new_str("word_text", 255)
, Dbmeta_fld_itm.new_int("link_count")
));
word_conn.Exec_sql_concat_w_msg
( "filling search_word_temp (please wait)"
, "INSERT INTO search_word_temp (word_id, word_text, link_count)"
, "SELECT Min(word_id)"
, ", word_text"
, ", Count(word_id)" // NOTE: no need to be Count(DISTINCT page_id); each search_temp row will only insert one word per page
, "FROM search_temp"
, "GROUP BY "
, " word_text"
, ";"
);
word_conn.Meta_idx_create(Dbmeta_idx_itm.new_normal_by_name("search_word_temp", "main", "word_id"));
word_conn.Exec_sql_concat_w_msg
( "filling search_word (please wait)"
, "INSERT INTO search_word (word_id, word_text, link_count)"
, "SELECT word_id"
, ", word_text"
, ", link_count"
, "FROM search_word_temp"
, "ORDER BY "
, " word_id"
, ";"
);
word_conn.Meta_tbl_delete("search_word_temp");
}
}

View File

@@ -121,6 +121,8 @@ public class Xobldr__link__link_score extends Xob_cmd__base {
Srch_db_mgr search_db_mgr = Srch_search_addon.Get(wiki).Db_mgr();
Srch_word_tbl word_tbl = search_db_mgr.Tbl__word();
if (!page_tbl.conn.Eq(word_tbl.conn)) page_tbl.conn.Env_vacuum(); // don't vacuum if single-db
// Srch_db_mgr.Optimize_unsafe_(word_tbl.conn, Bool_.Y);
word_tbl.conn.Meta_tbl_remake(Dbmeta_tbl_itm.New("link_score_mnx", Dbmeta_fld_itm.new_int("word_id"), Dbmeta_fld_itm.new_int("mnx_val")));
int link_tbls_len = search_db_mgr.Tbl__link__len();
for (int i = 0; i < link_tbls_len; ++i) {
Srch_link_tbl link_tbl = search_db_mgr.Tbl__link__get_at(i);
@@ -134,37 +136,15 @@ public class Xobldr__link__link_score extends Xob_cmd__base {
( "UPDATE search_link"
, "SET link_score = Coalesce((SELECT page_score FROM <page_db>page p WHERE p.page_id = search_link.page_id), 0)"
));
// update word_tbl.page_score_max
new Db_attach_mgr(word_tbl.conn
, new Db_attach_itm("link_db", link_tbl.conn)
)
.Exec_sql_w_msg
( Bry_fmt.Make_str("updating link_score_min: ~{idx} of ~{total}", i + 1, link_tbls_len)
, String_.Concat_lines_nl_skip_last
( "REPLACE INTO search_word (word_id, word_text, link_count, link_score_min, link_score_max)"
, "SELECT sw.word_id, sw.word_text, sw.link_count, Min(sl.link_score), sw.link_score_max"
, "FROM search_word sw"
, " JOIN <link_db>search_link sl ON sl.word_id = sw.word_id"
, "GROUP BY sw.word_id, sw.word_text, sw.link_count, sw.link_score_max"
, "HAVING sw.link_score_min > Min(sl.link_score)"
))
.Exec_sql_w_msg
( Bry_fmt.Make_str("updating link_score_max: ~{idx} of ~{total}", i + 1, link_tbls_len)
, String_.Concat_lines_nl_skip_last
( "REPLACE INTO search_word (word_id, word_text, link_count, link_score_min, link_score_max)"
, "SELECT sw.word_id, sw.word_text, sw.link_count, sw.link_score_min, Max(sl.link_score)"
, "FROM search_word sw"
, " JOIN <link_db>search_link sl ON sl.word_id = sw.word_id"
, "GROUP BY sw.word_id, sw.word_text, sw.link_count, sw.link_score_min"
, "HAVING sw.link_score_max < Max(sl.link_score)"
))
;
Calc_min_max(Bool_.Y, word_tbl, link_tbl, i, link_tbls_len);
Calc_min_max(Bool_.N, word_tbl, link_tbl, i, link_tbls_len);
link_tbl.Create_idx__link_score();
if (!link_tbl.conn.Eq(word_tbl.conn)) link_tbl.conn.Env_vacuum(); // don't vacuum if single-db
word_tbl.Create_idx();
}
word_tbl.conn.Meta_tbl_delete("link_score_mnx");
Srch_db_cfg_.Update__bldr__link(search_db_mgr.Tbl__cfg(), search_db_mgr.Cfg(), link_score_max);
// Srch_db_mgr.Optimize_unsafe_(word_tbl.conn, Bool_.N);
if (delete_plink_db) {
Xob_db_file plink_db = Xob_db_file.New__page_link(wiki);
@@ -172,6 +152,38 @@ public class Xobldr__link__link_score extends Xob_cmd__base {
Io_mgr.Instance.DeleteFil(plink_db.Url());
}
}
private void Calc_min_max(boolean min, Srch_word_tbl word_tbl, Srch_link_tbl link_tbl, int i, int link_tbls_len) {
word_tbl.conn.Meta_idx_delete("link_score_mnx__main");
word_tbl.conn.Exec_sql_concat("DELETE FROM link_score_mnx");
String prc_name = "Max";
String fld_name = "link_score_max";
if (min) {
prc_name = "Min";
fld_name = "link_score_min";
}
new Db_attach_mgr(word_tbl.conn, new Db_attach_itm("link_db", link_tbl.conn))
.Exec_sql_w_msg
( Bry_fmt.Make_str("creating temp.link_score_max: ~{idx} of ~{total}", i + 1, link_tbls_len)
, String_.Concat_lines_nl_skip_last
( "INSERT INTO link_score_mnx (word_id, mnx_val)"
, "SELECT sw.word_id, " + prc_name + "(sl.link_score)"
, "FROM search_word sw"
, " JOIN <link_db>search_link sl ON sl.word_id = sw.word_id"
, "GROUP BY sw.word_id"
))
;
word_tbl.conn.Meta_idx_create(Dbmeta_idx_itm.new_normal_by_name("link_score_mnx", "main", "word_id", "mnx_val"));
word_tbl.conn.Exec_sql_concat_w_msg
( Bry_fmt.Make_str("creating temp.link_score_max: ~{idx} of ~{total}", i + 1, link_tbls_len)
, "UPDATE search_word"
, "SET " + fld_name + " = "
, " Coalesce(("
, " SELECT mnx_val"
, " FROM link_score_mnx lsm"
, " WHERE lsm.word_id = search_word.word_id"
, " ), " + fld_name + ")"
);
}
@Override public Object Invk(GfsCtx ctx, int ikey, String k, GfoMsg m) {
if (ctx.Match(k, Invk__page_rank_enabled_)) page_rank_enabled = m.ReadYn("v");
else if (ctx.Match(k, Invk__delete_plink_db_)) delete_plink_db = m.ReadYn("v");
@@ -182,5 +194,5 @@ public class Xobldr__link__link_score extends Xob_cmd__base {
public static final String BLDR_CMD_KEY = "search.link__link_score";
@Override public String Cmd_key() {return BLDR_CMD_KEY;}
public static final Xob_cmd Prototype = new Xobldr__link__link_score(null, null);
@Override public Xob_cmd Cmd_new(Xob_bldr bldr, Xowe_wiki wiki) {return new Xobldr__link__link_score(bldr, wiki);}
@Override public Xob_cmd Cmd_clone(Xob_bldr bldr, Xowe_wiki wiki) {return new Xobldr__link__link_score(bldr, wiki);}
}

View File

@@ -109,5 +109,5 @@ public class Xobldr__page__page_score extends Xob_cmd__base implements Xob_cmd {
public static final String BLDR_CMD_KEY = "search.page__page_score";
@Override public String Cmd_key() {return BLDR_CMD_KEY;}
public static final Xob_cmd Prototype = new Xobldr__page__page_score(null, null);
@Override public Xob_cmd Cmd_new(Xob_bldr bldr, Xowe_wiki wiki) {return new Xobldr__page__page_score(bldr, wiki);}
@Override public Xob_cmd Cmd_clone(Xob_bldr bldr, Xowe_wiki wiki) {return new Xobldr__page__page_score(bldr, wiki);}
}

View File

@@ -52,5 +52,5 @@ public class Xobldr__word__link_count extends Xob_cmd__base implements Xob_cmd {
public static final String BLDR_CMD_KEY = "search.word__link_count";
@Override public String Cmd_key() {return BLDR_CMD_KEY;}
public static final Xob_cmd Prototype = new Xobldr__word__link_count(null, null);
@Override public Xob_cmd Cmd_new(Xob_bldr bldr, Xowe_wiki wiki) {return new Xobldr__word__link_count(bldr, wiki);}
@Override public Xob_cmd Cmd_clone(Xob_bldr bldr, Xowe_wiki wiki) {return new Xobldr__word__link_count(bldr, wiki);}
}

View File

@@ -39,7 +39,7 @@ public class Srch_db_mgr {
|| db_props.Layout_text().Tid_is_all_or_few()) {
// single_db; core_db has search_word and search_link
word_db = db_mgr.Db__core();
tbl__cfg = new Db_cfg_tbl(word_db.Conn(), "xowa_cfg");
tbl__cfg = gplx.xowa.wikis.data.Xowd_cfg_tbl_.New(word_db.Conn());
tbl__word = new Srch_word_tbl(word_db.Conn());
tbl__link__ary = new Srch_link_tbl[1];
Tbl__link__ary__set(tbl__link__ary, 0, word_db);
@@ -47,7 +47,7 @@ public class Srch_db_mgr {
// many_db; figure out link_dbs
word_db = db_mgr.Dbs__get_by_tid_or_null(Srch_db_mgr_.Dbtid__search_core);
if (word_db == null) return this; // HACK: called during db build; skip;
tbl__cfg = new Db_cfg_tbl(word_db.Conn(), "xowa_cfg");
tbl__cfg = gplx.xowa.wikis.data.Xowd_cfg_tbl_.New(word_db.Conn());
tbl__word = new Srch_word_tbl(word_db.Conn());
Ordered_hash hash = db_mgr.Dbs__get_hash_by_tid(Srch_db_mgr_.Dbtid__search_link);
if (hash == null) { // v2 file layout where search_word and search_link is in 1 search_db
@@ -117,4 +117,14 @@ public class Srch_db_mgr {
tbl.Create_tbl();
lreg_tbl.Insert(idx, db.Id(), Srch_link_reg_tbl.Db_type__title, ns_ids_is_main ? Srch_link_reg_tbl.Ns_type__main : Srch_link_reg_tbl.Ns_type__rest, 0, -1, -1);
}
public static void Optimize_unsafe_(gplx.dbs.Db_conn conn, boolean v) {
if (v) {
conn.Exec_qry(gplx.dbs.engines.sqlite.Sqlite_pragma.New__journal__off());
conn.Exec_qry(gplx.dbs.engines.sqlite.Sqlite_pragma.New__synchronous__off());
}
else {
conn.Exec_qry(gplx.dbs.engines.sqlite.Sqlite_pragma.New__journal__delete());
conn.Exec_qry(gplx.dbs.engines.sqlite.Sqlite_pragma.New__synchronous__full());
}
}
}

View File

@@ -40,6 +40,9 @@ public class Srch_temp_tbl {
public void Insert_end() {
conn.Txn_end();
stmt_insert = Db_stmt_.Rls(stmt_insert);
conn.Meta_idx_create(Xoa_app_.Usr_dlg(), Dbmeta_idx_itm.new_unique_by_tbl(tbl_name, "main", fld_word_text, fld_page_id));
Srch_db_mgr.Optimize_unsafe_(conn, Bool_.Y);
conn.Meta_idx_create(Xoa_app_.Usr_dlg(), Dbmeta_idx_itm.new_unique_by_tbl(tbl_name, "word_text__word_id", fld_word_text, fld_word_id));
// conn.Meta_idx_create(Xoa_app_.Usr_dlg(), Dbmeta_idx_itm.new_normal_by_tbl(tbl_name, "page_id", fld_page_id));
Srch_db_mgr.Optimize_unsafe_(conn, Bool_.N);
}
}

View File

@@ -33,8 +33,9 @@ public class Srch_special_page implements Xows_page, GfoInvkAble, GfoEvObj {
GfoEvMgr_.SubSame_many(search_api, this, Xoapi_search.Evt_multi_wikis_changed, Xoapi_search.Evt_multi_wikis_changed);
}
public GfoEvMgr EvMgr() {return ev_mgr;} private final GfoEvMgr ev_mgr;
public Xows_special_meta Special_meta() {return Xows_special_meta_.Itm__search;}
public void Special_gen(Xowe_wiki wiki, Xoae_page page, Xoa_url url, Xoa_ttl ttl) {
public Xows_special_meta Special__meta() {return Xows_special_meta_.Itm__search;}
public void Special__gen(Xow_wiki wikii, Xoa_page pagei, Xoa_url url, Xoa_ttl ttl) {
Xowe_wiki wiki = (Xowe_wiki)wikii; Xoae_page page = (Xoae_page)pagei;
if (search_domain_ary == null) Multi_wikis_changed();
// get args from urls while applying defaults from search_cfg
@@ -120,4 +121,6 @@ public class Srch_special_page implements Xows_page, GfoInvkAble, GfoEvObj {
}
return (Xow_domain_itm[])rv.To_ary_and_clear(Xow_domain_itm.class);
}
public Xows_page Special__clone() {return this;}
}

View File

@@ -192,7 +192,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// Xoae_page page = Xoae_page.New_test(wiki, ttl);
// byte[] url_bry = Bry_.new_a7("http://en.wikipedia.org/wiki/Special:Search/" + ttl_str + args_str);
// Xoa_url url = wiki.Appe().Url_parser().Parse(url_bry);
// search_mgr.Special_gen(url, page, wiki, ttl);
// search_mgr.Special__gen(url, page, wiki, ttl);
// Tfds.Eq_str_lines(expd_html, String_.new_u8(page.Root().Data_htm()));
// }
// public void Test_search2(byte match_tid, String ttl_str, int page_idx, byte sort_tid, params String[] expd_ary) {
@@ -202,7 +202,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// Xoa_url url = url_parser.Parse(url_raw);
// Xoa_ttl ttl = Xoa_ttl.parse(wiki, url_raw);
// Xoae_page page = wiki.Ctx().Page();
// search_mgr.Special_gen(url, page, wiki, ttl);
// search_mgr.Special__gen(url, page, wiki, ttl);
// Xosrh_rslt_grp cur_grp = search_mgr.Cur_grp();
// bfr.Mkr_rls();
// Tfds.Eq_ary(expd_ary, Search_itms_to_int_ary(cur_grp));

View File

@@ -0,0 +1,25 @@
/*
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.addons.apps.specials; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.apps.*;
import gplx.xowa.specials.*;
public class Xoa_special_regy {
private final Ordered_hash hash = Ordered_hash_.New_bry(); // NOTE: case-sensitive; case-insensitive requires lang
public void Add(Xows_page page) {hash.Add(page.Special__meta().Key_bry(), page);}
public void Add_many(Xows_page... ary) {for (Xows_page itm : ary) Add(itm);}
public Xows_page Get_by_or_null(byte[] key) {return (Xows_page)hash.Get_by(key);}
}

View 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.addons.apps.specials; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.apps.*;
import gplx.core.net.*;
import gplx.xowa.htmls.*;
import gplx.xowa.wikis.*;
import gplx.xowa.langs.specials.*;
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_.Ttl__statistics , page_statistics);
this.hash = Hash_adp_bry.cs();
}
public void Get_by_ttl(Xoh_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, null, ttl, -1);
// rv.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_find_.Not_found
? 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);
}
}
}