1
0
mirror of https://github.com/gnosygnu/xowa.git synced 2026-03-02 03:49:30 +00:00

'v3.7.2.1'

This commit is contained in:
gnosygnu
2016-07-10 23:35:32 -04:00
parent f5f48bb9b1
commit b333db45f8
366 changed files with 4468 additions and 3460 deletions

View File

@@ -46,8 +46,8 @@ public class Xow_popup_html_mkr {
, String_.new_u8(page.Ttl().Full_txt_w_ttl_case())
, popup_itm.Popup_id()
, Xow_popup_html_bldr_.Bld_fmtr_wiki(fmtr_wiki, wrdx_bfr, cur_wiki.Domain_bry(), page.Wiki().Domain_bry()) // NOTE: use cur_wiki, not page_wiki; DATE:2014-06-28
, gplx.core.ios.Io_size_.To_str(page.Data_raw().length)
, page.Revision_data().Modified_on().XtoStr_fmt_yyyy_MM_dd_HH_mm_ss()
, gplx.core.ios.Io_size_.To_str(page.Db().Text().Text_bry().length)
, page.Db().Page().Modified_on().XtoStr_fmt_yyyy_MM_dd_HH_mm_ss()
, Xow_popup_html_bldr_.Bld_fmtr_viewed(fmtr_viewed, app, wiki, wrdx_bfr, page.Ttl())
, app.Fsys_mgr().Root_dir().To_http_file_bry()
);

View File

@@ -122,7 +122,7 @@ public class Xow_popup_mgr implements Gfo_invk, Gfo_evt_itm {
if (!Xoa_url_.Tid_is_pagelike(tmp_url.Tid())) return Bry_.Empty; // NOTE: do not get popups for "file:///"; DATE:2015-04-05
Xowe_wiki popup_wiki = (Xowe_wiki)app.Wiki_mgr().Get_by_or_null(tmp_url.Wiki_bry());
popup_wiki.Init_assert();
Xoa_ttl popup_ttl = Xoa_ttl.parse(popup_wiki, tmp_url.To_bry_page_w_anch());
Xoa_ttl popup_ttl = Xoa_ttl.Parse(popup_wiki, tmp_url.To_bry_page_w_anch());
switch (popup_ttl.Ns().Id()) {
case Xow_ns_.Tid__media:
case Xow_ns_.Tid__file:
@@ -277,7 +277,7 @@ class Load_popup_wkr implements Gfo_thread_wkr {
if (!Xoa_url_.Tid_is_pagelike(tmp_url.Tid())) return; // NOTE: do not get popups for "file:///"; DATE:2015-04-05
Xowe_wiki popup_wiki = (Xowe_wiki)app.Wiki_mgr().Get_by_or_null(tmp_url.Wiki_bry());
popup_wiki.Init_assert();
Xoa_ttl popup_ttl = Xoa_ttl.parse(popup_wiki, tmp_url.To_bry_page_w_anch());
Xoa_ttl popup_ttl = Xoa_ttl.Parse(popup_wiki, tmp_url.To_bry_page_w_anch());
switch (popup_ttl.Ns().Id()) {
case Xow_ns_.Tid__media:
case Xow_ns_.Tid__file:

View File

@@ -74,7 +74,7 @@ public class Xow_popup_parser {
data.Wrdx_bfr().Add(app.Wiki_mgr().Wdata_mgr().Popup_text(page));
}
else {
byte[] tmpl_src = page.Data_raw(); int tmpl_len = tmpl_src.length; if (tmpl_len == 0) return Bry_.Empty;
byte[] tmpl_src = page.Db().Text().Text_bry(); int tmpl_len = tmpl_src.length; if (tmpl_len == 0) return Bry_.Empty;
int tmpl_bgn_orig = Xow_popup_parser_.Tmpl_bgn_get_(app, popup_itm, page.Ttl(), hdr_finder, tmpl_src, tmpl_len);
int tmpl_bgn = tmpl_bgn_orig;
int tmpl_read_len_cur = cfg.Tmpl_read_len();

View File

@@ -21,7 +21,7 @@ import gplx.xowa.apps.apis.xowa.html.modules.*;
import gplx.xowa.wikis.nss.*;
import gplx.xowa.guis.views.*;
public class Xow_popup_parser_tst {
@Before public void init() {fxt.Clear();} private Xop_popup_parser_fxt fxt = new Xop_popup_parser_fxt();
@Before public void init() {fxt.Clear();} private final Xop_popup_parser_fxt fxt = new Xop_popup_parser_fxt();
@Test public void Text_chars_one() {
fxt.Test_parse
( "a b c d", String_.Concat_lines_nl_skip_last
@@ -505,8 +505,8 @@ class Xop_popup_parser_fxt {
}
public void Test_parse(String raw, String expd) {Test_parse(raw, "Test_1", expd);}
public void Test_parse(String raw, String ttl, String expd) {
Xoae_page page = Xoae_page.New_edit(wiki, Xoa_ttl.parse(wiki, Bry_.new_a7(ttl)));
page.Data_raw_(Bry_.new_u8(raw));
Xoae_page page = Xoae_page.New_edit(wiki, Xoa_ttl.Parse(wiki, Bry_.new_a7(ttl)));
page.Db().Text().Text_bry_(Bry_.new_u8(raw));
Xow_popup_itm itm = new Xow_popup_itm(1, Bry_.new_u8(raw), Bry_.Empty, word_min);
itm.Init(wiki.Domain_bry(), page.Ttl());
byte[] actl = parser.Parse(wiki, page, null, itm);