From ae473c2330ed34efc62139f6fd49f8020aba214e Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Mon, 22 Jan 2007 18:59:08 +0000 Subject: [PATCH] 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 (=&) --- includes/Title.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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__ ); } /** -- 2.20.1