From: Alan Knowles Date: Tue, 1 Dec 2020 06:44:33 +0000 (+0800) Subject: php5 support ? X-Git-Url: http://git.roojs.org/?p=Pman.Base;a=commitdiff_plain;h=a6338defe9209fea731ec579d882fcda6105c684 php5 support ? --- diff --git a/Pman.php b/Pman.php index abef5f9..a43d1ce 100644 --- a/Pman.php +++ b/Pman.php @@ -870,9 +870,12 @@ class Pman extends HTML_FlexyFramework_Page - - $lsort = create_function('$a,$b','return strlen($a) > strlen($b) ? 1 : -1;'); - usort($files, $lsort); + if (PHP_VERSION_ID < 70000 ) { + $lsort = create_function('$a,$b','return strlen($a) > strlen($b) ? 1 : -1;'); + usort($files, $lsort); + } else { + usort($files, function($a,$b) { return strlen($a) > strlen($b) ? 1 : -1; }); + } $smod = str_replace('/','.',$mod); diff --git a/Pman/Roo.php b/Pman/Roo.php index a173d24..4dfffb1 100644 --- a/Pman/Roo.php +++ b/Pman/Roo.php @@ -243,11 +243,12 @@ class Pman_Roo extends Pman // sets map and countWhat $this->loadMap($x, array( - 'columns' => $_columns, - 'distinct' => empty($_REQUEST['_distinct']) ? false: $_REQUEST['_distinct'], - 'exclude' => empty($_REQUEST['_exclude_columns']) ? false: explode(',', $_REQUEST['_exclude_columns']) + 'columns' => $_columns, + 'distinct' => empty($_REQUEST['_distinct']) ? false: $_REQUEST['_distinct'], + 'exclude' => empty($_REQUEST['_exclude_columns']) ? false: explode(',', $_REQUEST['_exclude_columns']) )); - + + $this->setFilters($x,$_REQUEST); if (!$this->checkPerm($x,'S', $_REQUEST)) {