Index: trunk/extensions/Translate/tag/TranslatablePage.php |
— | — | @@ -448,13 +448,14 @@ |
449 | 449 | public function getTranslationPages() { |
450 | 450 | // Fetch the available translation pages from database |
451 | 451 | $dbr = wfGetDB( DB_SLAVE ); |
452 | | - $likePattern = $dbr->escapeLike( $this->getTitle()->getDBkey() ) . '/%%'; |
| 452 | + $prefix = $this->getTitle()->getDBkey() . '/'; |
| 453 | + $likePattern = $dbr->buildLike( $prefix, $dbr->anyString() ); |
453 | 454 | $res = $dbr->select( |
454 | 455 | 'page', |
455 | 456 | array( 'page_namespace', 'page_title' ), |
456 | 457 | array( |
457 | 458 | 'page_namespace' => $this->getTitle()->getNamespace(), |
458 | | - "page_title LIKE '$likePattern'" |
| 459 | + "page_title $likePattern" |
459 | 460 | ), |
460 | 461 | __METHOD__ |
461 | 462 | ); |
Index: trunk/extensions/Translate/tag/SpecialPageTranslation.php |
— | — | @@ -524,7 +524,7 @@ |
525 | 525 | foreach ( $changed as $c ) { |
526 | 526 | $title = Title::makeTitleSafe( NS_TRANSLATIONS, "$prefix/$c" ); |
527 | 527 | if ( $title ) { |
528 | | - $titles[] = 'page_title like \'' . $db->escapeLike( $title->getDBkey() ) . '/%\''; |
| 528 | + $titles[] = 'page_title ' . $db->buildLike( $title->getDBkey() . '/', $db->anyString() ); |
529 | 529 | } |
530 | 530 | } |
531 | 531 | |
Index: trunk/extensions/Translate/tag/SpecialPageTranslationMovePage.php |
— | — | @@ -451,7 +451,7 @@ |
452 | 452 | |
453 | 453 | $dbw = wfGetDB( DB_MASTER ); |
454 | 454 | $fields = array( 'page_namespace', 'page_title' ); |
455 | | - $titleCond = 'page_title like \'' . $dbw->escapeLike( $base ) . "/%%'"; |
| 455 | + $titleCond = 'page_title '. $dbw->buildLike( "$base/", $dbw->anyString() ); |
456 | 456 | $conds = array( 'page_namespace' => NS_TRANSLATIONS, $titleCond ); |
457 | 457 | $result = $dbw->select( 'page', $fields, $conds, __METHOD__ ); |
458 | 458 | $this->sectionPages = TitleArray::newFromResult( $result ); |