]> git.mxchange.org Git - friendica.git/commitdiff
Move $page initialization into constructor
authorPhilipp Holzer <admin+github@philipp.info>
Thu, 15 Aug 2019 15:04:36 +0000 (17:04 +0200)
committerPhilipp Holzer <admin+github@philipp.info>
Thu, 15 Aug 2019 15:04:36 +0000 (17:04 +0200)
src/App.php

index 2b229bdf421f9696eade92dc6eef50b53906e0d1..e9c43b21bf0bfe574c2a6c757a911befa21b6137 100644 (file)
@@ -43,8 +43,8 @@ use Psr\Log\LoggerInterface;
 class App
 {
        /** @deprecated 2019.09 - use App\Arguments->getQueryString() */
-       public $query_string = '';
-       public $page         = [];
+       public $query_string;
+       public $page;
        public $profile;
        public $profile_uid;
        public $user;
@@ -285,6 +285,19 @@ class App
 
                $this->isAjax = strtolower(defaults($_SERVER, 'HTTP_X_REQUESTED_WITH', '')) == 'xmlhttprequest';
 
+               $this->page = [
+                       'aside'       => '',
+                       'bottom'      => '',
+                       'content'     => '',
+                       'footer'      => '',
+                       'htmlhead'    => '',
+                       'nav'         => '',
+                       'page_title'  => '',
+                       'right_aside' => '',
+                       'template'    => '',
+                       'title'       => ''
+               ];
+
                $this->load();
        }
 
@@ -995,19 +1008,6 @@ class App
                                Core\Hook::loadHooks();
                        }
 
-                       $this->page = [
-                               'aside'       => '',
-                               'bottom'      => '',
-                               'content'     => '',
-                               'footer'      => '',
-                               'htmlhead'    => '',
-                               'nav'         => '',
-                               'page_title'  => '',
-                               'right_aside' => '',
-                               'template'    => '',
-                               'title'       => ''
-                       ];
-
                        // Compatibility with the Android Diaspora client
                        if ($moduleName == 'stream') {
                                $this->internalRedirect('network?order=post');