(bug 20275) Fixed LIKE queries on SQLite backend
[lhc/web/wiklou.git] / includes / Title.php
index 422a50b..44df731 100644 (file)
@@ -1663,8 +1663,7 @@ class Title {
 
                $dbr = wfGetDB( DB_SLAVE );
                $conds['page_namespace'] = $this->getNamespace();
-               $conds[] = 'page_title LIKE ' . $dbr->addQuotes(
-                               $dbr->escapeLike( $this->getDBkey() ) . '/%' );
+               $conds[] = 'page_title ' . $dbr->buildLike( $this->getDBkey() . '/', $dbr->anyString() );
                $options = array();
                if( $limit > -1 )
                        $options['LIMIT'] = $limit;