From e9d2f559014f30d3e33ae6e4db468fe12ed134af Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Fri, 11 Apr 2008 23:42:09 +0000 Subject: [PATCH] Reset ID before adding to log. That way it goes in as 0 for deletions. RC save() stuff then makes values of zero become NULL. This should fix PG error. --- includes/Article.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/includes/Article.php b/includes/Article.php index 78387dad52..3f3cdffc0a 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -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; } -- 2.20.1