https://bugzilla.wikimedia.org/show_bug.cgi?id=4488
Andrew Garrett <and...@epstone.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |and...@epstone.net AssignedTo|robc...@gmail.com |paul.copper...@googlemail.co | |m Status|ASSIGNED |NEW --- Comment #8 from Andrew Garrett <and...@epstone.net> 2009-03-04 06:17:05 UTC --- Proposed patch seems to include a strange movement of watch/unwatch logic to the Title object. This doesn't make sense, because you watch the article, not the title. - # If there were errors, bail out now - if( !empty( $errors ) ) - return $errors; - return $this->commitRollback($fromP, $summary, $bot, $resultDetails); + if( empty( $errors ) ) { + $errors = $this->commitRollback($fromP, $summary, $bot, $resultDetails); + } + if( empty( $errors ) && $wgUser->getOption( 'watchrollback' ) && !$this->mTitle->userIsWatching() ) { + $this->doWatch(); + } + return $errors; I think I like the early bail-out better. It avoids the clutter of checking empty($errors). Also, you should check count($errors)==0, not empty($errors). empty() is used for a cast to bool with warnings suppressed. If you didn't want to do that, you should use count() explicitly. It would be cool if you could work the 'create' toggle into the rest of the logic in Preferences, which is quite elegant compared to the current version. Otherwise, the patch is pretty good. I may fix this stuff up over the coming days and commit it, if you don't get to it first. -- 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 Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l