]> git.mxchange.org Git - friendica.git/commitdiff
Little fixes (#5414)
authorMichael Vogel <icarus@dabo.de>
Thu, 19 Jul 2018 22:40:39 +0000 (00:40 +0200)
committerHypolite Petovan <mrpetovan@eml.cc>
Thu, 19 Jul 2018 22:40:39 +0000 (18:40 -0400)
* We now store the item delivery data in a separate table

* Reorganized table structure

* Fix  a notice when using the profiler / ensure that permissions are strings

src/App.php
src/Model/PermissionSet.php

index 08cf382b5467f2e3131e32d40802b18eee3a4e50..e1843e5737dc99f318bf3f590d8e658a13c9c917 100644 (file)
@@ -154,25 +154,6 @@ class App
 
                $this->basepath = rtrim($basepath, DIRECTORY_SEPARATOR);
 
-               // The order of the following calls is important to ensure proper initialization
-               $this->loadConfigFiles();
-
-               $this->loadDatabase();
-
-               $this->determineMode();
-
-               $this->determineUrlPath();
-
-               Config::load();
-
-               if ($this->mode & self::MODE_DBAVAILABLE) {
-                       Core\Addon::loadHooks();
-
-                       $this->loadAddonConfig();
-               }
-
-               $this->loadDefaultTimezone();
-
                $this->performance['start'] = microtime(true);
                $this->performance['database'] = 0;
                $this->performance['database_write'] = 0;
@@ -194,6 +175,25 @@ class App
                $this->callstack['rendering'] = [];
                $this->callstack['parser'] = [];
 
+               // The order of the following calls is important to ensure proper initialization
+               $this->loadConfigFiles();
+
+               $this->loadDatabase();
+
+               $this->determineMode();
+
+               $this->determineUrlPath();
+
+               Config::load();
+
+               if ($this->mode & self::MODE_DBAVAILABLE) {
+                       Core\Addon::loadHooks();
+
+                       $this->loadAddonConfig();
+               }
+
+               $this->loadDefaultTimezone();
+
                $this->page = [
                        'aside' => '',
                        'bottom' => '',
index a5d5ed2b85ecc6f575b982876b430cdb9796661d..c31e88bf17680a312cb8c8bbd088272d4a1d1b5b 100644 (file)
@@ -24,10 +24,10 @@ class PermissionSet extends BaseObject
        public static function fetchIDForPost($postarray)
        {
                $condition = ['uid' => $postarray['uid'],
-                       'allow_cid' => self::sortPermissions($postarray['allow_cid']),
-                       'allow_gid' => self::sortPermissions($postarray['allow_gid']),
-                       'deny_cid' => self::sortPermissions($postarray['deny_cid']),
-                       'deny_gid' => self::sortPermissions($postarray['deny_gid'])];
+                       'allow_cid' => self::sortPermissions(defaults($postarray, 'allow_cid', '')),
+                       'allow_gid' => self::sortPermissions(defaults($postarray, 'allow_gid', '')),
+                       'deny_cid' => self::sortPermissions(defaults($postarray, 'deny_cid', '')),
+                       'deny_gid' => self::sortPermissions(defaults($postarray, 'deny_gid', ''))];
 
                $set = dba::selectFirst('permissionset', ['id'], $condition);