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:
@@ -28,7 +28,7 @@ public class Pfunc_pagesincategory extends Pf_func_base {
|
||||
if (Bry_.Len_eq_0(ctg_ttl_bry)) {bfr.Add_int_digits(1, 0); return;} // no title; EX: "{{PAGESINCATEGORY:}}"
|
||||
Xowe_wiki wiki = ctx.Wiki();
|
||||
Xowd_db_mgr core_data_mgr = wiki.Data__core_mgr();
|
||||
int ctg_id = core_data_mgr.Tbl__page().Select_id(Xow_ns_.Id_category, Xoa_ttl.Replace_spaces(ctg_ttl_bry));
|
||||
int ctg_id = core_data_mgr.Tbl__page().Select_id(Xow_ns_.Tid__category, Xoa_ttl.Replace_spaces(ctg_ttl_bry));
|
||||
if (ctg_id == Xowd_page_itm.Id_null) {bfr.Add_int_digits(1, 0); return;} // category doesn't exist; EX: "{{PAGESINCATEGORY:Unknown_category}}"
|
||||
Xowd_category_itm ctg_itm = core_data_mgr.Db__cat_core().Tbl__cat_core().Select(ctg_id);
|
||||
if (ctg_itm == null) {bfr.Add_int_digits(1, 0); return;} // category counts don't exist; shouldn't happen
|
||||
|
||||
@@ -53,7 +53,7 @@ class Pfunc_pagesincategory_tstr {
|
||||
public void Init_category_counts(String category_title, int pages, int subcs, int files) {
|
||||
int page_id = 1;
|
||||
page_tbl.Insert_bgn();
|
||||
page_tbl.Insert_cmd_by_batch(page_id, Xow_ns_.Id_category, Bry_.new_u8(category_title), Bool_.N, DateAdp_.Now(), 1, 1, 1, 1);
|
||||
page_tbl.Insert_cmd_by_batch(page_id, Xow_ns_.Tid__category, Bry_.new_u8(category_title), Bool_.N, DateAdp_.Now(), 1, 1, 1, 1);
|
||||
page_tbl.Insert_end();
|
||||
cat_core_tbl.Insert_bgn();
|
||||
cat_core_tbl.Insert_cmd_by_batch(page_id, pages, subcs, files, Byte_.Zero, 1);
|
||||
|
||||
Reference in New Issue
Block a user