mirror of
https://github.com/gnosygnu/xowa.git
synced 2025-05-31 22:44:34 +00:00
Wbase: Load prop datatype table as P123 instead of p123
This commit is contained in:
parent
496068e9aa
commit
9fd328ac8f
@ -33,6 +33,6 @@ public class Xoa_cfg_addon implements Xoax_addon_itm, Xoax_addon_itm__special, X
|
||||
}
|
||||
|
||||
public String Addon__key() {return ADDON__KEY;} private static final String ADDON__KEY = "xowa.app.cfg";
|
||||
public static void Init(Xoae_app app) {
|
||||
}
|
||||
// public static void Init(Xoae_app app) {
|
||||
// }
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ public class Xoapi_addon implements Gfo_invk {
|
||||
public boolean App__scripting__enabled() {return app__scripting__enabled;} private boolean app__scripting__enabled = false;
|
||||
public String App__update__restart_cmd() {return app__update__restart_cmd;} private String app__update__restart_cmd = "";
|
||||
public String App__update__update_db_src() {return app__update__update_db_src;} private String app__update__update_db_src = "http://xowa.org";
|
||||
public boolean Parser__hdr__section_editable() {return parser__hdr__section_editable;} private boolean parser__hdr__section_editable = true;
|
||||
public boolean Parser__hdr__section_editable() {return parser__hdr__section_editable;} private boolean parser__hdr__section_editable = false;
|
||||
public Object Invk(GfsCtx ctx, int ikey, String k, GfoMsg m) {
|
||||
if (ctx.Match(k, Invk__search)) return search;
|
||||
else if (ctx.Match(k, Invk__bldr)) return bldr;
|
||||
|
@ -35,6 +35,8 @@ public class Wbase_prop_mgr { // lang-agnostic registry of props; EX: "p15" -> c
|
||||
public String Get_or_null(String pid) {
|
||||
if (init_needed) Init();
|
||||
if (hash == null) return null;
|
||||
if (String_.Has_at_bgn(pid, "p"))
|
||||
pid = String_.Upper(pid); // convert "p123" to "P123"; note (a) Scrib.v2 calls as "P123"; (b) db stores as "p123"; (c) XO loads as "P123"; DATE:2016-12-03
|
||||
String rv = (String)hash.Get_by(pid);
|
||||
if (rv == null) {
|
||||
Gfo_usr_dlg_.Instance.Warn_many("", "", "wbase:could not find datatype for pid; pid=~{0}", pid);
|
||||
|
@ -49,7 +49,7 @@ public class Xowb_prop_tbl implements Db_tbl {
|
||||
return rv;
|
||||
}
|
||||
private void Select_all__add(Ordered_hash hash, Db_rdr rdr) {
|
||||
String pid = rdr.Read_str(fld__wbp_pid);
|
||||
String pid = String_.Upper(rdr.Read_str(fld__wbp_pid)); // convert "p123" to "P123"; note (a) Scrib.v2 calls as "P123"; (b) db stores as "p123"; (c) XO loads as "P123"; DATE:2016-12-03
|
||||
byte datatype_id = (byte)rdr.Read_int(fld__wbp_datatype);
|
||||
Wbase_enum_itm datatype_itm = Wbase_claim_type_.Reg.Get_itm_or((byte)datatype_id, null);
|
||||
if (datatype_itm == null) {
|
||||
|
Loading…
Reference in New Issue
Block a user