Page MenuHomePhabricator

Remove articles matching SQL LIKE pattern
Closed, ResolvedPublic

Description

Author: philharnish

Description:
This patch adds another text box to enter an SQL LIKE style pattern. Submitting
something like %s% will give a list of matching pages where you can provide a
reason and then delete them.

(Adding patch in a comment)


Version: unspecified
Severity: enhancement

Details

Reference
bz5835

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 9:12 PM
bzimport set Reference to bz5835.

philharnish wrote:

Patches /extensions/SpecialNuke.php HEAD

Patches the HEAD version of /extensions/SpecialNuke.php

Attached:

I worry that it's a little too easy to accidentally nuke your whole wiki with this... :)

robchur wrote:

(In reply to comment #2)

I worry that it's a little too easy to accidentally nuke your whole wiki with

this... :)

Indeed. How about, then, if the special page produced a list of all pages which
would be affected in the delete operation, and gives the user the option to
deselect precious pages, false matches due to their crap regular expression, or
abort the entire operation?

Woha, this is an old patch o_O

I'm going to see if I can apply it; will need some modifications as it's using functions that no longer exist :)

I implemented the functionality added in this patch, although I ended up not using the code proposed here. See r102665

Thanks for the patch though :)

We should reconsider the syntax used for this. SQL LIKE syntax is not what most users are going to be expecting here. At the very least, the field should adequately explain the syntax.

Aye, this kind of pattern matching seems like the sort of thing with a very specific target audience and use case even if folks do know what it is. Perhaps also turning this into an option that can be enabled with a hook for those who want it would work better? I understand that adding something more consistent with other pattern matching typical of mediawiki extensions such as regex which would be much harder to implement, unfortunately, though a prefixindex might be easier?

The feature was implemented exactly as initially devised in this enhancement request. Bug 35783 complains about the user unfriendliness, so closing this and leaving the unfriendliness for Bug 35783.