r17320 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r17319‎ | r17320 | r17321 >
Date:13:19, 31 October 2006
Author:greg
Status:old
Tags:
Comment:
Change to more standard CASE WHEN THEN form.
Modified paths:
  • /trunk/extensions/CategoryTree/CategoryTreeFunctions.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CategoryTree/CategoryTreeFunctions.php
@@ -180,7 +180,7 @@
181181 $categorylinks = $dbr->tableName( 'categorylinks' );
182182
183183 $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
185185 $transFields
186186 FROM $page as cat
187187 JOIN $categorylinks ON cl_from = cat.page_id