Quote timestamp column: may not be numeric.
authorGreg Sabino Mullane <greg@users.mediawiki.org>
Tue, 13 Mar 2007 23:59:34 +0000 (23:59 +0000)
committerGreg Sabino Mullane <greg@users.mediawiki.org>
Tue, 13 Mar 2007 23:59:34 +0000 (23:59 +0000)
includes/SpecialNewimages.php

index b41ff56..817d649 100644 (file)
@@ -87,10 +87,10 @@ function wfSpecialNewimages( $par, $specialPage ) {
 
        $invertSort = false;
        if( $until = $wgRequest->getVal( 'until' ) ) {
-               $where[] = 'img_timestamp < ' . $dbr->timestamp( $until );
+               $where[] = "img_timestamp < '" . $dbr->timestamp( $until ) . "'";
        }
        if( $from = $wgRequest->getVal( 'from' ) ) {
-               $where[] = 'img_timestamp >= ' . $dbr->timestamp( $from );
+               $where[] = "img_timestamp >= '" . $dbr->timestamp( $from ) . "'";
                $invertSort = true;
        }
        $sql='SELECT img_size, img_name, img_user, img_user_text,'.