On 25/08/10 22:45, Aryeh Gregor wrote:
> On Wed, Aug 25, 2010 at 4:36 PM, lampak<[email protected]>  wrote:
>> Editors aren't. This is because they are autopromoted in
>> ArticleSaveComplete hook instead of GetAutoPromoteGroups. What I'm
>> asking for is moving autoreview autopromotion to the same hook so both
>> groups would behave in the same way.
>
> Oh, blech, FlaggedRevs reinvented the wheel and made up its own
> autopromote system.  At a glance, it looks like it's hardcoded to only
> work for the editor group, so no, it can't be reused for other groups
> without some refactoring.  It should really be refactored to work for
> all groups, but some of the checks are pretty expensive -- looks like
> maybeMakeEditor() in FlaggedRevs.hooks.php can run several database
> queries in some cases.

I'm not looking for code to autopromote to any arbitrary groups - just 
the two: editor and autoreview. Can't it be re-hardcoded then?

Speaking of database queries: currently (unless there's some hidden 
caching I can't see), the same queries, like the test for 
totalCheckedEdits, are done twice - in maybeMakeEditor and 
checkAutoPromote. Merging both functions could only decrease their number.

BTW, maybe they have reinvented the wheel, but the new wheel clearly 
works better.

lampak


_______________________________________________
Wikitech-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to