| 1 |
<?php |
<?php |
| 2 |
// $Id: tagadelic.module,v 1.40.2.5 2009/05/13 16:47:00 ber Exp $ |
// $Id: tagadelic.module,v 1.40.2.6 2009/05/13 16:56:12 ber Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* Implementation of hook_help |
* Implementation of hook_help |
| 298 |
* callback for usort, sort by weight |
* callback for usort, sort by weight |
| 299 |
*/ |
*/ |
| 300 |
function _tagadelic_sort_by_weight($a, $b) { |
function _tagadelic_sort_by_weight($a, $b) { |
| 301 |
|
if ($a->weight == $b->weight) { |
| 302 |
|
// Ensure correct order when same weight |
| 303 |
|
return $a->count > $b->count; |
| 304 |
|
} |
| 305 |
return $a->weight > $b->weight; |
return $a->weight > $b->weight; |
| 306 |
} |
} |
| 307 |
|
|