mirror of
https://github.com/gnosygnu/xowa.git
synced 2026-03-02 03:49:30 +00:00
v2.8.5.1
This commit is contained in:
@@ -21,7 +21,7 @@ public class Xoi_wiki_props_alias {
|
||||
public String Alias() {return alias;} private String alias;
|
||||
public Xoi_wiki_props_alias Init_by_ctor(int id, String alias) {this.id = id; this.alias = alias; return this;}
|
||||
public void Init_by_xml(gplx.xmls.XmlNde ns_nde) {
|
||||
this.id = Int_.parse_(ns_nde.Atrs().FetchValOr("id", "-1"));
|
||||
this.id = Int_.parse(ns_nde.Atrs().FetchValOr("id", "-1"));
|
||||
this.alias = String_.Replace(String_.Replace(ns_nde.Text_inner(), " ", "_"), "'", "''");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ public class Xoi_wiki_props_api {
|
||||
bfr.Add_byte_nl();
|
||||
}
|
||||
public void Parse(Xoi_wiki_props_wiki wiki, String xml) {
|
||||
XmlDoc xdoc = XmlDoc_.parse_(xml);
|
||||
XmlDoc xdoc = XmlDoc_.parse(xml);
|
||||
XmlNde query_xnde = Xpath_.SelectFirst(xdoc.Root(), "query");
|
||||
XmlNde aliases_xnde = Xpath_.SelectFirst(query_xnde, "namespace"+"aliases");
|
||||
wiki.Alias_ary_(Parse_alias_ary(aliases_xnde));
|
||||
|
||||
@@ -135,7 +135,7 @@ class Xob_subpage_tst_fxt {
|
||||
int ns_len = wiki.Ns_list().Count();
|
||||
for (int i = 0; i < ns_len; i++) {
|
||||
Xob_subpage_ns ns = (Xob_subpage_ns)wiki.Ns_list().Get_at(i);
|
||||
sb.Add(ns.Id()).Add("=").Add(Bool_.Xto_str_lower(ns.Enabled())).Add_char_nl();
|
||||
sb.Add(ns.Id()).Add("=").Add(Bool_.To_str_lower(ns.Enabled())).Add_char_nl();
|
||||
}
|
||||
sb.Add_char_nl();
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ public class Xoi_wiki_props_ns {
|
||||
public boolean Subpages_enabled() {return subpages_enabled;} private boolean subpages_enabled;
|
||||
public Xoi_wiki_props_ns Init_by_ctor(int id, boolean subpages_enabled) {this.id = id; this.subpages_enabled = subpages_enabled; return this;}
|
||||
public void Init_by_xml(gplx.xmls.XmlNde ns_nde) {
|
||||
this.id = Int_.parse_(ns_nde.Atrs().FetchValOr("id", "-1"));
|
||||
this.id = Int_.parse(ns_nde.Atrs().FetchValOr("id", "-1"));
|
||||
this.subpages_enabled = ns_nde.Atrs().Fetch_or_null("subpages") != null;// per api, subpages="" means ns has subpages; no subpages attribute means no subpages
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user