| 1 |
<?php |
<?php |
| 2 |
// $Id: taxonomy_hide.inc,v 1.1.2.2 2008/10/27 14:32:21 brmassa Exp $ |
// $Id: taxonomy_hide.inc,v 1.1.2.3 2008/10/27 15:07:50 brmassa Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* @file |
* @file |
| 43 |
function _taxonomy_hide_sort($a, $b) { |
function _taxonomy_hide_sort($a, $b) { |
| 44 |
// Cache the extra vocabulary information (we need the vocabulary weight) |
// Cache the extra vocabulary information (we need the vocabulary weight) |
| 45 |
static $vocs = array(); |
static $vocs = array(); |
| 46 |
if (!array_key_exists($a->vid, $vocs)) { |
if (!empty($vocs[$a->vid])) { |
| 47 |
$vocs[$a->vid] = taxonomy_vocabulary_load($a->vid); |
$vocs[$a->vid] = taxonomy_vocabulary_load($a->vid); |
| 48 |
} |
} |
| 49 |
if (!array_key_exists($b->vid, $vocs)) { |
if (!empty($vocs[$b->vid])) { |
| 50 |
$vocs[$b->vid] = taxonomy_vocabulary_load($b->vid); |
$vocs[$b->vid] = taxonomy_vocabulary_load($b->vid); |
| 51 |
} |
} |
| 52 |
|
|
| 71 |
elseif ($a->weight > $b->weight) { |
elseif ($a->weight > $b->weight) { |
| 72 |
return 1; |
return 1; |
| 73 |
} |
} |
| 74 |
elseif (strcasecmp($a->name, $b->name)) { |
elseif ($string = strcasecmp($a->name, $b->name)) { |
| 75 |
return strcasecmp($a->name, $b->name); |
return $string; |
| 76 |
} |
} |
| 77 |
elseif ($a->tid < $b->tid) { |
elseif ($a->tid < $b->tid) { |
| 78 |
return -1; |
return -1; |