Index: branches/liquidthreads/extensions/LqtModel.php |
— | — | @@ -947,8 +947,10 @@ |
948 | 948 | } |
949 | 949 | |
950 | 950 | static function articleClause($article) { |
| 951 | + $dbr = wfGetDB(DB_SLAVE); |
| 952 | + $q_article= $dbr->addQuotes($article->getTitle()->getDBkey()); |
951 | 953 | return <<<SQL |
952 | | -(thread.thread_article_title = "{$article->getTitle()->getDBkey()}" |
| 954 | +(thread.thread_article_title = $q_article |
953 | 955 | AND thread.thread_article_namespace = {$article->getTitle()->getNamespace()}) |
954 | 956 | SQL; |
955 | 957 | } |
— | — | @@ -1036,14 +1038,14 @@ |
1037 | 1039 | $talkpage_t = $t->article()->getTitle(); |
1038 | 1040 | $root_t = $t->root()->getTitle(); |
1039 | 1041 | |
1040 | | - $talkpage_t_s = $dbw->addQuotes($talkpage_t->getDBKey()); |
1041 | | - $root_t_s = $dbw->addQuotes($root_t->getDBKey()); |
| 1042 | + $q_talkpage_t = $dbw->addQuotes($talkpage_t->getDBKey()); |
| 1043 | + $q_root_t = $dbw->addQuotes($root_t->getDBKey()); |
1042 | 1044 | |
1043 | 1045 | // Select any applicable watchlist entries for the thread. |
1044 | 1046 | $where_clause = <<<SQL |
1045 | 1047 | ( |
1046 | | - (wl_namespace = {$talkpage_t->getNamespace()} and wl_title = $talkpage_t_s ) |
1047 | | -or (wl_namespace = {$root_t->getNamespace()} and wl_title = $root_t_s ) |
| 1048 | + (wl_namespace = {$talkpage_t->getNamespace()} and wl_title = $q_talkpage_t ) |
| 1049 | +or (wl_namespace = {$root_t->getNamespace()} and wl_title = $q_root_t ) |
1048 | 1050 | ) |
1049 | 1051 | SQL; |
1050 | 1052 | |