mirror of
https://github.com/gnosygnu/xowa.git
synced 2026-03-02 03:49:30 +00:00
v3.1.3.1
This commit is contained in:
@@ -45,7 +45,7 @@ abstract class Xoi_cmd_base implements Gfo_thread_cmd {
|
||||
public void Process_async() {
|
||||
Xoae_app app = install_mgr.App();
|
||||
Xob_bldr bldr = app.Bldr();
|
||||
Xowe_wiki wiki = app.Wiki_mgr().Get_by_key_or_make(Bry_.new_a7(wiki_key));
|
||||
Xowe_wiki wiki = app.Wiki_mgr().Get_by_or_make(Bry_.new_a7(wiki_key));
|
||||
wiki.Init_assert();
|
||||
bldr.Cmd_mgr().Clear();
|
||||
Process_async_init(app, wiki, bldr);
|
||||
@@ -81,7 +81,7 @@ class Xoi_cmd_category2_categorylinks extends Xoi_cmd_wiki_download { public Xoi
|
||||
class Xoi_cmd_category2_build extends Xoi_cmd_base {
|
||||
public Xoi_cmd_category2_build(Xoi_setup_mgr install_mgr, String wiki_key) {this.Ctor(install_mgr, wiki_key); this.app = install_mgr.App(); this.wiki_key = wiki_key;} private Xoae_app app; private String wiki_key;
|
||||
@Override public void Cmd_ctor() {
|
||||
Xowe_wiki wiki = app.Wiki_mgr().Get_by_key_or_make(Bry_.new_u8(wiki_key));
|
||||
Xowe_wiki wiki = app.Wiki_mgr().Get_by_or_make(Bry_.new_u8(wiki_key));
|
||||
wiki.Import_cfg().Category_version_(gplx.xowa.wikis.ctgs.Xoa_ctg_mgr.Version_2);
|
||||
}
|
||||
@Override public String Async_key() {return KEY;} public static final String KEY = "wiki.category2.build";
|
||||
|
||||
@@ -45,7 +45,7 @@ class Xoi_cmd_dumpfile {
|
||||
return this;
|
||||
}
|
||||
public Gfo_thread_cmd Exec(Xoi_cmd_mgr cmd_mgr) {
|
||||
Xowe_wiki wiki = cmd_mgr.App().Wiki_mgr().Get_by_key_or_make(domain);
|
||||
Xowe_wiki wiki = cmd_mgr.App().Wiki_mgr().Get_by_or_make(domain);
|
||||
if (bz2_unzip) { // unzip requested; add unzip cmd
|
||||
GfoMsg unzip_msg = GfoMsg_.new_parse_(Gfo_thread_cmd_unzip.KEY).Add("v", Gfo_thread_cmd_unzip.KEY).Add("src", bz2_url.Raw()).Add("trg", xml_url.Raw());
|
||||
Gfo_thread_cmd_unzip unzip_cmd = (Gfo_thread_cmd_unzip)cmd_mgr.Cmd_add(unzip_msg);
|
||||
|
||||
@@ -95,7 +95,7 @@ public class Xoi_cmd_mgr implements GfoInvkAble {
|
||||
if (dumpfile_cmd) {
|
||||
if (String_.Eq(cmd.Async_key(), Xoi_cmd_wiki_download.Key_wiki_download)) continue; // skip download if wiki.dump_file
|
||||
else if (String_.Eq(cmd.Async_key(), Xoi_cmd_wiki_unzip.KEY_dump)) {
|
||||
Xowe_wiki wiki = app.Wiki_mgr().Get_by_key_or_make(Bry_.new_u8(wiki_key));
|
||||
Xowe_wiki wiki = app.Wiki_mgr().Get_by_or_make(Bry_.new_u8(wiki_key));
|
||||
if (wiki.Import_cfg().Src_fil_xml() != null) continue; // skip unzip if xml exists
|
||||
}
|
||||
else if (String_.Eq(cmd.Async_key(), Xoi_cmd_wiki_import.KEY)) {
|
||||
|
||||
@@ -42,7 +42,7 @@ class Xoi_cmd_wiki_download extends Gfo_thread_cmd_download implements Gfo_threa
|
||||
Dump_servers_offline_msg_shown = true;
|
||||
}
|
||||
}
|
||||
Xowe_wiki wiki = app.Wiki_mgr().Get_by_key_or_make(dump_file.Domain_itm().Domain_bry());
|
||||
Xowe_wiki wiki = app.Wiki_mgr().Get_by_or_make(dump_file.Domain_itm().Domain_bry());
|
||||
Io_url root_dir = wiki.Fsys_mgr().Root_dir();
|
||||
Io_url[] trg_fil_ary = Io_mgr.Instance.QueryDir_args(root_dir).FilPath_("*." + dump_type + Download_file_ext() + "*").ExecAsUrlAry();
|
||||
Io_url trg = trg_fil_ary.length == 0 ? root_dir.GenSubFil(dump_file.File_name()) : trg_fil_ary[0];
|
||||
|
||||
@@ -72,7 +72,7 @@ class Xoi_cmd_wiki_import implements Gfo_thread_cmd {
|
||||
Xoae_app app = install_mgr.App();
|
||||
app.Usr_dlg().Prog_one("", "", "preparing import: ~{0}", wiki_key);
|
||||
Xob_bldr bldr = app.Bldr();
|
||||
wiki = app.Wiki_mgr().Get_by_key_or_make(Bry_.new_a7(wiki_key));
|
||||
wiki = app.Wiki_mgr().Get_by_or_make(Bry_.new_a7(wiki_key));
|
||||
wiki.Init_assert();
|
||||
bldr.Cmd_mgr().Clear();
|
||||
bldr.Pause_at_end_(false);
|
||||
|
||||
@@ -23,7 +23,7 @@ class Xoi_cmd_wiki_unzip extends Gfo_thread_cmd_unzip implements Gfo_thread_cmd
|
||||
@Override public String Async_key() {return KEY_dump;}
|
||||
@Override public byte Async_init() {
|
||||
Xoae_app app = install_mgr.App(); Gfui_kit kit = app.Gui_mgr().Kit();
|
||||
Xowe_wiki wiki = app.Wiki_mgr().Get_by_key_or_make(Bry_.new_u8(wiki_key));
|
||||
Xowe_wiki wiki = app.Wiki_mgr().Get_by_or_make(Bry_.new_u8(wiki_key));
|
||||
Io_url wiki_dir = wiki.Import_cfg().Src_dir();
|
||||
Io_url[] urls = Io_mgr.Instance.QueryDir_args(wiki_dir).Recur_(false).FilPath_("*.xml.bz2").ExecAsUrlAry();
|
||||
if (urls.length == 0) {
|
||||
|
||||
@@ -47,7 +47,7 @@ class Xoi_cmd_wiki_zip implements Gfo_thread_cmd {
|
||||
private void Process_async() {
|
||||
Xoae_app app = install_mgr.App();
|
||||
Xob_bldr bldr = app.Bldr();
|
||||
wiki = app.Wiki_mgr().Get_by_key_or_make(Bry_.new_a7(wiki_key));
|
||||
wiki = app.Wiki_mgr().Get_by_or_make(Bry_.new_a7(wiki_key));
|
||||
wiki.Init_assert();
|
||||
bldr.Cmd_mgr().Clear();
|
||||
bldr.Pause_at_end_(false);
|
||||
|
||||
Reference in New Issue
Block a user