]> git.andy128k.dev Git - ipf.git/commitdiff
PHP 5.6 compatibility changes
authorAndrey Kutejko <andy128k@gmail.com>
Sun, 10 Mar 2019 17:08:18 +0000 (18:08 +0100)
committerAndrey Kutejko <andy128k@gmail.com>
Sun, 10 Mar 2019 17:10:35 +0000 (18:10 +0100)
composer.lock
ipf/auth/admin.php

index ba57864ca96b1ff137f43d54af3f8b66b2b4b1c9..348c147a8e1c57e4c4a2f0188b722c1d09565be1 100644 (file)
             "source": {
                 "type": "git",
                 "url": "git://git.andy128k.net/missing-tools.git",
-                "reference": "a8674960793b9c9fb3a90b83558f972a28f7ed75"
+                "reference": "5e4d636d7de3ee2cd6037e82f733950dda88a8b5"
             },
             "require": {
                 "andy128k/pegp": "0.1.*@dev",
                     "src/"
                 ]
             },
+            "scripts": {
+                "test": [
+                    "phpunit ./t"
+                ]
+            },
             "license": [
                 "MIT"
             ],
                 }
             ],
             "description": "Miscellaneous utilities",
-            "time": "2016-11-05T14:33:30+00:00"
+            "time": "2019-03-10T17:05:21+00:00"
         },
         {
             "name": "andy128k/pegp",
index f60fd0b77c627eb9c2098af3a9a4272e025310b5..5d222d2372fe95a76aa37517ab7a705aacecbad0 100644 (file)
@@ -78,7 +78,7 @@ class UserForm extends \IPF_ObjectForm
             $this->fields['roles'] = new \IPF_Admin_Form_Field_MultipleChoice(array(
                 'label'     => __('Groups'),
                 'help_text' => __('In addition to the permissions manually assigned, this user will also get all permissions granted to each group he/she is in.'),
-                'choices'   => array_column(Role::all(), 'id', 'name'),
+                'choices'   => \PFF\Collection::columnByProperty(Role::all(), 'id', 'name'),
             ));
         }
 
@@ -169,7 +169,7 @@ class AdminUser extends Component
             ' LIMIT ' . $pageSize .
             ' OFFSET ' . (($page - 1) * $pageSize)
         );
-        return array_column($items, null, 'id');
+        return \PFF\Collection::indexByProperty($items, 'id');
     }
 
     public function itemsCount($searchValue, $filters)
@@ -310,7 +310,7 @@ class AdminRole extends Component
             ' LIMIT ' . $pageSize .
             ' OFFSET ' . (($page - 1) * $pageSize)
         );
-        return array_column($items, null, 'id');
+        return \PFF\Collection::indexByProperty($items, 'id');
     }
 
     public function itemsCount($searchValue, $filters)