forked from ZwiiCMS-Team/ZwiiCampus
1.6.02 Corrige un erreur de tri dans RFM
This commit is contained in:
parent
0407bd082d
commit
2bdb09b958
@ -1,4 +1,4 @@
|
||||
# ZwiiCampus 1.6.01
|
||||
# ZwiiCampus 1.6.02
|
||||
|
||||
ZwiiCampus (Learning Management System) est logiciel auteur destiné à mettre en ligne des tutoriels. Il dispose de plusieurs modalités d'ouverture et d'accès des contenus. Basé sur la version 13 du CMS Zwii, la structure logicielle est solide, le framework de Zwii est éprouvé.
|
||||
|
||||
|
@ -51,7 +51,7 @@ class common
|
||||
const ACCESS_TIMER = 1800;
|
||||
|
||||
// Numéro de version
|
||||
const ZWII_VERSION = '1.6.01';
|
||||
const ZWII_VERSION = '1.6.02';
|
||||
|
||||
// URL autoupdate
|
||||
const ZWII_UPDATE_URL = 'https://forge.chapril.org/ZwiiCMS-Team/campus-update/raw/branch/master/';
|
||||
|
38
core/vendor/filemanager/dialog.php
vendored
38
core/vendor/filemanager/dialog.php
vendored
@ -864,50 +864,54 @@ if ($config['upload_files']) { ?>
|
||||
|
||||
switch ($sort_by) {
|
||||
case 'date':
|
||||
//usort($sorted, 'dateSort');
|
||||
usort($sorted, function($x, $y) use ($descending) {
|
||||
if ($x['is_dir'] !== $y['is_dir']) {
|
||||
return $y['is_dir'] ? 1 : -1;
|
||||
} else {
|
||||
return ($descending)
|
||||
? $x['size'] < $y['size']
|
||||
: $x['size'] >= $y['size'];
|
||||
if ($descending) {
|
||||
return ($x['size'] < $y['size']) ? -1 : ($x['size'] > $y['size'] ? 1 : 0);
|
||||
} else {
|
||||
return ($x['size'] > $y['size']) ? -1 : ($x['size'] < $y['size'] ? 1 : 0);
|
||||
}
|
||||
}
|
||||
});
|
||||
break;
|
||||
case 'size':
|
||||
//usort($sorted, 'sizeSort');
|
||||
usort($sorted, function($x, $y) use ($descending) {
|
||||
if ($x['is_dir'] !== $y['is_dir']) {
|
||||
return $y['is_dir'] ? 1 : -1;
|
||||
} else {
|
||||
return ($descending)
|
||||
? $x['date'] < $y['date']
|
||||
: $x['date'] >= $y['date'];
|
||||
if ($descending) {
|
||||
return ($x['date'] < $y['date']) ? -1 : ($x['date'] > $y['date'] ? 1 : 0);
|
||||
} else {
|
||||
return ($x['date'] > $y['date']) ? -1 : ($x['date'] < $y['date'] ? 1 : 0);
|
||||
}
|
||||
}
|
||||
});
|
||||
break;
|
||||
case 'extension':
|
||||
//usort($sorted, 'extensionSort');
|
||||
usort($sorted, function($x, $y) use ($descending) {
|
||||
if ($x['is_dir'] !== $y['is_dir']) {
|
||||
return $y['is_dir'] ? 1 : -1;
|
||||
} else {
|
||||
return ($descending)
|
||||
? ($x['extension'] < $y['extension'] ? 1 : 0)
|
||||
: ($x['extension'] >= $y['extension'] ? 1 : 0);
|
||||
if ($descending) {
|
||||
return strcasecmp($x['extension'], $y['extension']);
|
||||
} else {
|
||||
return -strcasecmp($x['extension'], $y['extension']);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
break;
|
||||
default:
|
||||
// usort($sorted, 'filenameSort');
|
||||
usort($sorted, function($x, $y) use ($descending) {
|
||||
if ($x['is_dir'] !== $y['is_dir']) {
|
||||
return $y['is_dir'] ? 1 : -1;
|
||||
} else {
|
||||
return ($descending)
|
||||
? ($x['file_lcase'] < $y['file_lcase'] ? 1 : ($x['file_lcase'] == $y['file_lcase'] ? 0 : -1))
|
||||
: ($x['file_lcase'] >= $y['file_lcase'] ? 1 : ($x['file_lcase'] == $y['file_lcase'] ? 0 : -1));
|
||||
if ($descending) {
|
||||
return strcasecmp($x['file_lcase'], $y['file_lcase']);
|
||||
} else {
|
||||
return -strcasecmp($x['file_lcase'], $y['file_lcase']);
|
||||
}
|
||||
}
|
||||
});
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user