Merge "Create ChangeTagsUpdate hook"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Wed, 28 Sep 2016 02:25:23 +0000 (02:25 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Wed, 28 Sep 2016 02:25:23 +0000 (02:25 +0000)
1  2 
includes/changes/RecentChange.php

@@@ -333,7 -333,7 +333,7 @@@ class RecentChange 
  
                if ( count( $this->tags ) ) {
                        ChangeTags::addTags( $this->tags, $this->mAttribs['rc_id'],
-                               $this->mAttribs['rc_this_oldid'], $this->mAttribs['rc_logid'], null );
+                               $this->mAttribs['rc_this_oldid'], $this->mAttribs['rc_logid'], null, $this );
                }
  
                # Notify external application via UDP
         *
         * @since 1.28
         *
 -       * @param array $tags
 +       * @param string|array $tags
         */
        public function addTags( $tags ) {
 -              $this->tags = array_merge( $tags, $this->tags );
 +              if ( is_string( $tags ) ) {
 +                      $this->tags[] = $tags;
 +              } else {
 +                      $this->tags = array_merge( $tags, $this->tags );
 +              }
        }
  }