Page MenuHomeMiraheze

Centralise wiki creation/deletion/rename code
Open, LowPublic


Currently wikis are created by code in SpecialCreateWiki.php, deleted and renamed in their respective maintenance scripts.

We should make a new object similar to RemoteWiki or even overhaul RemoteWiki to handle the creation of a new wiki or creation of a wiki object then using said object allow the deletion, rename, accessing of variables and other operations (like changeSetting or addExtension/removeExtension?).

Event Timeline

John created this task.Dec 18 2018, 15:30
John triaged this task as Low priority.
Paladox added a subscriber: Paladox.Dec 18 2018, 15:44
John added a comment.Dec 19 2018, 23:57

Just a new thought now in line with deletion overhaul, let's kill deleted.dblist and add a new column to cw_wikis called "wiki_deletion" which is a 0,1 colum where 0 is "not up for deletion" while 1 is "up for deletion". So if wiki_deletion is true, the wiki "doesn't exist" with respect to being accessible but it exists. Would make enforcing dormancy policy so much easier and allow us to give wikis breathing space by non-intrusively and non-unrecoverable "deleting" wikis. Could may even add a timestamp column so a wiki is never deleted by deleteWiki until a week has passed? Just throwing ideas there.

Void added a subscriber: Void.Dec 20 2018, 00:03

Should the value be modifiable by Special:ManageWiki?

John added a comment.EditedDec 20 2018, 00:09
In T3898#74881, @Void wrote:

Should the value be modifiable by Special:ManageWiki?

Yes, "delete wiki" button.
Probably followed with a "deletable wikis" special page that lists all wikis with wiki_deletion as one, when it was set and when it becomes "deletable" together with an "undelete" button so total deletion/undeletion can be controlled on wiki.

Would introduce on wiki logging of all "wiki deletions" and the code will refuse to ever delete a wiki that isn't marked for deletion. Can be overridden by a sysadmin if the wiki was marked for deletion less than 7 days ago though, unsure if via the script - might make it only possible through the WikiManager object (this code?)

@John The wiki deletion would only delete it from the tables, not drop it right?

John added a comment.Dec 20 2018, 12:19

@John The wiki deletion would only delete it from the tables, not drop it right?

It wouldn’t even delete it from tables. It would just make it not appear in all.dblist