Reset ID before adding to log. That way it goes in as 0 for deletions. RC save()...
authorAaron Schulz <aaron@users.mediawiki.org>
Fri, 11 Apr 2008 23:42:09 +0000 (23:42 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Fri, 11 Apr 2008 23:42:09 +0000 (23:42 +0000)
includes/Article.php

index 78387da..3f3cdff 100644 (file)
@@ -2343,14 +2343,15 @@ class Article {
                # Clear caches
                Article::onArticleDelete( $this->mTitle );
 
+               # Clear the cached article id so the interface doesn't act like we exist
+               $this->mTitle->resetArticleID( 0 );
+               $this->mTitle->mArticleID = 0;
+
                # Log the deletion, if the page was suppressed, log it at Oversight instead
                $logtype = $suppress ? 'suppress' : 'delete';
                $log = new LogPage( $logtype );
                $log->addEntry( 'delete', $this->mTitle, $reason );
-
-               # Clear the cached article id so the interface doesn't act like we exist
-               $this->mTitle->resetArticleID( 0 );
-               $this->mTitle->mArticleID = 0;
+               
                return true;
        }