1
0
mirror of https://github.com/gnosygnu/xowa.git synced 2026-03-02 03:49:30 +00:00

'v3.7.4.1'

This commit is contained in:
gnosygnu
2016-07-25 21:59:51 -04:00
parent 7a851a41a5
commit 8e91ac0bc4
175 changed files with 2079 additions and 933 deletions

View File

@@ -108,7 +108,7 @@ public class Xoa_boot_mgr {
if (app_type_is_gui)
app.Gui_mgr().Run(splash_win);
else // teardown app, else lua will keep process running
gplx.xowa.xtns.scribunto.Scrib_core_mgr.Term_all();
gplx.xowa.xtns.scribunto.Scrib_core_mgr.Term_all(app);
}
}
catch (Exception e) {usr_dlg.Warn_many("", "", "app launch failed: ~{0}", Err_.Message_gplx_full(e));}

View File

@@ -1,25 +0,0 @@
/*
XOWA: the XOWA Offline Wiki Application
Copyright (C) 2012 gnosygnu@gmail.com
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.xowa.apps.cfgs.dbs; import gplx.*; import gplx.xowa.*; import gplx.xowa.apps.*; import gplx.xowa.apps.cfgs.*;
public class Xocfg_data_itm {
public Xocfg_data_itm(String key, String usr, String ctx, String val) {this.key = key; this.usr = usr; this.ctx = ctx; this.val = val;}
public String Key() {return key;} private final String key;
public String Usr() {return usr;} private final String usr;
public String Ctx() {return ctx;} private String ctx;
public String Val() {return val;} private String val;
}

View File

@@ -1,50 +0,0 @@
/*
XOWA: the XOWA Offline Wiki Application
Copyright (C) 2012 gnosygnu@gmail.com
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.xowa.apps.cfgs.dbs; import gplx.*; import gplx.xowa.*; import gplx.xowa.apps.*; import gplx.xowa.apps.cfgs.*;
import gplx.dbs.*;
public class Xocfg_data_tbl implements Rls_able {
private final String tbl_name; public final Dbmeta_fld_list flds = new Dbmeta_fld_list();
private final String fld_key, fld_usr, fld_ctx, fld_val;
private final Db_conn conn;
public Xocfg_data_tbl(Db_conn conn) {
this.conn = conn;
tbl_name = Tbl_name;
fld_key = flds.Add_str_pkey ("cfg_key", 1024); // EX: "xowa.net.web_enabled"
fld_usr = flds.Add_str ("cfg_usr", 1024); // EX: "xowa_user"
fld_ctx = flds.Add_str ("cfg_ctx", 1024); // EX: "app"
fld_val = flds.Add_str ("cfg_val", 4096); // EX: "y"
}
public void Create_tbl() {conn.Meta_tbl_create(Dbmeta_tbl_itm.New(tbl_name, flds));}
public void Insert(String key, String usr, String ctx, String val) {
Db_stmt stmt_insert = conn.Stmt_insert(tbl_name, flds);
stmt_insert.Clear().Val_str(fld_key, key).Val_str(fld_usr, usr).Val_str(fld_ctx, ctx).Val_str(fld_val, val)
.Exec_insert();
}
public Xocfg_data_itm Select(String key, String usr, String ctx) {
Db_stmt stmt_select = conn.Stmt_select(tbl_name, flds, fld_key, fld_usr, fld_ctx);
Db_rdr rdr = stmt_select.Clear().Crt_str(fld_key, key).Crt_str(fld_usr, usr).Crt_str(fld_ctx, ctx).Exec_select__rls_auto();
try {
if (rdr.Move_next())
return new Xocfg_data_itm(key, usr, ctx, rdr.Read_str(fld_val));
else
return null;
} finally {rdr.Rls();}
}
public void Rls() {conn.Rls_conn();}
public static final String Tbl_name = "cfg_data";
}

View File

@@ -1,27 +0,0 @@
/*
XOWA: the XOWA Offline Wiki Application
Copyright (C) 2012 gnosygnu@gmail.com
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.xowa.apps.cfgs.dbs; import gplx.*; import gplx.xowa.*; import gplx.xowa.apps.*; import gplx.xowa.apps.cfgs.*;
public class Xocfg_meta_itm {
public Xocfg_meta_itm(String key, String type, String dflt, String version) {
this.key = key; this.type = type; this.dflt = dflt; this.version = version;
}
public String Key() {return key;} private final String key;
public String Type() {return type;} private String type;
public String Dflt() {return dflt;} private String dflt;
public String Version() {return version;} private String version;
}

View File

@@ -1,40 +0,0 @@
/*
XOWA: the XOWA Offline Wiki Application
Copyright (C) 2012 gnosygnu@gmail.com
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.xowa.apps.cfgs.dbs; import gplx.*; import gplx.xowa.*; import gplx.xowa.apps.*; import gplx.xowa.apps.cfgs.*;
import gplx.dbs.*;
public class Xocfg_meta_tbl implements Rls_able {
private final String tbl_name; public final Dbmeta_fld_list flds = new Dbmeta_fld_list();
private final String fld_key, fld_type, fld_dflt, fld_version;
private final Db_conn conn;
public Xocfg_meta_tbl(Db_conn conn) {
this.conn = conn;
tbl_name = Tbl_name;
fld_key = flds.Add_str_pkey ("cfg_key" , 1024); // EX: "xowa.net.web_enabled"
fld_type = flds.Add_str ("cfg_type" , 255); // EX: "yn"
fld_dflt = flds.Add_str ("cfg_dflt" , 1024); // EX: "n"
fld_version = flds.Add_str ("cfg_version" , 16); // EX: "v1.1.1.1"
}
public void Create_tbl() {conn.Meta_tbl_create(Dbmeta_tbl_itm.New(tbl_name, flds));}
public void Insert(String key, String type, String dflt, String version) {
Db_stmt stmt_insert = conn.Stmt_insert(tbl_name, flds);
stmt_insert.Clear().Val_str(fld_key, key).Val_str(fld_type, type).Val_str(fld_dflt, dflt).Val_str(fld_version, version)
.Exec_insert();
}
public void Rls() {}
public static final String Tbl_name = "cfg_meta";
}