Index: trunk/extensions/CategoryTree/CategoryTreeFunctions.php |
— | — | @@ -180,7 +180,7 @@ |
181 | 181 | $categorylinks = $dbr->tableName( 'categorylinks' ); |
182 | 182 | |
183 | 183 | $sql = "SELECT cat.page_namespace, cat.page_title, |
184 | | - if( cat.page_namespace = " . NS_CATEGORY . ", 0, 1) as presort |
| 184 | + CASE WHEN cat.page_namespace=".NS_CATEGORY." THEN 0 ELSE 1 END AS presort |
185 | 185 | $transFields |
186 | 186 | FROM $page as cat |
187 | 187 | JOIN $categorylinks ON cl_from = cat.page_id |