From: Tim Starling Date: Sat, 25 Jun 2005 13:40:38 +0000 (+0000) Subject: don't use the database to check if special pages were deleted X-Git-Tag: 1.5.0beta1~30 X-Git-Url: http://git.cyclocoop.org/data/%24self?a=commitdiff_plain;h=11dae0f11e764d55c134289f46b53adb09cc0558;p=lhc%2Fweb%2Fwiklou.git don't use the database to check if special pages were deleted --- diff --git a/includes/Title.php b/includes/Title.php index e84c236f66..9348d34e2c 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -1072,9 +1072,13 @@ class Title { */ function isDeleted() { $fname = 'Title::isDeleted'; - $dbr =& wfGetDB( DB_SLAVE ); - $n = $dbr->selectField( 'archive', 'COUNT(*)', array( 'ar_namespace' => $this->getNamespace(), - 'ar_title' => $this->getDBkey() ), $fname ); + if ( $this->getNamespace() < 0 ) { + $n = 0; + } else { + $dbr =& wfGetDB( DB_SLAVE ); + $n = $dbr->selectField( 'archive', 'COUNT(*)', array( 'ar_namespace' => $this->getNamespace(), + 'ar_title' => $this->getDBkey() ), $fname ); + } return (int)$n; }