mirror of
https://github.com/gnosygnu/xowa.git
synced 2026-03-02 03:49:30 +00:00
v2.11.3.1
This commit is contained in:
@@ -16,13 +16,13 @@ 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.specials.allPages; import gplx.*; import gplx.xowa.*; import gplx.xowa.specials.*;
|
||||
import gplx.core.primitives.*; import gplx.core.net.*;
|
||||
import gplx.core.primitives.*; import gplx.core.net.*; import gplx.core.brys.fmtrs.*;
|
||||
import gplx.xowa.langs.*; import gplx.xowa.langs.msgs.*;
|
||||
import gplx.xowa.wikis.nss.*;
|
||||
import gplx.xowa.htmls.core.htmls.*; import gplx.xowa.htmls.hrefs.*; import gplx.xowa.htmls.core.wkrs.lnkis.htmls.*;
|
||||
import gplx.xowa.wikis.domains.*; import gplx.xowa.wikis.data.tbls.*;
|
||||
import gplx.xowa.apps.urls.*;
|
||||
public class Xows_page_allpages implements GfoInvkAble, Bry_fmtr_arg, Xows_page {
|
||||
public class Xows_page_allpages extends gplx.core.brys.Bfr_arg_base implements GfoInvkAble, Xows_page {
|
||||
public Xows_page_allpages(Xowe_wiki wiki) {
|
||||
this.wiki = wiki;
|
||||
html_itm_fmtr = new Xos_pagelist_html_itm_fmtr(this, wiki);
|
||||
@@ -143,7 +143,7 @@ public class Xows_page_allpages implements GfoInvkAble, Bry_fmtr_arg, Xows_page
|
||||
if (!ns.Id_is_main()) ttl_bry = Bry_.Add(ns.Name_db_w_colon(), ttl_bry);
|
||||
return Xoa_ttl.parse(wiki, ttl_bry);
|
||||
}
|
||||
public void Fmt__do(Bry_bfr bfr) {
|
||||
@Override public void Bfr_arg__add(Bry_bfr bfr) {
|
||||
int len = rslt_list_ttls.length;
|
||||
html_itm_fmtr.XferAry_bgn();
|
||||
for (int i = 0; i < len; i += itms_per_grp) {
|
||||
@@ -167,7 +167,7 @@ public class Xows_page_allpages implements GfoInvkAble, Bry_fmtr_arg, Xows_page
|
||||
, Invk_itms_per_page_ = "itms_per_page_", Invk_itms_per_grp_ = "itms_per_grp_", Invk_show_redirects_ = "show_redirects_";
|
||||
public static final String GRP_KEY = "xowa.special.allpages";
|
||||
}
|
||||
class Xos_pagelist_html_itm_fmtr implements Bry_fmtr_arg {
|
||||
class Xos_pagelist_html_itm_fmtr extends gplx.core.brys.Bfr_arg_base {
|
||||
public Xos_pagelist_html_itm_fmtr(Xows_page_allpages mgr, Xowe_wiki wiki) {
|
||||
this.mgr = mgr; this.wiki = wiki; this.href_wtr = wiki.Appe().Html__href_wtr(); this.wiki_key = wiki.Domain_bry();
|
||||
this.itm_normal = mgr.Html_list_itm_normal(); this.itm_redirect = mgr.Html_list_itm_redirect();
|
||||
@@ -182,7 +182,7 @@ class Xos_pagelist_html_itm_fmtr implements Bry_fmtr_arg {
|
||||
init_ns = mgr.Init_ns();
|
||||
} int itms_per_grp, ttls_len, itm_pct; Xowd_page_itm[] ttls; Xow_ns init_ns;
|
||||
public void XferAry_end() {ttls = null;}
|
||||
public void Fmt__do(Bry_bfr bfr) {
|
||||
@Override public void Bfr_arg__add(Bry_bfr bfr) {
|
||||
int itm_end = itm_idx + itms_per_grp;
|
||||
for (int i = itm_idx; i < itm_end; i++) {
|
||||
if (i >= ttls_len) break; // handle odd number of itms; EX: interval=3; items=4; proc gets called on 0 (0-2) and 3 (3-5); ArrayIndex for 4, 5
|
||||
|
||||
@@ -16,7 +16,7 @@ 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.specials.movePage; import gplx.*; import gplx.xowa.*; import gplx.xowa.specials.*;
|
||||
import gplx.core.primitives.*; import gplx.core.net.*; import gplx.xowa.wikis.data.tbls.*;
|
||||
import gplx.core.primitives.*; import gplx.core.brys.fmtrs.*; import gplx.core.net.*; import gplx.xowa.wikis.data.tbls.*;
|
||||
import gplx.xowa.langs.msgs.*;
|
||||
import gplx.xowa.htmls.hrefs.*;
|
||||
import gplx.xowa.wikis.nss.*;
|
||||
@@ -120,13 +120,13 @@ public class Move_page implements Xows_page {
|
||||
, "</form>"
|
||||
), "move-page-legend", "src_href", "src_title", "src_text", "newtitle", "trg_ns_list", "trg_title", "move-leave-redirect", "movepagebtn");
|
||||
}
|
||||
class Move_trg_ns_list_fmtr implements Bry_fmtr_arg {
|
||||
class Move_trg_ns_list_fmtr extends gplx.core.brys.Bfr_arg_base {
|
||||
private Xowe_wiki wiki; private Xoa_ttl ttl;
|
||||
public void Init_by_page(Xowe_wiki wiki, Xoae_page page, Xoa_ttl ttl) {
|
||||
this.wiki = wiki;
|
||||
this.ttl = ttl;
|
||||
}
|
||||
public void Fmt__do(Bry_bfr bfr) {
|
||||
@Override public void Bfr_arg__add(Bry_bfr bfr) {
|
||||
Xow_ns_mgr ns_mgr = wiki.Ns_mgr();
|
||||
int ns_len = ns_mgr.Ids_len();
|
||||
for (int i = 0; i < ns_len; i++) {
|
||||
|
||||
@@ -16,6 +16,7 @@ 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.specials.nearby; import gplx.*; import gplx.xowa.*; import gplx.xowa.specials.*;
|
||||
import gplx.core.brys.fmtrs.*;
|
||||
import gplx.xowa.parsers.*; import gplx.xowa.parsers.lnkis.*;
|
||||
public class Nearby_mgr implements Xows_page {
|
||||
Xowe_wiki wiki; byte[] trg;
|
||||
|
||||
@@ -16,6 +16,7 @@ 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.specials.search; import gplx.*; import gplx.xowa.*; import gplx.xowa.specials.*;
|
||||
import gplx.core.brys.fmtrs.*;
|
||||
import gplx.langs.htmls.*; import gplx.xowa.htmls.core.htmls.utls.*; import gplx.xowa.langs.numbers.*;
|
||||
class Xows_html_wkr {
|
||||
private final Bry_bfr tmp_bfr = Bry_bfr.new_(255);
|
||||
@@ -90,12 +91,12 @@ class Xows_html_wkr {
|
||||
, Bry_hdr_len = Bry_.new_a7("Page length"), Bry_hdr_ttl = Bry_.new_a7("Page title")
|
||||
;
|
||||
}
|
||||
class Xows_html_row implements Bry_fmtr_arg {
|
||||
class Xows_html_row extends gplx.core.brys.Bfr_arg_base {
|
||||
private final Xoh_lnki_bldr lnki_bldr; private Xows_ui_rslt rslt;
|
||||
private final Object thread_lock = new Object();
|
||||
public Xows_html_row(Xoh_lnki_bldr lnki_bldr) {this.lnki_bldr = lnki_bldr;}
|
||||
public Xows_html_row Init(Xows_ui_rslt rslt) {this.rslt = rslt; return this;}
|
||||
public void Fmt__do(Bry_bfr bfr) { // <a href="/wiki/A" title="A" class="xowa-visited">A</a>
|
||||
@Override public void Bfr_arg__add(Bry_bfr bfr) { // <a href="/wiki/A" title="A" class="xowa-visited">A</a>
|
||||
int len = rslt.Len();
|
||||
for (int i = 0; i < len; ++i) {
|
||||
Xows_db_row row = rslt.Get_at(i);
|
||||
|
||||
@@ -68,7 +68,7 @@ class Xows_html_wkr_fxt {
|
||||
html_row.Init(rslt);
|
||||
for (int i = 0; i < rows.length; ++i)
|
||||
rslt.Add(rows[i]);
|
||||
html_row.Fmt__do(tmp_bfr);
|
||||
html_row.Bfr_arg__add(tmp_bfr);
|
||||
Tfds.Eq_str_lines(expd, tmp_bfr.To_str_and_clear());
|
||||
}
|
||||
public Xows_db_row Make_row(int len, String ttl_str) {
|
||||
|
||||
@@ -16,6 +16,7 @@ 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.specials.statistics; import gplx.*; import gplx.xowa.*; import gplx.xowa.specials.*;
|
||||
import gplx.core.brys.fmtrs.*;
|
||||
import gplx.xowa.langs.*; import gplx.xowa.langs.msgs.*; import gplx.xowa.langs.numbers.*;
|
||||
import gplx.xowa.wikis.nss.*;
|
||||
public class Xop_statistics_page implements Xows_page {
|
||||
@@ -43,9 +44,9 @@ public class Xop_statistics_page implements Xows_page {
|
||||
, "</div>"
|
||||
), "page_stats", "ns_stats");
|
||||
}
|
||||
class Xop_statistics_stats_page_grp implements Bry_fmtr_arg {
|
||||
class Xop_statistics_stats_page_grp extends gplx.core.brys.Bfr_arg_base {
|
||||
public void Wiki_(Xowe_wiki v) {this.wiki = v;} private Xowe_wiki wiki;
|
||||
public void Fmt__do(Bry_bfr bfr) {
|
||||
@Override public void Bfr_arg__add(Bry_bfr bfr) {
|
||||
byte[] lbl_header_pages = wiki.Msg_mgr().Val_by_id(Xol_msg_itm_.Id_statistics_header_pages);
|
||||
byte[] lbl_articles = wiki.Msg_mgr().Val_by_id(Xol_msg_itm_.Id_statistics_articles);
|
||||
byte[] lbl_pages = wiki.Msg_mgr().Val_by_id(Xol_msg_itm_.Id_statistics_pages);
|
||||
@@ -68,10 +69,10 @@ class Xop_statistics_stats_page_grp implements Bry_fmtr_arg {
|
||||
, " </tr>"
|
||||
), "lbl_header_pages", "lbl_articles", "lbl_pages", "lbl_pages_desc", "page_count_main", "page_count_all");
|
||||
}
|
||||
class Xop_statistics_stats_ns_grp implements Bry_fmtr_arg {
|
||||
class Xop_statistics_stats_ns_grp extends gplx.core.brys.Bfr_arg_base {
|
||||
private Xop_statistics_stats_ns_itm ns_itm_fmtr = new Xop_statistics_stats_ns_itm();
|
||||
public void Wiki_(Xowe_wiki v) {this.wiki = v; ns_itm_fmtr.Wiki_(v);} private Xowe_wiki wiki;
|
||||
public void Fmt__do(Bry_bfr bfr) {
|
||||
@Override public void Bfr_arg__add(Bry_bfr bfr) {
|
||||
byte[] lbl_header_ns = wiki.Msg_mgr().Val_by_id(Xol_msg_itm_.Id_statistics_header_ns);
|
||||
fmtr_ns_grp.Bld_bfr_many(bfr, lbl_header_ns, ns_itm_fmtr);
|
||||
}
|
||||
@@ -82,9 +83,9 @@ class Xop_statistics_stats_ns_grp implements Bry_fmtr_arg {
|
||||
, " </tr>~{ns_itms}"
|
||||
), "lbl_header_ns", "ns_itms");
|
||||
}
|
||||
class Xop_statistics_stats_ns_itm implements Bry_fmtr_arg {
|
||||
class Xop_statistics_stats_ns_itm extends gplx.core.brys.Bfr_arg_base {
|
||||
public void Wiki_(Xowe_wiki v) {this.wiki = v;} private Xowe_wiki wiki;
|
||||
public void Fmt__do(Bry_bfr bfr) {
|
||||
@Override public void Bfr_arg__add(Bry_bfr bfr) {
|
||||
Xow_ns_mgr ns_mgr = wiki.Ns_mgr();
|
||||
int ns_len = ns_mgr.Count();
|
||||
for (int i = 0; i < ns_len; i++) {
|
||||
@@ -103,9 +104,9 @@ class Xop_statistics_stats_ns_itm implements Bry_fmtr_arg {
|
||||
, " </tr>"
|
||||
), "ns_name", "ns_count");
|
||||
}
|
||||
class Xop_statistics_stats_wiki_grp implements Bry_fmtr_arg {
|
||||
class Xop_statistics_stats_wiki_grp extends gplx.core.brys.Bfr_arg_base {
|
||||
public void Wiki_(Xowe_wiki v) {this.wiki = v;} private Xowe_wiki wiki;
|
||||
public void Fmt__do(Bry_bfr bfr) {
|
||||
@Override public void Bfr_arg__add(Bry_bfr bfr) {
|
||||
fmtr_wiki.Bld_bfr_many(bfr, wiki.Db_mgr().Tid_name(), wiki.Fsys_mgr().Root_dir().Raw(), Byte_.To_str(wiki.Db_mgr().Category_version()), wiki.Maint_mgr().Wiki_dump_date().XtoStr_fmt_iso_8561());
|
||||
}
|
||||
private Bry_fmtr fmtr_wiki = Bry_fmtr.new_(String_.Concat_lines_nl_skip_last
|
||||
|
||||
@@ -16,6 +16,7 @@ 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.specials.xowa.file_browsers; import gplx.*; import gplx.xowa.*; import gplx.xowa.specials.*; import gplx.xowa.specials.xowa.*;
|
||||
import gplx.core.brys.fmtrs.*;
|
||||
import gplx.langs.htmls.encoders.*;
|
||||
import gplx.core.ios.*; import gplx.xowa.apps.*; import gplx.xowa.wikis.*;
|
||||
interface Xosp_fbrow_cmd {
|
||||
@@ -96,7 +97,7 @@ abstract class Xosp_fbrow_cmd__base implements Xosp_fbrow_cmd {
|
||||
), "url_enc", "cmd_src", "cmd_gui")
|
||||
;
|
||||
}
|
||||
class Xosp_fbrow_html implements Bry_fmtr_arg {
|
||||
class Xosp_fbrow_html extends gplx.core.brys.Bfr_arg_base {
|
||||
private final Url_encoder encoder; private Xosp_fbrow_data_dir dir; private byte[] cmd_src;
|
||||
public Xosp_fbrow_html(Url_encoder encoder) {this.encoder = encoder;}
|
||||
public void Write(Bry_bfr bfr, byte[] cmd_src, byte[] cmd_row, Xosp_fbrow_data_dir dir) {
|
||||
@@ -110,7 +111,7 @@ class Xosp_fbrow_html implements Bry_fmtr_arg {
|
||||
, this
|
||||
);
|
||||
}
|
||||
public void Fmt__do(Bry_bfr bfr) {
|
||||
@Override public void Bfr_arg__add(Bry_bfr bfr) {
|
||||
int len = dir.Count();
|
||||
for (int i = 0; i < len; ++i) {
|
||||
Xosp_fbrow_data_sub itm = (Xosp_fbrow_data_sub)dir.Get_at(i);
|
||||
|
||||
@@ -16,6 +16,7 @@ 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.specials.xowa.popup_history; import gplx.*; import gplx.xowa.*; import gplx.xowa.specials.*; import gplx.xowa.specials.xowa.*;
|
||||
import gplx.core.brys.fmtrs.*;
|
||||
import gplx.xowa.htmls.modules.popups.*;
|
||||
public class Popup_history_page implements Xows_page {
|
||||
public Xows_special_meta Special_meta() {return Xows_special_meta_.Itm__popup_history;}
|
||||
|
||||
@@ -16,7 +16,7 @@ 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.specials.xowa.system_data; import gplx.*; import gplx.xowa.*; import gplx.xowa.specials.*; import gplx.xowa.specials.xowa.*;
|
||||
import gplx.core.primitives.*; import gplx.core.net.*;
|
||||
import gplx.core.primitives.*; import gplx.core.brys.fmtrs.*; import gplx.core.net.*;
|
||||
import gplx.xowa.langs.*;
|
||||
import gplx.xowa.apps.urls.*;
|
||||
public class System_data_page implements Xows_page {
|
||||
|
||||
Reference in New Issue
Block a user