mirror of
https://github.com/gnosygnu/xowa.git
synced 2026-03-02 03:49:30 +00:00
Personal_wikis: Add page delete; refactor category updates
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
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.specials.deletes; import gplx.*; import gplx.xowa.*; import gplx.xowa.specials.*;
|
||||
import gplx.xowa.specials.*; import gplx.xowa.wikis.nss.*;
|
||||
import gplx.core.net.qargs.*;
|
||||
public class Xodel_page_special implements Xow_special_page {
|
||||
public void Special__gen(Xow_wiki wikii, Xoa_page pagei, Xoa_url url, Xoa_ttl ttl) {
|
||||
Xowe_wiki wiki = (Xowe_wiki)wikii; Xoae_page page = (Xoae_page)pagei;
|
||||
|
||||
Gfo_qarg_mgr url_args = new Gfo_qarg_mgr().Init(url.Qargs_ary());
|
||||
byte[] page_title_bry = url_args.Read_bry_or_fail("delete");
|
||||
Xoa_ttl page_title = wiki.Ttl_parse(page_title_bry);
|
||||
|
||||
gplx.xowa.addons.wikis.directorys.specials.items.bldrs.Xopg_db_mgr.Delete(wiki, page_title);
|
||||
|
||||
wiki.Data_mgr().Redirect(page, wiki.Props().Main_page());
|
||||
}
|
||||
|
||||
public static final String SPECIAL_KEY = "XowaPageDelete";
|
||||
public static final byte[] Display_ttl = Bry_.new_a7("Delete Page");
|
||||
public Xow_special_meta Special__meta() {return new Xow_special_meta(Xow_special_meta_.Src__mw, SPECIAL_KEY);}
|
||||
public static final Xow_special_page Prototype = new Xodel_page_special();
|
||||
public Xow_special_page Special__clone() {return this;}
|
||||
}
|
||||
Reference in New Issue
Block a user