mirror of https://github.com/gnosygnu/xowa
parent
ae0fb89745
commit
8016846cd9
@ -0,0 +1,21 @@
|
||||
/*
|
||||
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.dbs; import gplx.*;
|
||||
public interface Db_tbl_owner {
|
||||
Db_tbl Tbls__get_by_key(String key);
|
||||
}
|
@ -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.users.wikis.regys.specials.itms; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.users.*; import gplx.xowa.addons.users.wikis.*; import gplx.xowa.addons.users.wikis.regys.*; import gplx.xowa.addons.users.wikis.regys.specials.*;
|
||||
import gplx.dbs.*; import gplx.dbs.cfgs.*;
|
||||
import gplx.xowa.wikis.dbs.*; import gplx.xowa.wikis.data.*; import gplx.xowa.wikis.data.tbls.*;
|
||||
import gplx.xowa.addons.users.wikis.regys.dbs.*;
|
||||
import gplx.xowa.addons.users.wikis.regys.specials.itms.bldrs.*;
|
||||
public class Xopg_db_mgr {
|
||||
private final Xodb_mgr_sql db_mgr;
|
||||
public Xopg_db_mgr(Xowe_wiki wiki) {
|
||||
this.db_mgr = wiki.Db_mgr_as_sql();
|
||||
}
|
||||
public int Create(int ns_id, byte[] ttl_page_db, byte[] text_raw) {
|
||||
Xow_db_file core_db = db_mgr.Core_data_mgr().Db__core();
|
||||
|
||||
int page_id = core_db.Tbl__cfg().Select_int_or("db", "page.id_next", -1);
|
||||
|
||||
// get page_db, text_db and over variables
|
||||
Xowd_page_tbl page_tbl = db_mgr.Core_data_mgr().Tbl__page();
|
||||
Xow_db_file text_db = db_mgr.Core_data_mgr().Db__text();
|
||||
if (text_db == null) text_db = db_mgr.Core_data_mgr().Db__core(); // HACK: needed for create new wiki DATE:2016-10-29
|
||||
Xowd_text_tbl text_tbl = text_db.Tbl__text();
|
||||
byte[] text_zip = text_tbl.Zip(text_raw);
|
||||
boolean redirect = db_mgr.Wiki().Redirect_mgr().Is_redirect(text_raw, text_raw.length);
|
||||
|
||||
// do insert
|
||||
page_tbl.Insert_bgn();
|
||||
text_tbl.Insert_bgn();
|
||||
int ns_count = core_db.Tbl__ns().Select_ns_count(ns_id) + 1;
|
||||
try {
|
||||
db_mgr.Core_data_mgr().Create_page(page_tbl, text_tbl, page_id, ns_id, ttl_page_db, redirect, Datetime_now.Get(), text_zip, text_raw.length, ns_count, text_db.Id(), -1);
|
||||
core_db.Tbl__ns().Update_ns_count(ns_id, ns_count);
|
||||
} finally {
|
||||
page_tbl.Insert_end();
|
||||
text_tbl.Insert_end();
|
||||
}
|
||||
return page_id;
|
||||
}
|
||||
public static int Create(Xodb_wiki_db core_db, int ns_id, byte[] ttl_page_db, byte[] text_raw) {
|
||||
Db_cfg_tbl cfg_tbl = Db_cfg_tbl.Get_by_key(core_db, Xowd_cfg_tbl_.Tbl_name);
|
||||
|
||||
int page_id = cfg_tbl.Select_int_or("db", "page.id_next", -1);
|
||||
Xowd_page_tbl page_tbl = Xowd_page_tbl.Get_by_key(core_db);
|
||||
Xowd_text_tbl text_tbl = Xowd_text_tbl.Get_by_key(core_db);
|
||||
byte[] text_zip = text_tbl.Zip(text_raw);
|
||||
boolean redirect = Bool_.N;
|
||||
|
||||
// do insert
|
||||
page_tbl.Insert_bgn();
|
||||
text_tbl.Insert_bgn();
|
||||
Xowd_site_ns_tbl ns_tbl = Xowd_site_ns_tbl.Get_by_key(core_db);
|
||||
int ns_count = ns_tbl.Select_ns_count(ns_id) + 1;
|
||||
try {
|
||||
page_tbl.Insert_cmd_by_batch(page_id, ns_id, ttl_page_db, redirect, Datetime_now.Get(), text_raw.length, ns_count, 0, -1);
|
||||
text_tbl.Insert_cmd_by_batch(page_id, text_zip);
|
||||
Xowd_site_ns_tbl.Get_by_key(core_db).Update_ns_count(ns_id, ns_count);
|
||||
} finally {
|
||||
page_tbl.Insert_end();
|
||||
text_tbl.Insert_end();
|
||||
}
|
||||
return page_id;
|
||||
}
|
||||
}
|
@ -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.users.wikis.regys.specials.itms; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.users.*; import gplx.xowa.addons.users.wikis.*; import gplx.xowa.addons.users.wikis.regys.*; import gplx.xowa.addons.users.wikis.regys.specials.*;
|
||||
import gplx.langs.jsons.*;
|
||||
import gplx.dbs.sys.*; import gplx.xowa.addons.users.wikis.regys.dbs.*; import gplx.xowa.addons.users.wikis.regys.specials.itms.bldrs.*;
|
||||
import gplx.xowa.wikis.domains.*; import gplx.xowa.wikis.nss.*; import gplx.xowa.wikis.data.*;
|
||||
import gplx.xowa.langs.cases.*;
|
||||
class Xouw_itm_mgr {
|
||||
private final Xoa_app app;
|
||||
public Xouw_itm_mgr(Xoa_app app) {
|
||||
this.app = app;
|
||||
}
|
||||
public void Save(Json_nde args) {
|
||||
Save(args.Get_as_int("id"), args.Get_as_str("domain"), args.Get_as_str("name"), args.Get_as_str("file"));
|
||||
}
|
||||
public void Save(int id, String domain, String name, String url_str) {
|
||||
boolean itm_is_new = false;
|
||||
// get next id if new
|
||||
if (id == -1) {
|
||||
itm_is_new = true;
|
||||
Db_sys_mgr sys_mgr = new Db_sys_mgr(app.User().User_db_mgr().Conn());
|
||||
id = sys_mgr.Autonum_next("user.wikis.id");
|
||||
}
|
||||
|
||||
// insert into user_wiki
|
||||
Xouw_db_mgr db_mgr = new Xouw_db_mgr(app.User().User_db_mgr().Conn());
|
||||
db_mgr.Tbl__wiki().Upsert(id, domain, name, url_str);
|
||||
// if (itm_is_new) Xow_db_mkr.Create_wiki(app, domain, url_str);
|
||||
if (itm_is_new) Xow_db_mkr.Create_wiki2(new Xodb_wiki_data(domain, Io_url_.new_fil_(url_str)));
|
||||
}
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
/*
|
||||
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.users.wikis.regys.specials.itms.bldrs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.users.*; import gplx.xowa.addons.users.wikis.*; import gplx.xowa.addons.users.wikis.regys.*; import gplx.xowa.addons.users.wikis.regys.specials.*; import gplx.xowa.addons.users.wikis.regys.specials.itms.*;
|
||||
import gplx.core.ios.streams.*;
|
||||
public class Xodb_wiki_data {
|
||||
public Xodb_wiki_data(String domain, Io_url core_url) {
|
||||
this.domain = domain;
|
||||
this.core_url = core_url;
|
||||
}
|
||||
public String Domain() {return domain;} private final String domain;
|
||||
public Io_url Core_url() {return core_url;} private final Io_url core_url;
|
||||
public byte Text_zip_tid() {return text_zip_tid;} private byte text_zip_tid = Io_stream_tid_.Tid__raw;
|
||||
}
|
@ -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.addons.users.wikis.regys.specials.itms.bldrs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.users.*; import gplx.xowa.addons.users.wikis.*; import gplx.xowa.addons.users.wikis.regys.*; import gplx.xowa.addons.users.wikis.regys.specials.*; import gplx.xowa.addons.users.wikis.regys.specials.itms.*;
|
||||
import gplx.dbs.*;
|
||||
public class Xodb_wiki_db implements Db_tbl_owner {
|
||||
private final Ordered_hash tbls = Ordered_hash_.New();
|
||||
public Xodb_wiki_db(int tid, Io_url url, Db_conn conn) {
|
||||
this.tid = tid;
|
||||
this.url = url;
|
||||
this.conn = conn;
|
||||
}
|
||||
public int Tid() {return tid;} private final int tid;
|
||||
public Io_url Url() {return url;} private final Io_url url;
|
||||
public Db_conn Conn() {return conn;} private final Db_conn conn;
|
||||
public Db_tbl Tbls__get_by_key(String key) {return (Db_tbl)tbls.Get_by(key);}
|
||||
public void Tbls__add(boolean create, Db_tbl... ary) {
|
||||
int len = ary.length;
|
||||
for (int i = 0; i < len; ++i) {
|
||||
Db_tbl tbl = ary[i];
|
||||
tbls.Add(tbl.Tbl_name(), tbl);
|
||||
if (create)
|
||||
tbl.Create_tbl();
|
||||
}
|
||||
}
|
||||
|
||||
public static Xodb_wiki_db Make(int tid, Io_url url) {
|
||||
Db_conn conn = Db_conn_bldr.Instance.Get_or_new(url).Conn();
|
||||
return new Xodb_wiki_db(tid, url, conn);
|
||||
}
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
/*
|
||||
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.users.wikis.regys.specials.itms.bldrs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.users.*; import gplx.xowa.addons.users.wikis.*; import gplx.xowa.addons.users.wikis.regys.*; import gplx.xowa.addons.users.wikis.regys.specials.*; import gplx.xowa.addons.users.wikis.regys.specials.itms.*;
|
||||
public class Xodb_wiki_db_tid {
|
||||
public static final int Tid__core = 0;
|
||||
}
|
@ -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.users.wikis.regys.specials.itms.bldrs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.users.*; import gplx.xowa.addons.users.wikis.*; import gplx.xowa.addons.users.wikis.regys.*; import gplx.xowa.addons.users.wikis.regys.specials.*; import gplx.xowa.addons.users.wikis.regys.specials.itms.*;
|
||||
import gplx.dbs.*;
|
||||
public class Xodb_wiki_mgr {
|
||||
public Xodb_wiki_mgr(String domain) {
|
||||
this.domain = domain;
|
||||
}
|
||||
public String Domain() {return domain;} private final String domain;
|
||||
public Xodb_wiki_db Dbs__get_core() {return dbs__core;} private Xodb_wiki_db dbs__core;
|
||||
public void Dbs__add(Xodb_wiki_db file) {
|
||||
if (file.Tid() == Xodb_wiki_db_tid.Tid__core)
|
||||
dbs__core = file;
|
||||
}
|
||||
}
|
@ -0,0 +1,119 @@
|
||||
/*
|
||||
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.users.wikis.regys.specials.itms.bldrs; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.users.*; import gplx.xowa.addons.users.wikis.*; import gplx.xowa.addons.users.wikis.regys.*; import gplx.xowa.addons.users.wikis.regys.specials.*; import gplx.xowa.addons.users.wikis.regys.specials.itms.*;
|
||||
import gplx.dbs.*; import gplx.dbs.cfgs.*; import gplx.dbs.sys.*; import gplx.xowa.wikis.data.*; import gplx.xowa.wikis.data.tbls.*;
|
||||
import gplx.core.ios.streams.*;
|
||||
import gplx.xowa.wikis.*; import gplx.xowa.wikis.domains.*; import gplx.xowa.wikis.nss.*; import gplx.xowa.wikis.data.site_stats.*;
|
||||
import gplx.xowa.langs.cases.*;
|
||||
import gplx.fsdb.*; import gplx.fsdb.meta.*; import gplx.fsdb.data.*; import gplx.xowa.files.origs.*;
|
||||
import gplx.xowa.addons.users.wikis.regys.dbs.*;
|
||||
public class Xow_db_mkr {
|
||||
public static Xodb_wiki_mgr Create_wiki2(Xodb_wiki_data data) {
|
||||
// create db
|
||||
Xodb_wiki_mgr wiki_mgr = new Xodb_wiki_mgr(data.Domain());
|
||||
wiki_mgr.Dbs__add(Xodb_wiki_db.Make(Xodb_wiki_db_tid.Tid__core, data.Core_url()));
|
||||
|
||||
// create tbls: wiki
|
||||
Xodb_wiki_db core_db = wiki_mgr.Dbs__get_core();
|
||||
Db_conn core_conn = core_db.Conn();
|
||||
core_db.Tbls__add(Bool_.Y
|
||||
, Xowd_cfg_tbl_.New(core_conn)
|
||||
, new Xowd_xowa_db_tbl(core_conn, Bool_.N)
|
||||
, new Xowd_site_ns_tbl(core_conn, Bool_.N)
|
||||
, new Xow_site_stats_tbl(core_conn, Bool_.N)
|
||||
, new Xowd_page_tbl(core_conn, Bool_.N)
|
||||
, new Xowd_text_tbl(core_conn, Bool_.N, data.Text_zip_tid())
|
||||
// if (props.Layout_text().Tid_is_all_or_few()) { // create in advance else will fail for v2; import wiki -> wiki loads and tries to load categories; v2 category processes and builds tbl; DATE:2015-03-22
|
||||
, new Xowd_cat_core_tbl(core_conn, Bool_.N)
|
||||
, new Xowd_cat_link_tbl(core_conn, Bool_.N)
|
||||
);
|
||||
|
||||
// insert data: wiki
|
||||
Xowd_site_ns_tbl.Get_by_key(core_db).Insert(Xow_ns_mgr_.default_(Xol_case_mgr_.U8()));
|
||||
Xow_site_stats_tbl.Get_by_key(core_db).Update(0, 0, 0);
|
||||
Db_cfg_tbl cfg_tbl = Db_cfg_tbl.Get_by_key(core_db, Xowd_cfg_tbl_.Tbl_name);
|
||||
cfg_tbl.Insert_str(Xow_cfg_consts.Grp__wiki_init, Xow_cfg_consts.Key__init__main_page, "Main_Page");
|
||||
cfg_tbl.Insert_str(Xow_cfg_consts.Grp__wiki_init, Xow_cfg_consts.Key__init__modified_latest, Datetime_now.Get().XtoStr_fmt(DateAdp_.Fmt_iso8561_date_time));
|
||||
Xopg_db_mgr.Create(core_db, Xow_ns_.Tid__main, Bry_.new_a7("Main_Page"), Bry_.new_a7("Main page created"));
|
||||
Xowd_core_db_props props = new Xowd_core_db_props(2, Xow_db_layout.Itm_all, Xow_db_layout.Itm_all, Xow_db_layout.Itm_all, Io_stream_tid_.Tid__raw, Io_stream_tid_.Tid__raw, Bool_.N, Bool_.N);
|
||||
props.Cfg_save(cfg_tbl);
|
||||
Xowd_xowa_db_tbl.Get_by_key(core_db).Upsert(0, Xow_db_file_.Tid__core, core_db.Url().NameAndExt(), "", -1, Guid_adp_.New_str());
|
||||
|
||||
// create tbls: fsdb
|
||||
core_db.Tbls__add(Bool_.Y
|
||||
, new Fsm_mnt_tbl(core_conn, Bool_.N)
|
||||
, new Fsm_atr_tbl(core_conn, Bool_.N)
|
||||
, new Fsm_bin_tbl(core_conn, Bool_.N, Fsm_mnt_mgr.Mnt_idx_main)
|
||||
, new Fsd_dir_tbl(core_conn, Bool_.N)
|
||||
, new Fsd_fil_tbl(core_conn, Bool_.N, Fsm_mnt_mgr.Mnt_idx_main)
|
||||
, new Fsd_thm_tbl(core_conn, Bool_.N, Fsm_mnt_mgr.Mnt_idx_main, Bool_.Y)
|
||||
, new Xof_orig_tbl(core_conn, Bool_.N)
|
||||
);
|
||||
|
||||
// insert data: fsdb
|
||||
Fsm_mnt_mgr.Patch_core(cfg_tbl);
|
||||
Fsm_atr_tbl.Get_by_key(core_db).Insert(Fsm_mnt_mgr.Mnt_idx_main, core_db.Url().NameAndExt());
|
||||
cfg_tbl.Insert_int("core", "mnt.insert_idx", Fsm_mnt_mgr.Mnt_idx_user);
|
||||
|
||||
return wiki_mgr;
|
||||
}
|
||||
public static void Create_wiki(Xoa_app app, String domain, String url_str) {
|
||||
// create wiki
|
||||
Io_url url = Io_url_.new_any_(url_str);
|
||||
Xow_ns_mgr ns_mgr = Xow_ns_mgr_.default_(Xol_case_mgr_.U8());
|
||||
Xow_wiki_.Create(app.User().Key(), ns_mgr, domain, url.OwnerDir());
|
||||
|
||||
// more create; need wiki-reference to create fsdb and create page
|
||||
Xowe_wiki wiki = new Xowe_wiki((Xoae_app)app, app.Lang_mgr().Get_by_or_en(Bry_.Empty), ns_mgr, Xow_domain_itm_.parse(Bry_.new_u8(domain)), url.OwnerDir());
|
||||
gplx.fsdb.Fsdb_db_mgr__v2_bldr.Make_core_file_main(wiki, url, domain, gplx.xowa.wikis.data.Xow_db_layout.Itm_all);
|
||||
wiki.Init_db_mgr();
|
||||
wiki.Init_by_wiki__force_and_mark_inited();
|
||||
wiki.Data__core_mgr().Dbs__make_by_id(1, Xow_db_file_.Tid__core, "", 0, ".xowa");
|
||||
wiki.Data__core_mgr().Db__core().Tbl__db().Commit_all(wiki.Data__core_mgr());
|
||||
|
||||
// create default Main_Page
|
||||
new Xopg_db_mgr(wiki).Create(Xow_ns_.Tid__main, Bry_.new_a7("Main_Page"), Bry_.new_a7("Main page created"));
|
||||
}
|
||||
}
|
||||
/*
|
||||
xowa_cfg
|
||||
xowa_db
|
||||
site_ns
|
||||
site_stats
|
||||
|
||||
page
|
||||
text
|
||||
|
||||
cat_core
|
||||
cat_link
|
||||
|
||||
fsdb_mnt
|
||||
fsdb_dba
|
||||
fsdb_dbb
|
||||
fsdb_dir
|
||||
fsdb_fil
|
||||
fsdb_thm
|
||||
orig_reg
|
||||
|
||||
search_link
|
||||
search_link_reg
|
||||
search_word
|
||||
|
||||
css_core
|
||||
css_file
|
||||
*/
|
Loading…
Reference in new issue