mirror of
https://github.com/gnosygnu/xowa.git
synced 2026-03-02 03:49:30 +00:00
v1.8.4.1
This commit is contained in:
@@ -28,6 +28,7 @@ public class Xodb_page implements Xobl_data_itm {
|
||||
public boolean Exists() {return exists;} public Xodb_page Exists_(boolean v) {exists = v; return this;} private boolean exists;
|
||||
public int Db_file_idx() {return db_file_idx;} public Xodb_page Db_file_idx_(int v) {db_file_idx = v; return this;} private int db_file_idx;
|
||||
public int Db_row_idx() {return db_row_idx;} public Xodb_page Db_row_idx_(int v) {db_row_idx = v; return this;} private int db_row_idx;
|
||||
public int Html_db_id() {return html_db_id;} public Xodb_page Html_db_id_(int v) {html_db_id = v; return this;} private int html_db_id;
|
||||
public DateAdp Modified_on() {return modified_on;} public Xodb_page Modified_on_(DateAdp v) {modified_on = v; return this;} DateAdp modified_on;
|
||||
public Xow_ns Ns() {return ns;} private Xow_ns ns;
|
||||
public Object Xtn() {return xtn;} public Xodb_page Xtn_(Object v) {this.xtn = v; return this;} Object xtn;
|
||||
@@ -69,6 +70,7 @@ public class Xodb_page implements Xobl_data_itm {
|
||||
type_redirect = exists = false;
|
||||
modified_on = DateAdp_.MinValue;
|
||||
id_val = null;
|
||||
html_db_id = -1;
|
||||
}
|
||||
public void Copy(Xodb_page orig) {
|
||||
this.id = orig.id;
|
||||
@@ -84,6 +86,7 @@ public class Xodb_page implements Xobl_data_itm {
|
||||
this.exists = orig.exists;
|
||||
this.modified_on = orig.modified_on;
|
||||
this.id_val = null;
|
||||
this.html_db_id = orig.html_db_id;
|
||||
}
|
||||
public Xodb_page Set_all_(int id, int db_file_idx, int db_row_idx, boolean redirect, int text_len, byte[] ttl_wo_ns) {
|
||||
this.id = id; this.db_file_idx = db_file_idx; this.db_row_idx = db_row_idx; this.type_redirect = redirect; this.text_len = text_len; this.ttl_wo_ns = ttl_wo_ns;
|
||||
|
||||
@@ -19,10 +19,9 @@ package gplx.xowa; import gplx.*;
|
||||
import gplx.lists.*; /*ComparerAble*/ import gplx.xowa.bldrs.imports.ctgs.*;
|
||||
import gplx.xowa.dbs.*; import gplx.xowa.wikis.*; import gplx.xowa.langs.msgs.*;
|
||||
public class Xow_data_mgr implements GfoInvkAble {
|
||||
public Xow_data_mgr(Xow_wiki wiki) {
|
||||
this.wiki = wiki; this.redirect_mgr = wiki.Redirect_mgr();
|
||||
} private Xop_redirect_mgr redirect_mgr;
|
||||
private Xop_redirect_mgr redirect_mgr;
|
||||
private Xoa_url tmp_url = Xoa_url.blank_();
|
||||
public Xow_data_mgr(Xow_wiki wiki) {this.wiki = wiki; this.redirect_mgr = wiki.Redirect_mgr();}
|
||||
public Xow_wiki Wiki() {return wiki;} private Xow_wiki wiki;
|
||||
public Xoa_page Get_page(Xoa_ttl ttl, boolean called_from_tmpl) {wiki.App().Url_parser().Parse(tmp_url, ttl.Raw()); return Get_page(tmp_url, ttl, called_from_tmpl, false);}
|
||||
public Xoa_page Get_page_from_msg(Xoa_ttl ttl) {wiki.App().Url_parser().Parse(tmp_url, ttl.Raw()); return Get_page(tmp_url, ttl, false, true);}
|
||||
@@ -60,7 +59,7 @@ public class Xow_data_mgr implements GfoInvkAble {
|
||||
wiki.App().Gui_wtr().Prog_many(GRP_KEY, "file_load", "loading page for ~{0}", String_.new_utf8_(ttl.Raw()));
|
||||
wiki.Db_mgr().Load_mgr().Load_page(db_page, ns, !called_from_tmpl);
|
||||
byte[] bry = db_page.Text();
|
||||
rv.Data_raw_(bry).Revision_data().Modified_on_(db_page.Modified_on()).Id_(db_page.Id());
|
||||
rv.Data_raw_(bry).Revision_data().Modified_on_(db_page.Modified_on()).Id_(db_page.Id()).Html_db_id_(db_page.Html_db_id());
|
||||
if (redirect_force) return rv;
|
||||
Xoa_ttl redirect_ttl = redirect_mgr.Extract_redirect(bry, bry.length);
|
||||
if ( redirect_ttl == null // not a redirect
|
||||
|
||||
Reference in New Issue
Block a user