mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-08 09:05:16 +01:00
fix Scrutinzer "bug" changing var imported not as reference into closure
This commit is contained in:
parent
0d19c8fc83
commit
0136ed2112
@ -590,10 +590,12 @@ class Vfs extends Vfs\StreamWrapper
|
||||
if ($dirsontop && ($a['mime'] == self::DIR_MIME_TYPE) !== ($b['mime'] == self::DIR_MIME_TYPE))
|
||||
{
|
||||
$cmp = $a['mime' ] == self::DIR_MIME_TYPE ? -1 : 1;
|
||||
$sort_desc = false;
|
||||
}
|
||||
// reverse sort for descending
|
||||
if ($sort_desc) $cmp *= -1;
|
||||
// reverse sort for descending, if no directory sorted to top
|
||||
elseif ($sort_desc)
|
||||
{
|
||||
$cmp *= -1;
|
||||
}
|
||||
// always use name as second sort criteria
|
||||
if (!$cmp) $cmp = strcasecmp($a['name'], $b['name']);
|
||||
return $cmp;
|
||||
@ -613,10 +615,12 @@ class Vfs extends Vfs\StreamWrapper
|
||||
if ($dirsontop && ($a['mime'] == self::DIR_MIME_TYPE) !== ($b['mime'] == self::DIR_MIME_TYPE))
|
||||
{
|
||||
$cmp = $a['mime' ] == self::DIR_MIME_TYPE ? -1 : 1;
|
||||
$sort_desc = false;
|
||||
}
|
||||
// reverse sort for descending
|
||||
if ($sort_desc) $cmp *= -1;
|
||||
elseif ($sort_desc)
|
||||
{
|
||||
$cmp *= -1;
|
||||
}
|
||||
// always use name as second sort criteria
|
||||
if (!$cmp && $order != 'name') $cmp = strcasecmp($a['name'], $b['name']);
|
||||
return $cmp;
|
||||
|
Loading…
Reference in New Issue
Block a user