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:
@@ -51,8 +51,8 @@ class Xofo_lnki_parser extends Obj_ary_parser_base {
|
||||
private void Exec_val(Xofo_lnki lnki, int fld_idx, int eq_pos, byte[] bry, int fld_bgn, int i) {
|
||||
int fld_val = -1;
|
||||
if (fld_idx < 3) {
|
||||
fld_val = Bry_.To_int_or(bry, fld_bgn, i, Int_.MinValue);
|
||||
if (fld_val == Int_.MinValue) throw Err_.new_wo_type("invalid int", "val", String_.new_u8(bry, fld_bgn, i));
|
||||
fld_val = Bry_.To_int_or(bry, fld_bgn, i, Int_.Min_value);
|
||||
if (fld_val == Int_.Min_value) throw Err_.new_wo_type("invalid int", "val", String_.new_u8(bry, fld_bgn, i));
|
||||
switch (fld_idx) {
|
||||
case 0: lnki.Lnki_type_((byte)fld_val); break;
|
||||
case 1: lnki.Lnki_w_(fld_val); break;
|
||||
@@ -66,8 +66,8 @@ class Xofo_lnki_parser extends Obj_ary_parser_base {
|
||||
lnki.Lnki_upright_(upright);
|
||||
}
|
||||
else if (Bry_.Match(bry, fld_bgn, eq_pos, Xop_lnki_arg_parser.Bry_thumbtime)) {
|
||||
fld_val = Bry_.To_int_or(bry, eq_pos + 1, i, Int_.MinValue); // +1 to position after eq
|
||||
if (fld_val == Int_.MinValue) throw Err_.new_wo_type("invalid int", "val", String_.new_u8(bry, eq_pos + 1, i));
|
||||
fld_val = Bry_.To_int_or(bry, eq_pos + 1, i, Int_.Min_value); // +1 to position after eq
|
||||
if (fld_val == Int_.Min_value) throw Err_.new_wo_type("invalid int", "val", String_.new_u8(bry, eq_pos + 1, i));
|
||||
lnki.Lnki_thumbtime_(Xof_lnki_time.X_int(fld_val));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ public class Xofw_wiki_wkr_base implements Xofw_wiki_finder {
|
||||
if (repo_pair.Src().Wmf_api()) continue;
|
||||
Xowe_wiki repo_wiki = wiki_mgr.Get_by_key_or_null(wiki_key);
|
||||
if (repo_wiki == null) {continue;}
|
||||
Xoa_ttl ttl = Xoa_ttl.parse_(repo_wiki, ttl_bry);
|
||||
Xoa_ttl ttl = Xoa_ttl.parse(repo_wiki, ttl_bry);
|
||||
Xow_ns file_ns = repo_wiki.Ns_mgr().Ns_file();
|
||||
boolean found = repo_wiki.Db_mgr().Load_mgr().Load_by_ttl(tmp_db_page, file_ns, ttl.Page_db());
|
||||
if (!found) {continue;}
|
||||
@@ -40,7 +40,7 @@ public class Xofw_wiki_wkr_base implements Xofw_wiki_finder {
|
||||
file.Orig_repo_id_(-1);
|
||||
}
|
||||
public boolean Locate(Xofw_file_finder_rslt rv, List_adp repo_pairs, byte[] ttl_bry) {
|
||||
Xoa_ttl ttl = Xoa_ttl.parse_(wiki, ttl_bry); // NOTE: parse_(ttl_bry) should be the same across all wikis; i.e.: there should be no aliases/namespaces
|
||||
Xoa_ttl ttl = Xoa_ttl.parse(wiki, ttl_bry); // NOTE: parse(ttl_bry) should be the same across all wikis; i.e.: there should be no aliases/namespaces
|
||||
Xow_ns file_ns = wiki.Ns_mgr().Ns_file(); // NOTE: file_ns should also be the same across all wikis; being used for data_mgr.Parse below
|
||||
byte[] ttl_db_key = ttl.Page_db();
|
||||
rv.Init(ttl_db_key);
|
||||
|
||||
Reference in New Issue
Block a user