X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2FEditPage.php;h=482fcc636c429c62f7e7d37ad846a7b7183b821e;hb=dc96de06464ebd353dd5c45ee9157afce11ddd94;hp=14550682a557f8bd2272143a4e2cbe8a3a642de7;hpb=16f1acae07c4587e7ec22061bc242114712fcf34;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/EditPage.php b/includes/EditPage.php index 14550682a5..482fcc636c 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -2065,7 +2065,7 @@ class EditPage { if ( $changingContentModel ) { $this->addContentModelChangeLogEntry( $wgUser, - $oldContentModel, + $new ? false : $oldContentModel, $this->contentModel, $this->summary ); @@ -2076,12 +2076,13 @@ class EditPage { /** * @param User $user - * @param string $oldModel + * @param string|false $oldModel false if the page is being newly created * @param string $newModel * @param string $reason */ protected function addContentModelChangeLogEntry( User $user, $oldModel, $newModel, $reason ) { - $log = new ManualLogEntry( 'contentmodel', 'change' ); + $new = $oldModel === false; + $log = new ManualLogEntry( 'contentmodel', $new ? 'new' : 'change' ); $log->setPerformer( $user ); $log->setTarget( $this->mTitle ); $log->setComment( $reason );