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

'v3.8.1.1'

This commit is contained in:
gnosygnu
2016-07-31 21:41:19 -04:00
parent 8e91ac0bc4
commit b0fdf78a41
388 changed files with 3517 additions and 2553 deletions

View File

@@ -62,7 +62,7 @@ class Xodb_load_mgr_sql_fxt {
int len = ary.length;
Xodb_mgr_sql db_mgr = wiki.Db_mgr_as_sql();
Xowd_cat_core_tbl cat_core_tbl = db_mgr.Core_data_mgr().Db__cat_core().Tbl__cat_core().Create_tbl();
DateAdp modified = DateAdp_.Now();
DateAdp modified = Datetime_now.Get();
Xowd_page_tbl tbl_page = wiki.Db_mgr_as_sql().Core_data_mgr().Tbl__page();
tbl_page.Insert_bgn();
cat_core_tbl.Insert_bgn();

View File

@@ -500,8 +500,8 @@ public class Xodb_load_mgr_txt implements Xodb_load_mgr {
public int Load_pid(byte[] lang_key, byte[] pid_name) {
if (pids_root == null)
pids_root = wiki.Appe().Wiki_mgr().Wdata_mgr().Wdata_wiki().Tdb_fsys_mgr().Site_dir().GenSubDir_nest("data", "pid");
Xob_xdat_itm pid_itm = Load_xdat_itm_by_dir(pids_root.GenSubDir(String_.new_u8(lang_key)), pid_name); if (pid_itm == null) return gplx.xowa.xtns.wdatas.Wdata_wiki_mgr.Pid_null;
return Bry_.To_int_or(pid_itm.Src(), pid_itm.Itm_bgn() + pid_name.length + 1 + 1, pid_itm.Itm_end(), gplx.xowa.xtns.wdatas.Wdata_wiki_mgr.Pid_null); // extract pid; note that all itms have format of "ttl|pid"; +1=skip pipe; +1 skip p
Xob_xdat_itm pid_itm = Load_xdat_itm_by_dir(pids_root.GenSubDir(String_.new_u8(lang_key)), pid_name); if (pid_itm == null) return gplx.xowa.xtns.wbases.Wdata_wiki_mgr.Pid_null;
return Bry_.To_int_or(pid_itm.Src(), pid_itm.Itm_bgn() + pid_name.length + 1 + 1, pid_itm.Itm_end(), gplx.xowa.xtns.wbases.Wdata_wiki_mgr.Pid_null); // extract pid; note that all itms have format of "ttl|pid"; +1=skip pipe; +1 skip p
} Io_url pids_root;
public int Load_ctg_count(byte[] ttl) {return wiki.Db_mgr().Category_version() == Xoa_ctg_mgr.Version_1 ? Load_ctg_count_v1(ttl) : Load_ctg_count_v2(ttl);}
int Load_ctg_count_v1(byte[] ttl) {

View File

@@ -50,7 +50,7 @@ public class Xodb_save_mgr_sql implements Xodb_save_mgr {
page_core_tbl.Insert_bgn();
page_text_tbl.Insert_bgn();
try {
db_mgr.Core_data_mgr().Create_page(page_core_tbl, page_text_tbl, page_id, ns_id, ttl.Page_db(), redirect, DateAdp_.Now(), text_zip, text_raw.length, ns_count, page_text_db.Id(), -1);
db_mgr.Core_data_mgr().Create_page(page_core_tbl, page_text_tbl, page_id, ns_id, ttl.Page_db(), redirect, Datetime_now.Get(), text_zip, text_raw.length, ns_count, page_text_db.Id(), -1);
db_file.Tbl__ns().Update_ns_count(ns_id, ns_count);
db_file.Tbl__cfg().Update_int("db", "page.id_next", page_id + 1);
} finally {
@@ -61,7 +61,7 @@ public class Xodb_save_mgr_sql implements Xodb_save_mgr {
}
public void Data_update(Xoae_page page, byte[] text_raw) {
boolean redirect = db_mgr.Wiki().Redirect_mgr().Is_redirect(text_raw, text_raw.length);
DateAdp modified = update_modified_on_enabled ? DateAdp_.Now() : page.Db().Page().Modified_on();
DateAdp modified = update_modified_on_enabled ? Datetime_now.Get() : page.Db().Page().Modified_on();
int page_id = page.Db().Page().Id();
db_mgr.Core_data_mgr().Tbl__page().Update__redirect__modified(page_id, redirect, modified);
Xowd_page_itm db_page = new Xowd_page_itm();

View File

@@ -41,7 +41,7 @@ public class Xodb_save_mgr_txt implements Xodb_save_mgr {
int page_id = page_id_next++;
int fil_idx = 0;
int ns_id = ttl.Ns().Id();
Xotdb_page_itm_.Txt_page_save(tmp, page_id, DateAdp_.Now(), ttl_bry, text, true);
Xotdb_page_itm_.Txt_page_save(tmp, page_id, Datetime_now.Get(), ttl_bry, text, true);
Io_url page_rdr_url = fsys_mgr.Url_ns_fil(Xotdb_dir_info_.Tid_page, ns_id, fil_idx);
byte[] page_rdr_bry = gplx.core.ios.streams.Io_stream_rdr_.Load_all(page_rdr_url);
Xob_xdat_file page_rdr = new Xob_xdat_file();
@@ -87,7 +87,7 @@ public class Xodb_save_mgr_txt implements Xodb_save_mgr {
int text_len = text.length;
DateAdp modified_on = tmp_page.Modified_on();
if (update_modified_on_enabled) {
modified_on = DateAdp_.Now();
modified_on = Datetime_now.Get();
page.Db().Page().Modified_on_(modified_on);
}
Xotdb_page_itm_.Txt_page_save(tmp_bfr, db_page.Id(), modified_on, ttl_bry, text, true);