From fd99384717b82bdfebcf28919fd10e30d00f3349 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Sat, 28 Feb 2009 04:50:26 +0000 Subject: [PATCH] Made resetArticleID( 0 ) actually set the ID to zero. "false" can be used to unload (set to -1) it. --- includes/Article.php | 1 - includes/Title.php | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/includes/Article.php b/includes/Article.php index b45005776b..f236de5a91 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -2576,7 +2576,6 @@ class Article { # 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'; diff --git a/includes/Title.php b/includes/Title.php index 616aebd553..097e9ef9ac 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -2110,7 +2110,7 @@ class Title { $linkCache = LinkCache::singleton(); $linkCache->clearBadLink( $this->getPrefixedDBkey() ); - if ( 0 == $newid ) { $this->mArticleID = -1; } + if ( $newid === false ) { $this->mArticleID = -1; } else { $this->mArticleID = $newid; } $this->mRestrictionsLoaded = false; $this->mRestrictions = array(); -- 2.20.1