Last modified: 2006-01-04 12:36:46 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T6417, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 4417 - Improved script to delete idle user accounts
Improved script to delete idle user accounts
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
unspecified
All All
: Normal enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-12-29 10:59 UTC by Amilcar do Carmo Lucas
Modified: 2006-01-04 12:36 UTC (History)
0 users

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
A much improved perl version of the original script (5.44 KB, text/plain)
2005-12-29 11:00 UTC, Amilcar do Carmo Lucas
Details
The PHP version of the script (with better naming and stuff) (2.84 KB, text/plain)
2005-12-29 11:01 UTC, Amilcar do Carmo Lucas
Details

Description Amilcar do Carmo Lucas 2005-12-29 10:59:25 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
Comment 1 Amilcar do Carmo Lucas 2005-12-29 11:00:33 UTC
Created attachment 1245 [details]
A much improved perl version of the original script
Comment 2 Amilcar do Carmo Lucas 2005-12-29 11:01:33 UTC
Created attachment 1246 [details]
The PHP version of the script (with better naming and stuff)
Comment 3 Rob Church 2005-12-29 16:24:26 UTC
Can we have it as a unified diff to the existing file in CVS? Patch against 1.5,
obviously.
Comment 4 Ævar Arnfjörð Bjarmason 2005-12-29 16:26:19 UTC
(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.
Comment 5 Ævar Arnfjörð Bjarmason 2005-12-29 16:44:59 UTC
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..
Comment 6 Rob Church 2005-12-29 16:47:23 UTC
(In reply to comment #4)
> They're new files so a diff isn't needed.

Whoops. ;-)

Comment 7 Amilcar do Carmo Lucas 2005-12-29 16:58:47 UTC
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. 
 
Comment 8 Amilcar do Carmo Lucas 2006-01-03 17:11:16 UTC
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.
Comment 9 Rob Church 2006-01-04 11:17:12 UTC
(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.
Comment 10 Amilcar do Carmo Lucas 2006-01-04 11:43:47 UTC
Then it really needs a review, because as far as I know, that IS the 1.5 schema.
We need a guru here :)
Comment 11 Brion Vibber 2006-01-04 11:56:55 UTC
Comment on attachment 1246 [details]
The PHP version of the script (with better naming and stuff)

Uses old schema, obsolete.
Comment 12 Brion Vibber 2006-01-04 11:57:18 UTC
Comment on attachment 1245 [details]
A much improved perl version of the original script

Uses old schema, obsolete.
Comment 13 Rob Church 2006-01-04 11:57:56 UTC
Writing a new version of the PHP script now.
Comment 14 Brion Vibber 2006-01-04 12:04:00 UTC
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.
Comment 15 Rob Church 2006-01-04 12:36:46 UTC
Done, committed to HEAD and backported to 1.5.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links