mirror of
https://github.com/gnosygnu/xowa.git
synced 2024-10-27 20:34:16 +00:00
Category: Show Hidden Categories in Hidden section
This commit is contained in:
parent
d47538e62e
commit
c8df704385
@ -41,10 +41,9 @@ public class Xoctg_pagebox_wtr implements Gfo_invk {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
public Xoctg_pagebox_itm[] Get_catlinks_by_page(Xow_wiki wiki, Xoa_page page) {
|
public Xoctg_pagebox_itm[] Get_catlinks_by_page(Xow_wiki wiki, Xoa_page page) {
|
||||||
int wtxt_ctgs_len = page.Wtxt().Ctgs__len();
|
// NOTE: db load is necessary b/c page.Wtxt().Ctgs__len() is insufficient
|
||||||
// html_dbs will always be 0 since they do not parse ctgs; note that wtxt_dbs can also have 0 if no ctgs
|
// html_dbs will always be 0 since they do not parse ctgs;
|
||||||
if (wtxt_ctgs_len == 0) {
|
// wtxt_dbs may have page.Wtxt().Ctgs__len() > 0 but these items don't have Id / Hidden
|
||||||
// init
|
|
||||||
Xoctg_pagebox_loader select_cbk = new Xoctg_pagebox_loader(hash, page.Url_bry_safe());
|
Xoctg_pagebox_loader select_cbk = new Xoctg_pagebox_loader(hash, page.Url_bry_safe());
|
||||||
|
|
||||||
// get cat_db_id from page
|
// get cat_db_id from page
|
||||||
@ -63,15 +62,6 @@ public class Xoctg_pagebox_wtr implements Gfo_invk {
|
|||||||
Xowd_cat_core_tbl cat_core_tbl = Xodb_cat_db_.Get_cat_core_or_fail(wiki.Data__core_mgr());
|
Xowd_cat_core_tbl cat_core_tbl = Xodb_cat_db_.Get_cat_core_or_fail(wiki.Data__core_mgr());
|
||||||
cat_core_tbl.Select_by_cat_id_many(select_cbk);
|
cat_core_tbl.Select_by_cat_id_many(select_cbk);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
// wtxt_dbs will always have itms;
|
|
||||||
else {
|
|
||||||
for (int i = 0; i < wtxt_ctgs_len; ++i) {
|
|
||||||
Xoa_ttl ttl = page.Wtxt().Ctgs__get_at(i);
|
|
||||||
hash.Add_by_ttl(ttl);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return hash.To_ary_and_clear();
|
return hash.To_ary_and_clear();
|
||||||
}
|
}
|
||||||
public Object Invk(GfsCtx ctx, int ikey, String k, GfoMsg m) {
|
public Object Invk(GfsCtx ctx, int ikey, String k, GfoMsg m) {
|
||||||
|
Loading…
Reference in New Issue
Block a user