mirror of
https://github.com/gnosygnu/xowa.git
synced 2026-03-02 03:49:30 +00:00
v2.11.2.1
This commit is contained in:
@@ -124,10 +124,10 @@ public class Xow_popup_mgr implements GfoInvkAble, GfoEvObj {
|
||||
popup_wiki.Init_assert();
|
||||
Xoa_ttl popup_ttl = Xoa_ttl.parse(popup_wiki, tmp_url.To_bry_page_w_anch());
|
||||
switch (popup_ttl.Ns().Id()) {
|
||||
case Xow_ns_.Id_media:
|
||||
case Xow_ns_.Id_file:
|
||||
case Xow_ns_.Tid__media:
|
||||
case Xow_ns_.Tid__file:
|
||||
return Bry_.Empty; // do not popup for media or file
|
||||
case Xow_ns_.Id_special:
|
||||
case Xow_ns_.Tid__special:
|
||||
if (!Xows_special_meta_.Itm__popup_history.Match_ttl(popup_ttl)) return Bry_.Empty; // do not popup for special, unless popupHistory; DATE:2015-04-20
|
||||
break;
|
||||
}
|
||||
@@ -197,7 +197,7 @@ public class Xow_popup_mgr implements GfoInvkAble, GfoEvObj {
|
||||
for (int i = 0; i < ary_len; i++) {
|
||||
byte[] bry = ary[i];
|
||||
int bry_len = bry.length; if (bry_len == 0) continue; // ignore empty entries; EX: "0|"
|
||||
Xow_ns ns = Bry_.Eq(bry, Xow_ns_.Ns_name_main_bry)
|
||||
Xow_ns ns = Bry_.Eq(bry, Xow_ns_.Bry__main)
|
||||
? ns_mgr.Ns_main()
|
||||
: ns_mgr.Names_get_or_null(bry)
|
||||
;
|
||||
@@ -279,10 +279,10 @@ class Load_popup_wkr implements Gfo_thread_wkr {
|
||||
popup_wiki.Init_assert();
|
||||
Xoa_ttl popup_ttl = Xoa_ttl.parse(popup_wiki, tmp_url.To_bry_page_w_anch());
|
||||
switch (popup_ttl.Ns().Id()) {
|
||||
case Xow_ns_.Id_media:
|
||||
case Xow_ns_.Id_file:
|
||||
case Xow_ns_.Tid__media:
|
||||
case Xow_ns_.Tid__file:
|
||||
return; // do not popup for media or file
|
||||
case Xow_ns_.Id_special:
|
||||
case Xow_ns_.Tid__special:
|
||||
if (!Xows_special_meta_.Itm__popup_history.Match_ttl(popup_ttl)) return; // do not popup for special, unless popupHistory; DATE:2015-04-20
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -331,10 +331,10 @@ public class Xow_popup_parser_tst {
|
||||
));
|
||||
}
|
||||
@Test public void Ns_allowed() {
|
||||
fxt.Test_ns_allowed("Help" , Xow_ns_.Id_help);
|
||||
fxt.Test_ns_allowed("(Main)" , Xow_ns_.Id_main);
|
||||
fxt.Test_ns_allowed("Help" , Xow_ns_.Tid__help);
|
||||
fxt.Test_ns_allowed("(Main)" , Xow_ns_.Tid__main);
|
||||
fxt.Test_ns_allowed("" );
|
||||
fxt.Test_ns_allowed("(Main)|Help" , Xow_ns_.Id_main, Xow_ns_.Id_help);
|
||||
fxt.Test_ns_allowed("(Main)|Help" , Xow_ns_.Tid__main, Xow_ns_.Tid__help);
|
||||
}
|
||||
@Test public void Read_til_stop_fwd() {
|
||||
fxt.Init_word_needed_(2).Init_read_til_stop_fwd_(2) // read fwd found hdr
|
||||
|
||||
@@ -95,8 +95,8 @@ public class Xow_popup_wrdx_mkr {
|
||||
case Xop_tkn_itm_.Tid_lnki:
|
||||
Xop_lnki_tkn lnki = (Xop_lnki_tkn)tkn;
|
||||
switch (lnki.Ns_id()) {
|
||||
case Xow_ns_.Id_category: // skip [[Category:]]
|
||||
case Xow_ns_.Id_file: // skip [[File:]]
|
||||
case Xow_ns_.Tid__category: // skip [[Category:]]
|
||||
case Xow_ns_.Tid__file: // skip [[File:]]
|
||||
add_tkn = add_subs = false;
|
||||
break;
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user