Index: trunk/extensions/CodeReview/backend/CodeRevision.php |
— | — | @@ -689,7 +689,7 @@ |
690 | 690 | $dbr = wfGetDB( DB_SLAVE ); |
691 | 691 | return array( |
692 | 692 | 'cp_repo_id' => $this->mRepoId, |
693 | | - 'cp_path LIKE ' . $dbr->addQuotes( $dbr->escapeLike( $path ) . '%' ), |
| 693 | + 'cp_path ' . $dbr->buildLike( $path, $dbr->anyString() ), |
694 | 694 | // performance |
695 | 695 | 'cp_rev_id > ' . ( $this->mRepo->getLastStoredRev() - 20000 ), |
696 | 696 | // join conds |
Index: trunk/extensions/CodeReview/ui/CodeRevisionListView.php |
— | — | @@ -235,7 +235,7 @@ |
236 | 236 | 'fields' => $this->getSelectFields(), |
237 | 237 | 'conds' => array( |
238 | 238 | 'cp_repo_id' => $this->mRepo->getId(), |
239 | | - 'cp_path LIKE ' . $this->mDb->addQuotes( $this->mDb->escapeLike( $this->getSVNPath() ) . '%' ), |
| 239 | + 'cp_path ' . $this->mDb->buildLike( $this->getSVNPath(), $this->mDb->anyString() ), |
240 | 240 | // performance |
241 | 241 | 'cp_rev_id > ' . ( $this->mRepo->getLastStoredRev() - 20000 ) |
242 | 242 | ), |
Index: trunk/extensions/CodeReview/ui/CodeReleaseNotes.php |
— | — | @@ -66,7 +66,7 @@ |
67 | 67 | $where = 'cr_id >= ' . intval( $this->mStartRev ); |
68 | 68 | } |
69 | 69 | if ( $this->mPath ) { |
70 | | - $where .= ' AND (cr_path LIKE ' . $dbr->addQuotes( $dbr->escapeLike( "{$this->mPath}/" ) . '%' ); |
| 70 | + $where .= ' AND (cr_path ' . $dbr->buildLike( "{$this->mPath}/", $dbr->anyString() ); |
71 | 71 | $where .= ' OR cr_path = ' . $dbr->addQuotes( $this->mPath ) . ')'; |
72 | 72 | } |
73 | 73 | # Select commits within this range... |