Merge "multi dbms support in api"
[lhc/web/wiklou.git] / includes / api / ApiQueryWatchlistRaw.php
index ce4ce50..5e96dd5 100644 (file)
@@ -76,12 +76,12 @@ class ApiQueryWatchlistRaw extends ApiQueryGeneratorBase {
                                        "original value returned by the previous query", "_badcontinue" );
                        }
                        $ns = intval( $cont[0] );
-                       $title = $this->getDB()->strencode( $this->titleToKey( $cont[1] ) );
+                       $title = $this->getDB()->addQuotes( $this->titleToKey( $cont[1] ) );
                        $op = $params['dir'] == 'ascending' ? '>' : '<';
                        $this->addWhere(
-                               "wl_namespace $op '$ns' OR " .
-                               "(wl_namespace = '$ns' AND " .
-                               "wl_title $op= '$title')"
+                               "wl_namespace $op $ns OR " .
+                               "(wl_namespace = $ns AND " .
+                               "wl_title $op= $title)"
                        );
                }