mirror of
https://github.com/gnosygnu/xowa.git
synced 2024-10-27 20:34:16 +00:00
Mass_parse: Fix critical import failure when importing ru.wikinews.org
This commit is contained in:
parent
66eeef6ab1
commit
8524120a14
@ -35,8 +35,8 @@ public class Fsdb_db_mgr_ {
|
|||||||
try {
|
try {
|
||||||
String cfg_domain_str = wiki.Data__core_mgr().Db__core().Tbl__cfg().Select_str_or("xowa.bldr.session", "wiki_domain", domain_str);
|
String cfg_domain_str = wiki.Data__core_mgr().Db__core().Tbl__cfg().Select_str_or("xowa.bldr.session", "wiki_domain", domain_str);
|
||||||
if (!String_.Eq(domain_str, cfg_domain_str)) {
|
if (!String_.Eq(domain_str, cfg_domain_str)) {
|
||||||
|
Gfo_usr_dlg_.Instance.Note_many("", "", "fsdb.db_core.init: fsys.domain doesn't match db.domain; fsys=~{0} db=~{1}", domain_str, cfg_domain_str);
|
||||||
domain_str = cfg_domain_str;
|
domain_str = cfg_domain_str;
|
||||||
Gfo_usr_dlg_.Instance.Note_many("", "", "fsdb.db_core.init: fsys.domain doesn't match db.domain; import db.*; fsys=~{0} db=~{1}", domain_str, cfg_domain_str);
|
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Gfo_usr_dlg_.Instance.Warn_many("", "", "fsdb.db_core.init: failed to get domain from config; err=~{0}", Err_.Message_gplx_log(e));
|
Gfo_usr_dlg_.Instance.Warn_many("", "", "fsdb.db_core.init: failed to get domain from config; err=~{0}", Err_.Message_gplx_log(e));
|
||||||
|
@ -51,7 +51,15 @@ public class Xomp_tmpl_cache_bldr {
|
|||||||
Xow_page_cache_itm itm = new Xow_page_cache_itm(true, page_ttl, null, null); // NOTE: "null, null;" b/c GetContent in Scrib_title checks specifically for null, not empty String; DATE:2016-10-19
|
Xow_page_cache_itm itm = new Xow_page_cache_itm(true, page_ttl, null, null); // NOTE: "null, null;" b/c GetContent in Scrib_title checks specifically for null, not empty String; DATE:2016-10-19
|
||||||
itm.Set_page_ids(page_id, page_redirect_id);
|
itm.Set_page_ids(page_id, page_redirect_id);
|
||||||
text_db_loader.Add(rdr.Read_int("page_text_db_id"), itm);
|
text_db_loader.Add(rdr.Read_int("page_text_db_id"), itm);
|
||||||
cache.Add(page_ttl.Full_db(), itm);
|
|
||||||
|
// ignore duplicate page_titles in cache; EX:ru.n:Модуль:Weather/data DATE:2017-03-16
|
||||||
|
if (cache.Get_or_null(page_ttl.Full_db()) == null) {
|
||||||
|
cache.Add(page_ttl.Full_db(), itm);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
Gfo_usr_dlg_.Instance.Warn_many("", "", "mass_parse: ignoring duplicate page title in page cache; title=~{0} id=~{1}", page_ttl.Full_db(), page_id);
|
||||||
|
}
|
||||||
|
|
||||||
page_regy.Add(page_id, itm);
|
page_regy.Add(page_id, itm);
|
||||||
|
|
||||||
if (page_redirect_id != -1)
|
if (page_redirect_id != -1)
|
||||||
|
@ -51,7 +51,7 @@ class Xofulltext_indexer_svc implements Gfo_invk {
|
|||||||
Io_url search_dir = Xosearch_fulltext_addon.Get_index_dir(wiki);
|
Io_url search_dir = Xosearch_fulltext_addon.Get_index_dir(wiki);
|
||||||
if (Io_mgr.Instance.ExistsDir(search_dir)) {
|
if (Io_mgr.Instance.ExistsDir(search_dir)) {
|
||||||
app.Gui__cbk_mgr().Send_json(cbk_trg, "xo.fulltext_indexer.status__note__recv", gplx.core.gfobjs.Gfobj_nde.New()
|
app.Gui__cbk_mgr().Send_json(cbk_trg, "xo.fulltext_indexer.status__note__recv", gplx.core.gfobjs.Gfobj_nde.New()
|
||||||
.Add_str("note", Datetime_now.Get().XtoStr_fmt_yyyy_MM_dd_HH_mm_ss() + ": search dir already exists; please delete it manually before reindexing; " + String_.new_u8(domain)));
|
.Add_str("note", Datetime_now.Get().XtoStr_fmt_yyyy_MM_dd_HH_mm_ss() + ": search dir already exists; please delete it manually before reindexing; dir=" + search_dir.Xto_api()));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1 +1 @@
|
|||||||
fix readability calc
|
add sponsors
|
||||||
|
Loading…
Reference in New Issue
Block a user