mirror of
https://github.com/gnosygnu/xowa.git
synced 2026-03-02 03:49:30 +00:00
v3.1.1.1
This commit is contained in:
@@ -51,7 +51,7 @@ public class Xod_page_itm {
|
||||
this.rev_id = page_id;
|
||||
this.ttl_text = String_.new_u8(ttl.Page_txt());
|
||||
this.ttl_db = ttl.Page_db_as_str();
|
||||
this.modified_on = db_page.Modified_on().XtoStr_fmt_iso_8561();
|
||||
this.modified_on = db_page.Modified_on().XtoStr_fmt_iso_8561_w_tz();
|
||||
this.lang_count = 1;
|
||||
this.redirected = null;
|
||||
this.description = null;
|
||||
|
||||
@@ -18,12 +18,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
package gplx.xowa.drds.pages; import gplx.*; import gplx.xowa.*; import gplx.xowa.drds.*;
|
||||
import gplx.xowa.wikis.data.tbls.*;
|
||||
import gplx.xowa.htmls.*; import gplx.xowa.htmls.sections.*;
|
||||
import gplx.core.net.*; import gplx.xowa.specials.xowa.file_browsers.*;
|
||||
public class Xod_page_mgr {
|
||||
public Xod_page_itm Get_page(Xow_wiki wiki, String page_ttl) {
|
||||
public Xod_page_itm Get_page(Xow_wiki wiki, Xoa_url page_url) {
|
||||
Xod_page_itm rv = new Xod_page_itm();
|
||||
|
||||
// load meta info like page_id, modified, etc
|
||||
Xoa_ttl ttl = wiki.Ttl_parse(Bry_.new_u8(page_ttl));
|
||||
Xoa_ttl ttl = wiki.Ttl_parse(page_url.Page_bry());
|
||||
if (ttl.Ns().Id_is_special()) return Load_special(rv, wiki, ttl, page_url.Qargs_ary());
|
||||
Xowd_page_itm dbpg = new Xowd_page_itm();
|
||||
wiki.Data__core_mgr().Tbl__page().Select_by_ttl(dbpg, ttl.Ns(), ttl.Page_db());
|
||||
rv.Init_by_dbpg(ttl, dbpg);
|
||||
@@ -44,4 +46,13 @@ public class Xod_page_mgr {
|
||||
rv.Section_list().Add(itm);
|
||||
}
|
||||
}
|
||||
private Xod_page_itm Load_special(Xod_page_itm rv, Xow_wiki wiki, Xoa_ttl ttl, Gfo_qarg_itm[] qargs) {
|
||||
Xosp_fbrow_rslt rslt = Xosp_fbrow_special.Gen(qargs, wiki.App().Wiki_mgri());
|
||||
rv.Init(-1, -1, String_.new_u8(ttl.Page_txt()), String_.new_u8(ttl.Page_db()), null, null, DateAdp_.Now().XtoStr_fmt_iso_8561(), false, false, false, 0, "", "", "");
|
||||
rv.Init_by_hpg(new Xoh_page());
|
||||
Xoh_section_itm section = new Xoh_section_itm(1, 1, Bry_.Empty, Bry_.Empty);
|
||||
section.Content_(rslt.Html_body());
|
||||
rv.Section_list().Add(section);
|
||||
return rv;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user