Last modified: 2006-08-03 04:52:47 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 5585 - Makesysop outputs a completely different log entry than Userrights
Makesysop outputs a completely different log entry than Userrights
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
Makesysop (Other open bugs)
unspecified
All All
: Normal minor with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
: patch, patch-need-review
: 6145 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-04-15 18:10 UTC by Rotem Liss
Modified: 2006-08-03 04:52 UTC (History)
1 user (show)

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


Attachments
Patch (2.36 KB, patch)
2006-04-15 18:17 UTC, Rotem Liss
Details

Description Rotem Liss 2006-04-15 18:10:10 UTC
Userrights output matches to "bureaucratlogentry" (which is 'changed group
membership for $1 from $2 to $3'). It outputs the old permissions (with comma
and space between them) to $2, and the new permissions (the same pattern) to $3
(actually, these are $parameters) – with no further comments (the field
"log_comment" in the table "logging" is unused). It looks like:

21:34, 6 October 2005 Datrio changed group membership for User:Datrio@jawiki
from to checkuser

Makesysop output doesn't match to "bureaucratlogentry". It outputs "+sysop", and
"+bureaucrat" if needed, to the comment ("log_comment"), and outputs no
parameters, and that means with no $2 and $3 parameters. It looks like (copied
from [[m:Special:Log/rights]]):

23:51, 2 October 2005 Daniel Mayer changed group membership for User:Daniel
Mayer from $2 to $3 (+sysop)

Which is not very pretty. It should look like:

23:51, 2 October 2005 Daniel Mayer changed group membership for User:Daniel
Mayer from to sysop

Becuase most of the wikis, excluding Meta, don't use Userrights because they
don't have any Sterwards, most of them has changed "bureaucratlogentry" to
something else – but I strongly prefer an out-of-box fix. I suggest to fix
Makesysop so it will output the standard log entry.

I've created a patch doing that, and tested it. I will upload it in a moment.

I suggest you also run a script for Wikimedia sites for fixing the old entries
(although it is not mandatory), doing that for every row in the table "logging":

* Checking if "log_type" equals to "rights", "log_action" equals to "rights",
"log_comments" isn't empty and "log_params" is empty in this line - else,
continuing.
* Setting "log_params" as two parameters:
** Old parameters – nothing.
** New parameters – if "log_comments" includes "+sysop" (which is actually
mandatory), write "sysop"; if it also includes "+bureaucrat", write ", buearucrat".
* Setting "log_comment" to empty.
* Moving to next row.

Thanks a lot, and even if you don't run the script, please check in the patch.
Comment 1 Rotem Liss 2006-04-15 18:17:16 UTC
Created attachment 1531 [details]
Patch

The patch fixes the bug. A description of it:
* It changes "groups" array to "oldGroups", for there will be also "newGroups".

* It changes the info storing of "oldGroups" from '$oldGroups["sysop"] = true'
to '$oldGroups[] = "sysop"', to match the later use of "newGroups"
(makeGroupNameList), which is copied from "oldGroups".
* It changes the string "rightsNotation" to the array "addedGroups" includes
all the added groups (mandatory sysop, optionally bureaucrat), for we will be
able to use "array_merge" for "newGroups" with "addedGroups" (we shouldn't read
it again from the database, should we?).
* It changes the order of the permissions granting, for "sysop" will be before
"bureaucrat", exactly like Userrights.
* It adds the function "makeGroupNameList", copied from Userrights, for we will
be able to create a proper list of the parameters.
* It changes, of course, the call to "addEntry", for it will be exactly like in
Userrights.

Please check it in, and thank you very much.
Comment 2 Rotem Liss 2006-04-15 18:18:57 UTC
Please note I've checked the patch on my computer, but you may want to review it
by yourselves.
Comment 3 Rotem Liss 2006-05-15 13:42:19 UTC
Could you please check in the patch, or at least say if there's something wrong
with it? Thanks.
Comment 4 Rotem Liss 2006-08-02 06:56:57 UTC
*** Bug 6145 has been marked as a duplicate of this bug. ***
Comment 5 Brion Vibber 2006-08-03 04:52:47 UTC
Applied in r15928

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


Navigation
Links