Clean up spacing of doc comments
[lhc/web/wiklou.git] / includes / changes / ChangesList.php
index aa6d9c9..03bb5e1 100644 (file)
@@ -88,7 +88,7 @@ class ChangesList extends ContextSource {
                $user = $context->getUser();
                $sk = $context->getSkin();
                $list = null;
-               if ( Hooks::run( 'FetchChangesList', [ $user, &$sk, &$list ] ) ) {
+               if ( Hooks::run( 'FetchChangesList', [ $user, &$sk, &$list, $groups ] ) ) {
                        $new = $context->getRequest()->getBool( 'enhanced', $user->getOption( 'usenewrc' ) );
 
                        return $new ?
@@ -662,15 +662,20 @@ class ChangesList extends ContextSource {
         * field of this revision, if it's marked as deleted.
         * @param RCCacheEntry|RecentChange $rc
         * @param int $field
-        * @param User|null $user User object to check, or null to use $wgUser
+        * @param User|null $user User object to check against. If null, the global RequestContext's
+        * User is assumed instead.
         * @return bool
         */
        public static function userCan( $rc, $field, User $user = null ) {
+               if ( $user === null ) {
+                       $user = RequestContext::getMain()->getUser();
+               }
+
                if ( $rc->mAttribs['rc_type'] == RC_LOG ) {
                        return LogEventsList::userCanBitfield( $rc->mAttribs['rc_deleted'], $field, $user );
-               } else {
-                       return Revision::userCanBitfield( $rc->mAttribs['rc_deleted'], $field, $user );
                }
+
+               return RevisionRecord::userCanBitfield( $rc->mAttribs['rc_deleted'], $field, $user );
        }
 
        /**
@@ -700,7 +705,8 @@ class ChangesList extends ContextSource {
                ) {
                        $title = $rc->getTitle();
                        /** Check for rollback permissions, disallow special pages, and only
-                        * show a link on the top-most revision */
+                        * show a link on the top-most revision
+                        */
                        if ( $title->quickUserCan( 'rollback', $this->getUser() ) ) {
                                $rev = new Revision( [
                                        'title' => $title,