From: Alexandre Emsenhuber Date: Tue, 3 Jan 2012 20:15:45 +0000 (+0000) Subject: Per Aaron, fix for r107771: Title::getTouched() should return false on non-existing... X-Git-Tag: 1.31.0-rc.0~25583 X-Git-Url: http://git.cyclocoop.org//%22%22._DIR_PLUGIN_FULLCALENDAR.%22prive/themes/spip/images/event_edit.png/%22?a=commitdiff_plain;h=e40e80e74e3cf4251f1858113688ab67abebc94a;p=lhc%2Fweb%2Fwiklou.git Per Aaron, fix for r107771: Title::getTouched() should return false on non-existing page --- diff --git a/includes/Title.php b/includes/Title.php index a165a4089a..ba8fba0a5b 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -342,7 +342,7 @@ class Title { $this->mRedirect = false; $this->mLatestID = 0; $this->mCounter = 0; - $this->mTouched = '19700101000000'; + $this->mTouched = false; $this->mIsNew = false; $this->mOldRestrictions = false; $this->mLoadedLevel = 2; @@ -3043,7 +3043,7 @@ class Title { $this->mLength = -1; $this->mLatestID = false; $this->mCounter = false; - $this->mTouched = '19700101000000'; + $this->mTouched = null; $this->mIsNew = null; $this->mEstimateRevisions = null; $this->mLoadedLevel = 0; diff --git a/includes/WikiPage.php b/includes/WikiPage.php index fd606fdfbd..b669af099f 100644 --- a/includes/WikiPage.php +++ b/includes/WikiPage.php @@ -499,7 +499,11 @@ class WikiPage extends Page { if ( !$this->mDataLoaded ) { $this->loadPageData(); } - return $this->mTitle->getTouched(); + $timestamp = $this->mTitle->getTouched(); + if ( $timestamp === false ) { + $timestamp = '19700101000000'; + } + return $timestamp; } /**