[MediaWiki-l] deleteOldRevisions.php is an accident waiting to happen

Jean Valjean jeanvaljean2718 at gmail.com
Sat Jul 1 04:07:14 UTC 2017

Today, a friend of mine had a few really long wiki pages whose revision
histories he wanted to delete (specifically, chapters 1-117 of The Count of
Monte Cristo), to save some space in his database. So, he went to do php
deleteOldRevisions.php --delete and then, oops, his finger slipped, and he
accidentally hit enter when he meant to enter the page IDs. So he lost the
old revisions for every page on his wiki. (See
https://www.mediawiki.org/wiki/Manual:DeleteOldRevisions.php )

I think back to how, over the past months, he spent countless hours putting
a detailed edit comment for almost every single revision, including wry
remarks; friendly banter; Twitter-style 140-character social commentary and
provocative philosophical musings on the meaning of life and the universe,
and whatnot; and now all those are gone. (Now I feel smart for never
bothering to enter any edit summaries on that wiki.)

I'm thinking, it's probably best for the script to ask "Are you sure
(y/n)?" when the user doesn't put any page IDs.

The script should also probably have a parameter to allow the page titles
to be read from a text file, kind of like what deleteBatch.php offers.
https://www.mediawiki.org/wiki/Manual:DeleteBatch.php That would probably
mitigate the potential for screw-ups.

More information about the MediaWiki-l mailing list