mirror of
https://github.com/gnosygnu/xowa.git
synced 2026-03-02 03:49:30 +00:00
v3.1.4.2
This commit is contained in:
@@ -17,6 +17,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package gplx.xowa.wikis.pages; import gplx.*; import gplx.xowa.*; import gplx.xowa.wikis.*;
|
||||
import gplx.langs.htmls.*; import gplx.xowa.htmls.heads.*; import gplx.xowa.wikis.pages.skins.*; import gplx.xowa.xtns.indicators.*;
|
||||
import gplx.xowa.xtns.pagebanners.*;
|
||||
public class Xopg_html_data {
|
||||
private Ordered_hash ctg_hash;
|
||||
public boolean Html_restricted() {return html_restricted;} private boolean html_restricted = true;
|
||||
@@ -50,6 +51,7 @@ public class Xopg_html_data {
|
||||
public int Xtn_imap_next_id() {return ++xtn_imap_next_id;} private int xtn_imap_next_id; // NOTE: must keep separate imap_id b/c html_elem_id is not always set;
|
||||
public byte[] Xtn_search_text() {return xtn_search_txt;} public void Xtn_search_text_(byte[] v) {xtn_search_txt = v;} private byte[] xtn_search_txt = Bry_.Empty;
|
||||
public byte[] Xtn_scribunto_dbg() {return xtn_scribunto_dbg;} public void Xtn_scribunto_dbg_(byte[] v) {xtn_scribunto_dbg = Bry_.Add(xtn_scribunto_dbg, v);} private byte[] xtn_scribunto_dbg = Bry_.Empty;
|
||||
public Pgbnr_itm Xtn__pgbnr() {return xtn__pgbnr;} public void Xtn__pgbnr_(Pgbnr_itm v) {xtn__pgbnr = v;} private Pgbnr_itm xtn__pgbnr;
|
||||
public Xoh_head_mgr Head_mgr() {return module_mgr;} private Xoh_head_mgr module_mgr = new Xoh_head_mgr();
|
||||
public byte[] Custom_html() {return custom_html;} public Xopg_html_data Custom_html_(byte[] v) {custom_html = v; return this;} private byte[] custom_html;
|
||||
public byte[] Custom_tab_name() {return custom_tab_name;} public Xopg_html_data Custom_tab_name_(byte[] v) {custom_tab_name = v; return this;} private byte[] custom_tab_name;
|
||||
@@ -79,6 +81,7 @@ public class Xopg_html_data {
|
||||
xtn_imap_exists = false;
|
||||
xtn_search_txt = Bry_.Empty;
|
||||
xtn_scribunto_dbg = Bry_.Empty;
|
||||
xtn__pgbnr = null;
|
||||
module_mgr.Clear();
|
||||
custom_html = custom_html_end = custom_head_end = custom_tab_name = null;
|
||||
if (ctg_hash != null) ctg_hash.Clear();
|
||||
|
||||
@@ -21,6 +21,8 @@ public class Xopg_revision_data {
|
||||
public DateAdp Modified_on() {return modified_on;} public Xopg_revision_data Modified_on_(DateAdp v) {modified_on = v; return this;} private DateAdp modified_on = DateAdp_.MinValue;
|
||||
public byte[] User() {return user;} public Xopg_revision_data User_(byte[] v) {user = v; return this;} private byte[] user = Bry_.Empty;
|
||||
public byte[] Protection_level() {return protection_level;} public Xopg_revision_data Protection_level_(byte[] v) {protection_level = v; return this;} private byte[] protection_level = Bry_.Empty;
|
||||
public byte[] Protection_expiry() {return protection_expiry;} private byte[] protection_expiry = Bry__protection_expiry__infinite;
|
||||
public int Html_db_id() {return html_db_id;} public void Html_db_id_(int v) {html_db_id = v;} private int html_db_id = -1;
|
||||
public void Clear() {}// NOTE: do not clear data b/c saving in Edit will call clear and id will be reset to 0
|
||||
public static final byte[] Bry__protection_expiry__infinite = Bry_.new_a7("infinite");
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ public class Xoa_sitelink_div_wtr {
|
||||
byte[] ttl_bry = ttl.Page_txt_w_anchor();
|
||||
boolean ttl_is_empty = false;
|
||||
if (Bry_.Len_eq_0(ttl_bry)) { // NOTE: handles ttls like [[fr:]] and [[:fr;]] which have an empty Page_txt, but a valued Full_txt_raw
|
||||
ttl_bry = wiki.Parser_mgr().Ctx().Cur_page().Ttl().Page_txt();
|
||||
ttl_bry = wiki.Parser_mgr().Ctx().Page().Ttl().Page_txt();
|
||||
ttl_is_empty = true;
|
||||
}
|
||||
itm.Init_by_page(slink.Domain_info(), ttl_bry, ttl_is_empty, slink.Badges());
|
||||
|
||||
@@ -48,7 +48,7 @@ class Xoa_sitelink_div_wtr_fxt {
|
||||
Xoae_app app;
|
||||
public void tst(String raw, String expd) {
|
||||
Xop_ctx ctx = wiki.Parser_mgr().Ctx();
|
||||
ctx.Cur_page().Ttl_(Xoa_ttl.parse(wiki, Bry_.new_a7("test_page")));
|
||||
ctx.Page().Ttl_(Xoa_ttl.parse(wiki, Bry_.new_a7("test_page")));
|
||||
byte[] raw_bry = Bry_.new_u8(raw);
|
||||
Bry_bfr bfr = Bry_bfr.new_();
|
||||
Xop_root_tkn root = ctx.Tkn_mkr().Root(raw_bry);
|
||||
@@ -56,7 +56,7 @@ class Xoa_sitelink_div_wtr_fxt {
|
||||
wiki.Html_mgr().Html_wtr().Write_all(bfr, ctx, raw_bry, root);
|
||||
|
||||
Bry_bfr html_bfr = Bry_bfr.new_();
|
||||
wiki.App().Xwiki_mgr__sitelink_mgr().Write_html(html_bfr, wiki, ctx.Cur_page().Slink_list(), gplx.xowa.xtns.wdatas.Wdata_xwiki_link_wtr.Qid_null);
|
||||
wiki.App().Xwiki_mgr__sitelink_mgr().Write_html(html_bfr, wiki, ctx.Page().Slink_list(), gplx.xowa.xtns.wdatas.Wdata_xwiki_link_wtr.Qid_null);
|
||||
Tfds.Eq_str_lines(expd, html_bfr.To_str_and_clear());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user