Merge "Fix is_array check in ResourceLoaderImageModule"
[lhc/web/wiklou.git] / includes / changes / RecentChange.php
index 94dcd07..7f7d77d 100644 (file)
@@ -228,13 +228,14 @@ class RecentChange {
                global $wgActorTableSchemaMigrationStage;
 
                wfDeprecated( __METHOD__, '1.31' );
-               if ( $wgActorTableSchemaMigrationStage > MIGRATION_WRITE_BOTH ) {
+               if ( $wgActorTableSchemaMigrationStage & SCHEMA_COMPAT_READ_NEW ) {
                        // If code is using this instead of self::getQueryInfo(), there's a
                        // decent chance it's going to try to directly access
                        // $row->rc_user or $row->rc_user_text and we can't give it
-                       // useful values here once those aren't being written anymore.
+                       // useful values here once those aren't being used anymore.
                        throw new BadMethodCallException(
-                               'Cannot use ' . __METHOD__ . ' when $wgActorTableSchemaMigrationStage > MIGRATION_WRITE_BOTH'
+                               'Cannot use ' . __METHOD__
+                                       . ' when $wgActorTableSchemaMigrationStage has SCHEMA_COMPAT_READ_NEW'
                        );
                }
 
@@ -490,7 +491,7 @@ class RecentChange {
 
        /**
         * Notify all the feeds about the change.
-        * @param array $feeds Optional feeds to send to, defaults to $wgRCFeeds
+        * @param array|null $feeds Optional feeds to send to, defaults to $wgRCFeeds
         */
        public function notifyRCFeeds( array $feeds = null ) {
                global $wgRCFeeds;
@@ -556,7 +557,7 @@ class RecentChange {
         *
         * @param RecentChange|int $change RecentChange or corresponding rc_id
         * @param bool $auto For automatic patrol
-        * @param string|string[] $tags Change tags to add to the patrol log entry
+        * @param string|string[]|null $tags Change tags to add to the patrol log entry
         *   ($user should be able to add the specified tags before this is called)
         * @return array See doMarkPatrolled(), or null if $change is not an existing rc_id
         */
@@ -581,7 +582,7 @@ class RecentChange {
         * 'markedaspatrollederror-noautopatrol' as errors
         * @param User $user User object doing the action
         * @param bool $auto For automatic patrol
-        * @param string|string[] $tags Change tags to add to the patrol log entry
+        * @param string|string[]|null $tags Change tags to add to the patrol log entry
         *   ($user should be able to add the specified tags before this is called)
         * @return array Array of permissions errors, see Title::getUserPermissionsErrors()
         */
@@ -658,9 +659,9 @@ class RecentChange {
         * Makes an entry in the database corresponding to an edit
         *
         * @param string $timestamp
-        * @param Title &$title
+        * @param Title $title
         * @param bool $minor
-        * @param User &$user
+        * @param User $user
         * @param string $comment
         * @param int $oldId
         * @param string $lastTimestamp
@@ -674,7 +675,7 @@ class RecentChange {
         * @return RecentChange
         */
        public static function notifyEdit(
-               $timestamp, &$title, $minor, &$user, $comment, $oldId, $lastTimestamp,
+               $timestamp, $title, $minor, $user, $comment, $oldId, $lastTimestamp,
                $bot, $ip = '', $oldSize = 0, $newSize = 0, $newId = 0, $patrol = 0,
                $tags = []
        ) {
@@ -735,9 +736,9 @@ class RecentChange {
         * Note: the title object must be loaded with the new id using resetArticleID()
         *
         * @param string $timestamp
-        * @param Title &$title
+        * @param Title $title
         * @param bool $minor
-        * @param User &$user
+        * @param User $user
         * @param string $comment
         * @param bool $bot
         * @param string $ip
@@ -748,7 +749,7 @@ class RecentChange {
         * @return RecentChange
         */
        public static function notifyNew(
-               $timestamp, &$title, $minor, &$user, $comment, $bot,
+               $timestamp, $title, $minor, $user, $comment, $bot,
                $ip = '', $size = 0, $newId = 0, $patrol = 0, $tags = []
        ) {
                $rc = new RecentChange;
@@ -805,8 +806,8 @@ class RecentChange {
 
        /**
         * @param string $timestamp
-        * @param Title &$title
-        * @param User &$user
+        * @param Title $title
+        * @param User $user
         * @param string $actionComment
         * @param string $ip
         * @param string $type
@@ -818,7 +819,7 @@ class RecentChange {
         * @param string $actionCommentIRC
         * @return bool
         */
-       public static function notifyLog( $timestamp, &$title, &$user, $actionComment, $ip, $type,
+       public static function notifyLog( $timestamp, $title, $user, $actionComment, $ip, $type,
                $action, $target, $logComment, $params, $newId = 0, $actionCommentIRC = ''
        ) {
                global $wgLogRestrictions;
@@ -836,8 +837,8 @@ class RecentChange {
 
        /**
         * @param string $timestamp
-        * @param Title &$title
-        * @param User &$user
+        * @param Title $title
+        * @param User $user
         * @param string $actionComment
         * @param string $ip
         * @param string $type
@@ -851,7 +852,7 @@ class RecentChange {
         * @param bool $isPatrollable Whether this log entry is patrollable
         * @return RecentChange
         */
-       public static function newLogEntry( $timestamp, &$title, &$user, $actionComment, $ip,
+       public static function newLogEntry( $timestamp, $title, $user, $actionComment, $ip,
                $type, $action, $target, $logComment, $params, $newId = 0, $actionCommentIRC = '',
                $revId = 0, $isPatrollable = false ) {
                global $wgRequest;
@@ -932,7 +933,7 @@ class RecentChange {
         *
         * @param string $timestamp Timestamp of the recent change to occur
         * @param Title $categoryTitle Title of the category a page is being added to or removed from
-        * @param User $user User object of the user that made the change
+        * @param User|null $user User object of the user that made the change
         * @param string $comment Change summary
         * @param Title $pageTitle Title of the page that is being added or removed
         * @param int $oldRevId Parent revision ID of this change
@@ -941,7 +942,7 @@ class RecentChange {
         * @param bool $bot true, if the change was made by a bot
         * @param string $ip IP address of the user, if the change was made anonymously
         * @param int $deleted Indicates whether the change has been deleted
-        * @param bool $added true, if the category was added, false for removed
+        * @param bool|null $added true, if the category was added, false for removed
         *
         * @return RecentChange
         */