From: Aaron Schulz Date: Fri, 11 Apr 2008 23:42:09 +0000 (+0000) Subject: Reset ID before adding to log. That way it goes in as 0 for deletions. RC save()... X-Git-Tag: 1.31.0-rc.0~48430 X-Git-Url: http://git.cyclocoop.org/%40spipnet%40?a=commitdiff_plain;h=e9d2f559014f30d3e33ae6e4db468fe12ed134af;p=lhc%2Fweb%2Fwiklou.git 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. --- 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; }