mirror of
https://github.com/gnosygnu/xowa.git
synced 2026-03-02 03:49:30 +00:00
v2.9.3.1
This commit is contained in:
@@ -17,6 +17,8 @@ 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.xowa.langs.*;
|
||||
import gplx.xowa.nss.*;
|
||||
import gplx.xowa.html.*; import gplx.xowa.html.hrefs.*; import gplx.xowa.html.lnkis.*;
|
||||
import gplx.xowa.wikis.domains.*; import gplx.xowa.wikis.data.tbls.*;
|
||||
import gplx.xowa.urls.*;
|
||||
@@ -71,7 +73,7 @@ public class Xows_page_allpages implements GfoInvkAble, Bry_fmtr_arg, Xows_page
|
||||
public int Rslt_list_len() {return rslt_list_len;} public void Rslt_list_len_(int v) {rslt_list_len = v;} private int rslt_list_len;
|
||||
public Xowd_page_itm[] Rslt_list_ttls() {return rslt_list_ttls;} private Xowd_page_itm[] rslt_list_ttls;
|
||||
public void Special_gen(Xowe_wiki wiki, Xoae_page page, Xoa_url url, Xoa_ttl ttl) {
|
||||
wiki.Ctx().Cur_page().Html_data().Display_ttl_(wiki.Msg_mgr().Val_by_id(Xol_msg_itm_.Id_sp_allpages_hdr));
|
||||
wiki.Parser_mgr().Ctx().Cur_page().Html_data().Display_ttl_(wiki.Msg_mgr().Val_by_id(Xol_msg_itm_.Id_sp_allpages_hdr));
|
||||
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_.Int__home) {wiki.Appe().Usr_dlg().Prog_many(GRP_KEY, "home.invalid", "AllPages not implemented for home wiki"); return;}
|
||||
if (rslt_list_ttls == null) this.Itms_per_page_(itms_per_page);
|
||||
|
||||
@@ -17,6 +17,7 @@ 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 org.junit.*; import gplx.core.net.*; import gplx.xowa.wikis.data.tbls.*;
|
||||
import gplx.xowa.nss.*;
|
||||
import gplx.xowa.tdbs.hives.*;
|
||||
public class Xows_page_allpages_tst {
|
||||
@Before public void init() {fxt.Clear();} private Xows_page_allpages_fxt fxt = new Xows_page_allpages_fxt();
|
||||
@@ -172,8 +173,8 @@ class Xows_page_allpages_fxt {
|
||||
public Xows_page_allpages_fxt Test_special_gen() {
|
||||
init_url = app.User().Wikii().Utl__url_parser().Parse(Xows_special_meta_.Itm__all_pages.Ttl_bry());
|
||||
Xoa_ttl init_ttl = Make_init_ttl();
|
||||
allpages.Special_gen(wiki, wiki.Ctx().Cur_page(), init_url, init_ttl);
|
||||
if (expd_display_ttl != null) Tfds.Eq(expd_display_ttl, String_.new_u8(wiki.Ctx().Cur_page().Html_data().Display_ttl()));
|
||||
allpages.Special_gen(wiki, wiki.Parser_mgr().Ctx().Cur_page(), init_url, init_ttl);
|
||||
if (expd_display_ttl != null) Tfds.Eq(expd_display_ttl, String_.new_u8(wiki.Parser_mgr().Ctx().Cur_page().Html_data().Display_ttl()));
|
||||
if (expd_address_page != null) Tfds.Eq(expd_address_page, String_.new_u8(init_url.Page_bry()));
|
||||
return this;
|
||||
}
|
||||
@@ -190,8 +191,8 @@ class Xows_page_allpages_fxt {
|
||||
} private Xoa_url init_url = Xoa_url.blank();
|
||||
public Xows_page_allpages_fxt Test_build_html(String expd) {
|
||||
Exec_build();
|
||||
allpages.Build_html(wiki.Ctx().Cur_page());
|
||||
Tfds.Eq_str_lines(expd, String_.new_a7(wiki.Ctx().Cur_page().Data_raw()));
|
||||
allpages.Build_html(wiki.Parser_mgr().Ctx().Cur_page());
|
||||
Tfds.Eq_str_lines(expd, String_.new_a7(wiki.Parser_mgr().Ctx().Cur_page().Data_raw()));
|
||||
return this;
|
||||
}
|
||||
private void Exec_build() {
|
||||
|
||||
Reference in New Issue
Block a user