Last modified: 2006-01-04 12:36:46 UTC
I will attach a improved perl script version of the maintenance/delete-idle-wiki-users.pl I will also attach a php version of the same script. Both have been corrected for MW 1.5.x
Created attachment 1245 [details] A much improved perl version of the original script
Created attachment 1246 [details] The PHP version of the script (with better naming and stuff)
Can we have it as a unified diff to the existing file in CVS? Patch against 1.5, obviously.
(In reply to comment #3) > Can we have it as a unified diff to the existing file in CVS? Patch against 1.5, > obviously. They're new files so a diff isn't needed.
Just to comment on the logic, they're two 1.4 branch maintenance scripts that delete all users that don't have any edits. That might not be desireable on some wikis (especially Wikimedia ones) since one wouldn't want to delete recently created users, or any at all..
(In reply to comment #4) > They're new files so a diff isn't needed. Whoops. ;-)
The first is an updated version of the existing file. Just overwrite the old file and call a "CVS diff" before committing. The second one is a new file.
Someone marked this as version 1.4 but this is only for 1.5 versions. Please just add the PHP file to the repository and remove the perl file from repository. It's as simple as that.
(In reply to comment #8) > Someone marked this as version 1.4 but this is only for 1.5 versions. > Please just add the PHP file to the repository and remove the perl file from > repository. > It's as simple as that. The PHP file appears to be using the old schema, and hence is _NOT_ for 1.5.x branch. This can't be committed to REL_1_5 or HEAD in that state.
Then it really needs a review, because as far as I know, that IS the 1.5 schema. We need a guru here :)
Comment on attachment 1246 [details] The PHP version of the script (with better naming and stuff) Uses old schema, obsolete.
Comment on attachment 1245 [details] A much improved perl version of the original script Uses old schema, obsolete.
Writing a new version of the PHP script now.
A couple notes on the PHP version: * the table to check in 1.5 is 'revision', not 'cur' and 'old'. * you should absolutely *not* do stuff like this: $dbw->numRows($dbw->query("SELECT * FROM $cur ...")); That's reaaaally inefficient if the user *does* have contributions -- especially if they have a very large number. Instead, use SELECT COUNT(*) and retrieve the number.
Done, committed to HEAD and backported to 1.5.