From: Brion Vibber Date: Mon, 22 Jan 2007 18:59:08 +0000 (+0000) Subject: IS NOT NULL is not needed here; NULL entries in SQL by definition don't match compari... X-Git-Tag: 1.31.0-rc.0~54221 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/modifier.php?a=commitdiff_plain;h=ae473c2330ed34efc62139f6fd49f8020aba214e;p=lhc%2Fweb%2Fwiklou.git IS NOT NULL is not needed here; NULL entries in SQL by definition don't match comparisons other than IS NULL. Also removed unneeded reference (=&) --- diff --git a/includes/Title.php b/includes/Title.php index cf1f446a9b..3f7f882adc 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -1514,10 +1514,10 @@ class Title { * Purge expired restrictions from the page_restrictions table */ static function purgeExpiredRestrictions() { - $dbw =& wfGetDB( DB_MASTER ); - - // Make sure we don't purge NULL pr_expiry, or we'll empty the pr_restrictions table of older protects. - $dbw->delete( 'page_restrictions', array( 'pr_expiry < ' . $dbw->addQuotes( $dbw->timestamp() ), 'pr_expiry IS NOT NULL' ), __METHOD__ ); + $dbw = wfGetDB( DB_MASTER ); + $dbw->delete( 'page_restrictions', + array( 'pr_expiry < ' . $dbw->addQuotes( $dbw->timestamp() ) ), + __METHOD__ ); } /**