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

v2.11.2.1

This commit is contained in:
gnosygnu
2015-11-08 23:48:07 -05:00
parent b990ec409f
commit d9f45cec19
298 changed files with 3908 additions and 2141 deletions

View File

@@ -0,0 +1,28 @@
/*
XOWA: the XOWA Offline Wiki Application
Copyright (C) 2012 gnosygnu@gmail.com
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.xowa.files; import gplx.*; import gplx.xowa.*;
public class Xoa_file_mgr {
private final List_adp list = List_adp_.new_();
public void Clear() {list.Clear();}
public boolean Check_cache(Xof_fsdb_itm itm) {
return false;
}
public void Queue_for_viewing(Xof_fsdb_itm itm) {
list.Add(itm);
}
}

View File

@@ -148,4 +148,17 @@ public class Xof_fsdb_itm implements Xof_file_itm {
file_is_orig = img_size.File_is_orig();
}
}
public void To_bfr(Bry_bfr bfr) {
bfr .Add_int_variable(html_uid);
bfr.Add_byte_pipe().Add_int_variable(lnki_exec_tid);
bfr.Add_byte_pipe().Add(lnki_wiki_abrv);
bfr.Add_byte_pipe().Add_int_variable(lnki_type);
bfr.Add_byte_pipe().Add_double(lnki_upright);
bfr.Add_byte_pipe().Add_int_variable(lnki_upright_patch);
bfr.Add_byte_pipe().Add_int_variable(lnki_w);
bfr.Add_byte_pipe().Add_int_variable(lnki_h);
bfr.Add_byte_pipe().Add_double(lnki_time);
bfr.Add_byte_pipe().Add_int_variable(lnki_page);
bfr.Add_byte_nl();
}
}

View File

@@ -68,7 +68,7 @@ class Xof_file_fxt {
itm.Init_at_lnki(arg.Exec_tid(), wiki.Domain_itm().Abrv_xo(), ttl_bry, arg.Lnki_type(), arg.Lnki_upright(), arg.Lnki_w(), arg.Lnki_h(), arg.Lnki_time(), Xof_lnki_page.Null, Xof_patch_upright_tid_.Tid_all);
List_adp itms_list = List_adp_.new_(); itms_list.Add(itm);
orig_mgr.Find_by_list(Ordered_hash_.New_bry(), itms_list, Xof_exec_tid.Tid_wiki_page);
Xoa_ttl ttl = Xoa_ttl.parse(wiki, Xow_ns_.Id_main, ttl_bry);
Xoa_ttl ttl = Xoa_ttl.parse(wiki, Xow_ns_.Tid__main, ttl_bry);
Xoae_page page = Xoae_page.new_(wiki, ttl);
fsdb_mgr.Fsdb_search_by_list(itms_list, wiki, page, Xog_js_wkr_.Noop);
if (arg.Rslt_orig_exists() != Bool_.__byte) Tfds.Eq(arg.Rslt_orig_exists() == Bool_.Y_byte, itm.Orig_exists(), "orig_exists");

View File

@@ -36,7 +36,7 @@ public class Js_img_mgr {
String html_id = To_doc_uid(uid);
js_wkr.Html_img_update(html_id, html_view_url.To_http_file_str(), html_w, html_h);
if (Xop_lnki_type.Id_is_thumbable(lnki_type)) { // thumb needs to set cls and width
js_wkr.Html_atr_set(html_id, "class", gplx.xowa.htmls.core.wkrs.lnkis.htmls.Xoh_lnki_consts.Str_img_cls_thumbimage);
js_wkr.Html_atr_set(html_id, "class", gplx.xowa.htmls.core.wkrs.imgs.atrs.Xoh_img_cls_.Str__thumbimage);
js_wkr.Html_atr_set("xowa_file_div_" + uid, "style", "width:" + html_w + "px;");
}
switch (elem_tid) {

View File

@@ -64,7 +64,7 @@ public class Xofw_wiki_wkr_base implements Xofw_wiki_finder {
if (db_page.Redirected()) {
wiki.Db_mgr().Load_mgr().Load_page(db_page, file_ns, false);
byte[] src = db_page.Text();
Xoa_ttl redirect_ttl = wiki.Redirect_mgr().Extract_redirect(src, src.length);
Xoa_ttl redirect_ttl = wiki.Redirect_mgr().Extract_redirect(src);
return redirect_ttl == Xop_redirect_mgr.Redirect_null_ttl ? Xop_redirect_mgr.Redirect_null_bry : redirect_ttl.Page_db();
}
else