throwErr_.new_wo_type("Object does not support key","key",owner_msg.Key(),"ownerType",ClassAdp_.FullNameOf_obj(owner_invk));
throwErr_.new_wo_type("Object does not support key","key",owner_msg.Key(),"ownerType",Type_adp_.FullNameOf_obj(owner_invk));
else{
Gfo_usr_dlgusr_dlg=ctx.Usr_dlg();
if(usr_dlg!=null)usr_dlg.Warn_many(GRP_KEY,"unhandled_key","Object does not support key: key=~{0} ownerType=~{1}",owner_msg.Key(),ClassAdp_.FullNameOf_obj(owner_invk));
if(usr_dlg!=null)usr_dlg.Warn_many(GRP_KEY,"unhandled_key","Object does not support key: key=~{0} ownerType=~{1}",owner_msg.Key(),Type_adp_.FullNameOf_obj(owner_invk));
typeHash.Add_if_dupe_use_1st(regyItm.TypeKey(),regyItm);// NOTE: changed to allow same Object to be added under different aliases (app, xowa) DATE:2014-06-09;
if(!match)throwErr_.new_("Tfds","error types do not match","expdType",ClassAdp_.FullNameOf_type(type),"actlType",ClassAdp_.NameOf_obj(exc),"actlMsg",Err_.Message_lang(exc));
booleanmatch=Type_adp_.Eq_typeSafe(exc,type);
if(!match)throwErr_.new_("Tfds","error types do not match","expdType",Type_adp_.FullNameOf_type(type),"actlType",Type_adp_.NameOf_obj(exc),"actlMsg",Err_.Message_lang(exc));
@ -35,7 +35,7 @@ class GfmlPragmaLxrFrm implements GfmlPragma {
bldr.Doc().RootLxr().SubLxr_Add(lxr);// FIXME: always add to cur lxr; should be outside if block; also, auto_add=n to skip adding to rootLxr
}
else{
GfmlLxr_frameframeLxr=GfmlLxr_frame.as_(lxr);if(frameLxr==null)throwErr_.new_wo_type("lxr is not GfmlLxr_frame","key",key,"type",ClassAdp_.NameOf_obj(lxr));
GfmlLxr_frameframeLxr=GfmlLxr_frame.as_(lxr);if(frameLxr==null)throwErr_.new_wo_type("lxr is not GfmlLxr_frame","key",key,"type",Type_adp_.NameOf_obj(lxr));
bfr.Add_int_fixed(1,Bool_.Xto_int(Bool_.cast_(val)));// NOTE: save boolean to 0 or 1, b/c (a) db may not support bit datatype (sqllite) and (b) avoid i18n issues with "true"/"false"
fxt.Init_fld("fld_0",ClassAdp_.Tid_int).Init_fld("fld_1",ClassAdp_.Tid_int).Init_vals(1,10).Init_vals(2,20).Test_sql("(fld_0=1 AND fld_1=10) OR (fld_0=2 AND fld_1=20)");
fxt.Init_fld("fld_0",Type_adp_.Tid__int).Init_fld("fld_1",Type_adp_.Tid__int).Init_vals(1,10).Init_vals(2,20).Test_sql("(fld_0=1 AND fld_1=10) OR (fld_0=2 AND fld_1=20)");
}
@TestpublicvoidStr(){
fxt.Init_fld("fld_0",ClassAdp_.Tid_int).Init_fld("fld_1",ClassAdp_.Tid_str).Init_vals(1,"a").Init_vals(2,"b").Test_sql("(fld_0=1 AND fld_1='a') OR (fld_0=2 AND fld_1='b')");
fxt.Init_fld("fld_0",Type_adp_.Tid__int).Init_fld("fld_1",Type_adp_.Tid__str).Init_vals(1,"a").Init_vals(2,"b").Test_sql("(fld_0=1 AND fld_1='a') OR (fld_0=2 AND fld_1='b')");
find=String_.Replace(find,"\\","\\\\");// NOTE: backslashes are always literal, never escape codes; EX: "C:\new" "\n" means "\n", not (byte)10; DATE:2015-08-17
@ -29,7 +31,8 @@ public class Xoa_shell implements GfoInvkAble {
}
privateStringFetch_page(GfoMsgm){
Stringurl=m.ReadStr("url");
if(String_.Has_at_bgn(url,"//"))url=String_.Replace(url,"//","");// NOTE: handle Firefox_addon which sometimes sends urls of the form "//wiki/" when coming from the sidebar; DATE:2015-07-04
if(String_.Eq(url,"home"))url=Xoa_url_.Main_page__home_str;// WORKAROUND.ADDON: toolbar button sends "home"; note that Fetch_page is only called from command-line / addon, so "home" should never mean "home" page in current wiki; EX: en.wikipedia.org/wiki/home; DATE:2015-08-18
if(String_.Has_at_bgn(url,"//"))url=gplx.core.net.Gfo_protocol_itm.Itm_https.Key_w_colon_str()+url;// WORKAROUND.ADDON: sidebar sends urls of form "//en.wikipedia.org/"; prefix with "https:" so url parser can handle it; DATE:2015-07-05; DATE:2015-08-18
if(repo_0_is_remote// .gfs manually marked specifes repo_0 as remote
||(Bry_.Eq(repo_0_wiki.Domain_bry(),Xow_domain_.Domain_bry_commons)// repo_0 = commons; force repo_0 to be remote; else all orig_repo will be 1; DATE:2014-02-01
||(Bry_.Eq(repo_0_wiki.Domain_bry(),Xow_domain_itm_.Bry__commons)// repo_0 = commons; force repo_0 to be remote; else all orig_repo will be 1; DATE:2014-02-01
@ -27,7 +28,7 @@ public abstract class Xob_init_base implements Xob_cmd, GfoInvkAble {
publicabstractvoidCmd_run_end(Xowe_wikiwiki);
publicvoidCmd_init(Xob_bldrbldr){// add other cmds; EX: wikidata
bldr.Import_marker().Bgn(wiki);
if(wbase_enabled==Bool_.__byte)wbase_enabled=wiki.Domain_tid()==Xow_domain_type_.Tid_wikidata ?Bool_.Y_byte:Bool_.N_byte;// if wbase_enabled not explicitly set, set it to y if wiki is "www.wikidata.org"
if(wbase_enabled==Bool_.__byte)wbase_enabled=wiki.Domain_tid()==Xow_domain_type_.Int__wikidata ?Bool_.Y_byte:Bool_.N_byte;// if wbase_enabled not explicitly set, set it to y if wiki is "www.wikidata.org"
if(wbase_enabled==Bool_.Y_byte)// if wbase_enabled, auto-add wdata_wkrs bldr
this.Clear();// always clear before calc; caller should be responsible, but just to be safe.
if(Xof_ext_.Id_supports_time(orig_ext)&&lnki_w==Xof_img_size.Null)// use orig_w if no size specified for video; EX:[[File:A.ogv]] -> [[File:A.ogv|550px]] where 550px is orig_w; DATE:2015-08-07
@ -38,11 +38,11 @@ public class Xof_bin_wkr__http_wmf implements Xof_bin_wkr {
if(!rv){
Handle_error();
if(!rv&&fsdb.Orig_repo_id()==Xof_repo_itm_.Repo_local){// image is not found in local; check commons; occurs with bldr which relies on inaccurate data in image dumps; PAGE:en.w:Apollo_13; DATE:2015-08-05
Xow_wikiwiki=wiki_mgr.Get_by_key_or_make_init_y(wiki_domain);if(wiki==null)returnIo_url_.Empty;// wiki is not available; should only happen in read-only mode; DATE:2015-05-23
if(!Bry_.Eq(src_wiki_key,trg_wiki_key)&&!Bry_.Eq(src_wiki_key,Xow_domain_type_.Key_bry_home))throwErr_.new_wo_type("wiki keys do not match","src",String_.new_u8(src_wiki_key),"trg",String_.new_u8(trg_wiki_key));
if(!Bry_.Eq(src_wiki_key,trg_wiki_key)&&!Bry_.Eq(src_wiki_key,Xow_domain_type_.Bry__home))throwErr_.new_wo_type("wiki keys do not match","src",String_.new_u8(src_wiki_key),"trg",String_.new_u8(trg_wiki_key));
IptBnd_.cmd_to_(IptCfg_.Null,html_box,win,Xog_win_itm.Invk_exit,IptKey_.add_(IptKey_.Alt,IptKey_.F4));// WORKAROUND:SWT: xulrunner_v24 no longer sends Alt+F4 to SwtShell; must manually subscribe it to quit; DATE:2015-07-31
publicbyte[]App__retrieve_by_href(Stringhref,booleanoutput_html){returnApp__retrieve_by_href(Xog_url_wkr.Exec_url(this,href),output_html);}// NOTE: used by drd
if(wiki.Domain_tid()!=Xow_domain_type_.Tid_home // allow home wiki to use javascript
if(wiki.Domain_tid()!=Xow_domain_type_.Int__home // allow home wiki to use javascript
&&!page_tid_uses_pre){// if .js, .css or .lua, skip test; may have js fragments, but entire text is escaped and put in pre; don't show spurious warning; DATE:2013-11-21
||Enm_.Has_int(lnki.Lnki_type(),Xop_lnki_type.Id_frame)// If the image is a thumb, do not add a title / alt, even if a caption is available
)
returnBry_.Empty;
elseif(Enm_.HasInt(lnki.Lnki_type(),Xop_lnki_type.Id_frameless)){// If the image is frameless, add the caption as a title / alt. If no caption is available, do not add a title / alt
elseif(Enm_.Has_int(lnki.Lnki_type(),Xop_lnki_type.Id_frameless)){// If the image is frameless, add the caption as a title / alt. If no caption is available, do not add a title / alt
}
Xop_tkn_itmanchor_title_tkn=lnki.Caption_tkn();
if(anchor_title_tkn==Xop_tkn_null.Null_tkn)returnBry_.Empty;// no caption; return empty; (do not use lnki); DATE:2013-12-31
if(xwiki_lang!=null// lnki is xwiki; EX: [[commons:]] [[en:]] [[wikt:]]
&&xwiki_lang.Domain_tid()==wiki.Xwiki_domain_tid()// xwiki is same type as cur wiki; EX: cur=w xwiki=w -> add to xwiki_langs; cur=w xwikid=d -> don't add to xwiki_langs; DATE:2014-09-14
&&xwiki_lang.Type_is_xwiki_lang(wiki.Domain_itm().Lang_orig_uid())// NOTE: use Lang_orig_id to handle xwikis between s.w and en.w; PAGE:s.q:Anonymous DATE:2014-09-10
&&xwiki_lang.Type_is_xwiki_lang(wiki.Domain_itm().Lang_orig_key())// NOTE: use Lang_orig_id to handle xwikis between s.w and en.w; PAGE:s.q:Anonymous DATE:2014-09-10
&&!lnki_ttl.ForceLiteralLink()// not literal; [[:en:A]]
wtxt_ctx.Cur_page().Ttl_(ttl);// NOTE: must set cur_page, or rel lnkis won't work; EX: [[../A]]
}
publicbyte[]Parse(Xowe_wikicur_wiki,Xoae_pagepage,Xog_tab_itmcur_tab,Xow_popup_itmpopup_itm){// NOTE: must pass cur_wiki for xwiki label; DATE:2014-07-02
@ -24,7 +25,7 @@ public class Xow_portal_mgr implements GfoInvkAble {
publicXow_portal_mgr(Xowe_wikiwiki){
this.wiki=wiki;
this.sidebar_mgr=newXowh_sidebar_mgr(wiki);
this.missing_ns_cls=Bry_.Eq(wiki.Domain_bry(),Xow_domain_type_.Key_bry_home)?Missing_ns_cls_hide:null;// if home wiki, set missing_ns to application default; if any other wiki, set to null; will be overriden during init
this.missing_ns_cls=Bry_.Eq(wiki.Domain_bry(),Xow_domain_type_.Bry__home)?Missing_ns_cls_hide:null;// if home wiki, set missing_ns to application default; if any other wiki, set to null; will be overriden during init
s="(function () {"+s+"})();";// NOTE: dependent on firefox addon which does 'var result = Function("with(arguments[0]){return "+cmd_text+"}")(session.window);'; DATE:2014-01-28
s="(function () {"+s+"})();";// NOTE: dependent on firefox_addon which does 'var result = Function("with(arguments[0]){return "+cmd_text+"}")(session.window);'; DATE:2014-01-28
gplx.core.threads.Thread_adp_.Sleep(50);// NOTE: need to sleep, else images won't actually show up on screen; PAGE:nethackwiki.com:Weapons; DATE:2015-08-23
url.Page_bry_(Bry_.Add(Bry_.new_a7("Special:"),ttl.Page_txt_wo_qargs()));// HACK: need to re-set Page b/c href_wtr does not eliminate qargs; DATE:2013-02-08
if(wiki.Domain_tid()==Xow_domain_type_.Tid_home){wiki.Appe().Usr_dlg().Prog_many(GRP_KEY,"home.invalid","AllPages not implemented for home wiki");return;}
if(wiki.Domain_tid()==Xow_domain_type_.Int__home){wiki.Appe().Usr_dlg().Prog_many(GRP_KEY,"home.invalid","AllPages not implemented for home wiki");return;}