mirror of https://github.com/gnosygnu/xowa
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
1.9 KiB
35 lines
1.9 KiB
/*
|
|
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.addons.apps.maints.sql_execs.specials; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.apps.*; import gplx.xowa.addons.apps.maints.*; import gplx.xowa.addons.apps.maints.sql_execs.*;
|
|
import gplx.xowa.specials.*; import gplx.core.net.qargs.*;
|
|
public class Xosql_exec_special implements Xow_special_page {
|
|
public void Special__gen(Xow_wiki wiki, Xoa_page page, Xoa_url url, Xoa_ttl ttl) {
|
|
Gfo_qarg_mgr url_args = new Gfo_qarg_mgr().Init(url.Qargs_ary());
|
|
|
|
String domain = url_args.Read_str_or("domain", "[xowa.home]");
|
|
String db = url_args.Read_str_or("db", "core");
|
|
String sql = url_args.Read_str_or("sql", "SELECT * FROM xowa_cfg;");
|
|
|
|
new Xosql_exec_html(domain, db, sql).Bld_page_by_mustache(wiki.App(), page, this);
|
|
}
|
|
Xosql_exec_special(Xow_special_meta special__meta) {this.special__meta = special__meta;}
|
|
public Xow_special_meta Special__meta() {return special__meta;} private final Xow_special_meta special__meta;
|
|
public Xow_special_page Special__clone() {return this;}
|
|
public static final Xow_special_page Prototype = new Xosql_exec_special(Xow_special_meta.New_xo("XowaSql", "SQL Exec"));
|
|
}
|