Fix hardcode database quotes in Special:Watchlist
authorumherirrender <umherirrender_de.wp@web.de>
Sun, 13 Jan 2013 19:35:28 +0000 (20:35 +0100)
committerGerrit Code Review <gerrit@wikimedia.org>
Fri, 18 Jan 2013 18:25:22 +0000 (18:25 +0000)
Change-Id: I0d53a24b35a855a541fb73d8bbfcace9de74e549

includes/specials/SpecialWatchlist.php

index 3cfa31f..afa3986 100644 (file)
@@ -196,7 +196,7 @@ class SpecialWatchlist extends SpecialPage {
                $conds = array();
 
                if( $values['days'] > 0 ) {
-                       $conds[] = "rc_timestamp > '".$dbr->timestamp( time() - intval( $values['days'] * 86400 ) )."'";
+                       $conds[] = 'rc_timestamp > ' . $dbr->addQuotes( $dbr->timestamp( time() - intval( $values['days'] * 86400 ) ) );
                }
 
                # If the watchlist is relatively short, it's simplest to zip