mirror of
https://github.com/gnosygnu/xowa.git
synced 2026-03-02 03:49:30 +00:00
'v3.6.3.1'
This commit is contained in:
@@ -90,13 +90,13 @@ class Pp_index_parser {
|
||||
class Pp_index_page {
|
||||
public Pp_index_page() {}
|
||||
public byte[] Src() {return src;} public Pp_index_page Src_(byte[] v) {src = v; return this;} private byte[] src;
|
||||
public List_adp Pagelist_xndes() {return pagelist_xndes;} private List_adp pagelist_xndes = List_adp_.new_();
|
||||
public List_adp Page_ttls() {return page_ttls;} private List_adp page_ttls = List_adp_.new_();
|
||||
public List_adp Main_lnkis() {return main_lnkis;} private List_adp main_lnkis = List_adp_.new_();
|
||||
public List_adp Invk_args() {return invk_args;} private List_adp invk_args = List_adp_.new_();
|
||||
public List_adp Pagelist_xndes() {return pagelist_xndes;} private List_adp pagelist_xndes = List_adp_.New();
|
||||
public List_adp Page_ttls() {return page_ttls;} private List_adp page_ttls = List_adp_.New();
|
||||
public List_adp Main_lnkis() {return main_lnkis;} private List_adp main_lnkis = List_adp_.New();
|
||||
public List_adp Invk_args() {return invk_args;} private List_adp invk_args = List_adp_.New();
|
||||
public Xoa_ttl[] Get_ttls_rng(Xowe_wiki wiki, int ns_page_id, byte[] bgn_page_bry, byte[] end_page_bry, Int_obj_ref bgn_page_ref, Int_obj_ref end_page_ref) {
|
||||
int list_len = page_ttls.Count(); if (list_len == 0) return Pp_pages_nde.Ttls_null;
|
||||
List_adp rv = List_adp_.new_();
|
||||
List_adp rv = List_adp_.New();
|
||||
Xoa_ttl bgn_page_ttl = new_ttl_(wiki, ns_page_id, bgn_page_bry), end_page_ttl = new_ttl_(wiki, ns_page_id, end_page_bry);
|
||||
boolean add = bgn_page_ttl == Xoa_ttl.Null; // if from is missing, default to bgn; EX: <pages index=A to="A/5"/>
|
||||
for (int i = 0; i < list_len; i++) { // REF.MW:ProofreadPageRenderer|renderPages
|
||||
@@ -113,7 +113,7 @@ class Pp_index_page {
|
||||
return (Xoa_ttl[])rv.To_ary(Xoa_ttl.class);
|
||||
}
|
||||
private static Xoa_ttl new_ttl_(Xowe_wiki wiki, int ns_page_id, byte[] bry) {return bry == null ? Xoa_ttl.Null : Xoa_ttl.parse(wiki, ns_page_id, bry);}
|
||||
public static final Pp_index_page Null = new Pp_index_page();
|
||||
public static final Pp_index_page Null = new Pp_index_page();
|
||||
}
|
||||
class Pp_index_arg {
|
||||
public Pp_index_arg(byte[] key, byte[] val) {this.key = key; this.val = val;}
|
||||
|
||||
@@ -18,7 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
package gplx.xowa.xtns.proofreadPage; import gplx.*; import gplx.xowa.*; import gplx.xowa.xtns.*;
|
||||
import gplx.xowa.htmls.*; import gplx.xowa.htmls.core.htmls.*;
|
||||
import gplx.xowa.parsers.*; import gplx.xowa.parsers.logs.*; import gplx.xowa.parsers.xndes.*; import gplx.xowa.parsers.htmls.*;
|
||||
public class Pp_pagelist_nde implements Xox_xnde { // TODO:
|
||||
public class Pp_pagelist_nde implements Xox_xnde { // TODO_OLD:
|
||||
public void Xatr__set(Xowe_wiki wiki, byte[] src, Mwh_atr_itm xatr, Object xatr_id_obj) {}
|
||||
public void Xtn_parse(Xowe_wiki wiki, Xop_ctx ctx, Xop_root_tkn root, byte[] src, Xop_xnde_tkn xnde) {
|
||||
boolean log_wkr_enabled = Log_wkr != Xop_log_basic_wkr.Null; if (log_wkr_enabled) Log_wkr.Log_end_xnde(ctx.Page(), Xop_log_basic_wkr.Tid_hiero, src, xnde);
|
||||
|
||||
@@ -109,7 +109,7 @@ public class Pp_pages_nde implements Xox_xnde, Mwh_atr_itm_owner1 {
|
||||
) // NOTE: this simulates MW's if (empty($links)); REF.MW:ProofreadPageRenderer.php|renderPages
|
||||
ttls = Get_ttls_from_xnde_args();
|
||||
else {
|
||||
Int_obj_ref bgn_page_ref = Int_obj_ref.neg1_(), end_page_ref = Int_obj_ref.neg1_();
|
||||
Int_obj_ref bgn_page_ref = Int_obj_ref.New_neg1(), end_page_ref = Int_obj_ref.New_neg1();
|
||||
ttls = index_page.Get_ttls_rng(wiki, ns_page_id, bgn_page_bry, end_page_bry, bgn_page_ref, end_page_ref);
|
||||
bgn_page_int = bgn_page_ref.Val();
|
||||
end_page_int = end_page_ref.Val();
|
||||
@@ -212,7 +212,7 @@ public class Pp_pages_nde implements Xox_xnde, Mwh_atr_itm_owner1 {
|
||||
}
|
||||
private Xoa_ttl[] Get_ttls_from_xnde_args() {
|
||||
if (!Chk_step()) return Ttls_null;
|
||||
List_adp list = List_adp_.new_();
|
||||
List_adp list = List_adp_.New();
|
||||
list = Get_ttls_from_xnde_args__include(list); if (list == null) return Ttls_null;
|
||||
list = Get_ttls_from_xnde_args__rng(list); if (list == null) return Ttls_null;
|
||||
list = Get_ttls_from_xnde_args__exclude(list); if (list == null) return Ttls_null;
|
||||
@@ -262,8 +262,8 @@ public class Pp_pages_nde implements Xox_xnde, Mwh_atr_itm_owner1 {
|
||||
return list;
|
||||
}
|
||||
private int Get_max_page_idx(Xowe_wiki wiki, Xoa_ttl index_ttl) {
|
||||
List_adp rslt = List_adp_.new_();
|
||||
Int_obj_ref rslt_count = Int_obj_ref.zero_();
|
||||
List_adp rslt = List_adp_.New();
|
||||
Int_obj_ref rslt_count = Int_obj_ref.New_zero();
|
||||
wiki.Db_mgr().Load_mgr().Load_ttls_for_all_pages(Cancelable_.Never, rslt, tmp_page, tmp_page, rslt_count, ns_page, index_ttl.Page_db(), Int_.Max_value, 0, Int_.Max_value, false, false);
|
||||
int len = rslt_count.Val();
|
||||
int page_leaf_max = 0;
|
||||
@@ -280,14 +280,14 @@ public class Pp_pages_nde implements Xox_xnde, Mwh_atr_itm_owner1 {
|
||||
if (Bry_.Len_eq_0(exclude)) return list; // exclude is blank; exit early;
|
||||
int[] exclude_pages = Int_ary_.Parse_list_or(exclude, null);
|
||||
if (exclude_pages == null) return list; // ignore invalid exclude; DATE:2014-02-22
|
||||
Hash_adp exclude_pages_hash = Hash_adp_.new_();
|
||||
Hash_adp exclude_pages_hash = Hash_adp_.New();
|
||||
int exclude_pages_len = exclude_pages.length;
|
||||
for (int i = 0; i < exclude_pages_len; i++) {
|
||||
Int_obj_val exclude_page = Int_obj_val.new_(exclude_pages[i]);
|
||||
if (!exclude_pages_hash.Has(exclude_page))
|
||||
exclude_pages_hash.Add(exclude_page, exclude_page);
|
||||
}
|
||||
List_adp new_list = List_adp_.new_();
|
||||
List_adp new_list = List_adp_.New();
|
||||
int list_len = list.Count();
|
||||
for (int i = 0; i < list_len; i++) {
|
||||
Int_obj_val page = (Int_obj_val)list.Get_at(i);
|
||||
|
||||
@@ -20,8 +20,8 @@ import gplx.langs.htmls.*;
|
||||
import gplx.xowa.wikis.domains.*; import gplx.xowa.wikis.xwikis.*;
|
||||
public class Pp_xtn_mgr extends Xox_mgr_base {
|
||||
@Override public boolean Enabled_default() {return false;}
|
||||
@Override public byte[] Xtn_key() {return XTN_KEY;} public static final byte[] XTN_KEY = Bry_.new_a7("ProofreadPages");
|
||||
@Override public Xox_mgr Clone_new() {return new Pp_xtn_mgr();}
|
||||
@Override public byte[] Xtn_key() {return XTN_KEY;} public static final byte[] XTN_KEY = Bry_.new_a7("ProofreadPages");
|
||||
@Override public Xox_mgr Xtn_clone_new() {return new Pp_xtn_mgr();}
|
||||
@Override public void Xtn_init_by_wiki(Xowe_wiki wiki) {
|
||||
if (!this.Enabled_manually())
|
||||
this.Enabled_(wiki.Domain_tid() == Xow_domain_tid_.Int__wikisource); // only enable for wikisource
|
||||
|
||||
Reference in New Issue
Block a user