IS NOT NULL is not needed here; NULL entries in SQL by definition don't match compari...
authorBrion Vibber <brion@users.mediawiki.org>
Mon, 22 Jan 2007 18:59:08 +0000 (18:59 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Mon, 22 Jan 2007 18:59:08 +0000 (18:59 +0000)
Also removed unneeded reference (=&)

includes/Title.php

index cf1f446..3f7f882 100644 (file)
@@ -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__ );
        }
 
        /**