Merge "Make wgDisableAnonTalk disable anon links in automatic edit summaries"
[lhc/web/wiklou.git] / includes / page / WikiPage.php
index 3e2f464..fea1bf6 100644 (file)
@@ -41,6 +41,8 @@ use Wikimedia\Rdbms\LoadBalancer;
  *
  * Some fields are public only for backwards-compatibility. Use accessors.
  * In the past, this class was part of Article.php and everything was public.
+ *
+ * @phan-file-suppress PhanAccessMethodInternal Due to the use of DerivedPageDataUpdater
  */
 class WikiPage implements Page, IDBAccessObject {
        // Constants for $mDataLoadedFrom and related
@@ -68,7 +70,9 @@ class WikiPage implements Page, IDBAccessObject {
         */
        public $mLatest = false;
 
-       /** @var PreparedEdit Map of cache fields (text, parser output, ect) for a proposed/new edit */
+       /**
+        * @var PreparedEdit|false Map of cache fields (text, parser output, ect) for a proposed/new edit
+        */
        public $mPreparedEdit = false;
 
        /**
@@ -2390,7 +2394,7 @@ class WikiPage implements Page, IDBAccessObject {
                if ( !is_null( $nullRevision ) ) {
                        $logEntry->setAssociatedRevId( $nullRevision->getId() );
                }
-               $logEntry->setTags( $tags );
+               $logEntry->addTags( $tags );
                if ( $logRelationsField !== null && count( $logRelationsValues ) ) {
                        $logEntry->setRelations( [ $logRelationsField => $logRelationsValues ] );
                }
@@ -2791,7 +2795,7 @@ class WikiPage implements Page, IDBAccessObject {
                        $logEntry->setPerformer( $deleter );
                        $logEntry->setTarget( $logTitle );
                        $logEntry->setComment( $reason );
-                       $logEntry->setTags( $tags );
+                       $logEntry->addTags( $tags );
                        $logid = $logEntry->insert();
 
                        $dbw->onTransactionPreCommitOrIdle(