Changeset 33390
- Timestamp:
- 03/21/12 22:12:23 (1 year ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
plugins/sfDoctrineActAsTaggablePlugin/trunk/lib/model/doctrine/PluginTagTable.class.php
r32923 r33390 177 177 if (!isset($options['sort_by_popularity']) || (true !== $options['sort_by_popularity'])) 178 178 { 179 ksort($tags);179 uksort($tags, array('TagTable', 'compareTags')); 180 180 } 181 181 182 182 return $tags; 183 } 184 185 /** 186 * Case insensitive comparison so results when sort_by_popularity is false are 187 * comparable to the results of MySQL doing the sorting (as seen most other places 188 * in a Symfony app) 189 */ 190 static public function compareTags($a, $b) 191 { 192 return strcasecmp($a, $b); 183 193 } 184 194