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

'v3.6.4.2'

This commit is contained in:
gnosygnu
2016-06-27 15:39:55 -04:00
parent b3c2d3bb5f
commit 1a4ca00c0b
23 changed files with 245 additions and 73 deletions

View File

@@ -26,11 +26,19 @@ public class Xoa_wiki_mgr_ {
Io_url wiki_root_dir = url.OwnerDir();
Xow_wiki rv = wiki_mgr.Make(wiki_domain, wiki_root_dir);
wiki_mgr.Add(rv);
rv.Init_by_wiki(); // must init for Modified_latest
rv.Init_by_wiki(); // must init for Modified_latest
String wiki_date = rv.Props().Modified_latest__yyyy_MM_dd();
app.User().User_db_mgr().Site_mgr().Import(rv.Domain_str(), rv.Domain_str(), wiki_root_dir.Raw(), wiki_date, "");
conn.Rls_conn();
rv.Init_needed_y_(); // rls wiki else noop connection will hang around
if (app.Tid_is_edit()) {
// get_or_new wiki and mark it offline so it can show up in wikis sidebar
gplx.xowa.wikis.xwikis.Xow_xwiki_itm xwiki = app.User().Wikii().Xwiki_mgr().Get_by_key(wiki_domain);
if (xwiki == null)
xwiki = app.User().Wikii().Xwiki_mgr().Add_by_atrs(wiki_domain, wiki_domain);
xwiki.Offline_(true);
((Xoae_app)app).Gui_mgr().Html_mgr().Portal_mgr().Wikis().Itms_reset(); // dirty wiki list so that next refresh will load itm
}
rv.Rls(); // rls wiki, else open connections will cause later file copies to fail; DATE:2016-06-26
rv.Init_needed_y_(); // mark Init_needed_y_(), else wiki may have NOOP connection which will hang around on next release
return rv;
}
public static final String Invk__import_by_url = "import_by_url";

View File

@@ -106,6 +106,10 @@ public class Xowv_wiki implements Xow_wiki, Xow_ttl_parser, Gfo_invk {
data_mgr__core_mgr.Init_by_make(props, info_session);
html__hdump_mgr.Init_by_db(this);
}
public void Rls() {
data_mgr__core_mgr.Rls();
fsdb_mgr.Rls();
}
public void Pages_get(Xoh_page rv, Gfo_url url, Xoa_ttl ttl) {
if (init_needed) Init_by_wiki();
if (ttl.Ns().Id_is_special())

View File

@@ -20,8 +20,8 @@ import gplx.core.net.*; import gplx.xowa.htmls.hrefs.*;
import gplx.xowa.langs.*;
import gplx.xowa.wikis.domains.*; import gplx.xowa.wikis.xwikis.parsers.*; import gplx.xowa.wikis.xwikis.sitelinks.*;
public class Xow_xwiki_mgr {
private final Ordered_hash list = Ordered_hash_.New_bry(); private final Hash_adp_bry hash = Hash_adp_bry.ci_a7();
private final Xow_wiki wiki;
private final Ordered_hash list = Ordered_hash_.New_bry(); private final Hash_adp_bry hash = Hash_adp_bry.ci_a7();
private final Xow_wiki wiki;
public Xow_xwiki_mgr(Xow_wiki wiki) {
this.wiki = wiki;
this.xwiki_domain_tid = Xwiki_tid(wiki.Domain_tid());
@@ -88,5 +88,5 @@ public class Xow_xwiki_mgr {
return url.Segs__get_at_1st();
}
public static byte[] Bld_url_fmt(byte[] domain_bry) {return Bry_.Add(gplx.core.net.Gfo_protocol_itm.Itm_https.Text_bry(), domain_bry, Bry__url_fmt_end);}
private static final byte[] Bry__url_fmt_end = Bry_.new_a7("/wiki/~{0}");
private static final byte[] Bry__url_fmt_end = Bry_.new_a7("/wiki/~{0}");
}