protected static function _sortDirs($a, $b)
{
/* Sort symlinks to dirs as dirs */
$dira = $a['type'] === '**dir' || $a['type'] === '**sym' && $a['linktype'] === '**dir';
$dirb = $b['type'] === '**dir' || $b['type'] === '**sym' && $b['linktype'] === '**dir';
if ($GLOBALS['prefs']->getValue('sortdirsfirst')) {
if ($dira && !$dirb) {
return -1;
} elseif (!$dira && $dirb) {
return 1;
}
}
return 0;
}