--- Comment #1 from lampak <llam...@gmail.com> 2010-08-30 10:07:57 UTC ---
Created attachment 7660
(discussion which resulted in filing the bug:
I have written the first patch, i.e. the one on MediaWiki core side.
The autopromotion can be now done like:
$wgHooks['ArticleSaveComplete'] = array (
array( 'somegroup' => array(APCOND_EDITCOUNT, 100) )
The format of conditions is the same as $wgAutopromote. The differences are:
* The group can be removed from a user via Special:UserRights.
* The user is not autopromoted to the groups he/she has once belonged to.
* The user won't lose the group automatically if he/she no longer meets the
* The Autopromote::autopromoteOnceHook() function can be assigned to any hook
so autopromotion is "only checked on certain events". The function simply calls
a new method User::autopromoteOnce() on $wgUser so if there's such need a
custom function may be written.
My autopromotion mechanism is separate from $wgAutopromote, though it uses the
same format of conditions.
And I had to create a new database table: user_former_groups. It's actually a
clone of user_groups but stores the groups the user has once belonged to, not
necessarily belongs now.
I haven't tested if the table is created properly on anything different then
MySQL (though it should work on sqlite and postgres because it's actually
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
Wikibugs-l mailing list