]> git.mxchange.org Git - friendica.git/blobdiff - src/App.php
Merge pull request #9577 from annando/updateprofile
[friendica.git] / src / App.php
index 892a4c7790e4955283f13f05de000326e3f92645..c69abf212748239dbb1cba3a5890eca8736426d4 100644 (file)
@@ -1,13 +1,30 @@
 <?php
 /**
- * @file src/App.php
+ * @copyright Copyright (C) 2020, Friendica
+ *
+ * @license GNU AGPL version 3 or any later version
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ *
  */
+
 namespace Friendica;
 
 use Exception;
 use Friendica\App\Arguments;
 use Friendica\App\BaseURL;
-use Friendica\App\Authentication;
+use Friendica\Security\Authentication;
 use Friendica\Core\Config\Cache;
 use Friendica\Core\Config\IConfig;
 use Friendica\Core\PConfig\IPConfig;
@@ -25,9 +42,6 @@ use Friendica\Util\Strings;
 use Psr\Log\LoggerInterface;
 
 /**
- *
- * class: App
- *
  * Our main application structure for the life of this page.
  *
  * Primarily deals with the URL that got us here
@@ -63,7 +77,6 @@ class App
        public $sourcename              = '';
        public $videowidth              = 425;
        public $videoheight             = 350;
-       public $force_max_items         = 0;
        public $theme_events_in_profile = true;
        public $queue;
 
@@ -226,22 +239,6 @@ class App
                }
        }
 
-       /**
-        * Returns the current UserAgent as a String
-        *
-        * @return string the UserAgent as a String
-        * @throws HTTPException\InternalServerErrorException
-        */
-       public function getUserAgent()
-       {
-               return
-                       FRIENDICA_PLATFORM . " '" .
-                       FRIENDICA_CODENAME . "' " .
-                       FRIENDICA_VERSION . '-' .
-                       DB_UPDATE_VERSION . '; ' .
-                       $this->baseURL->get();
-       }
-
        /**
         * Returns the current theme name. May be overriden by the mobile theme name.
         *
@@ -450,7 +447,7 @@ class App
                                Core\Worker::executeIfIdle();
                        }
 
-                       if ($this->mode->isNormal()) {
+                       if ($this->mode->isNormal() && !$this->mode->isBackend()) {
                                $requester = HTTPSignature::getSigner('', $_SERVER);
                                if (!empty($requester)) {
                                        Profile::addVisitorCookieForHandle($requester);
@@ -458,7 +455,7 @@ class App
                        }
 
                        // ZRL
-                       if (!empty($_GET['zrl']) && $this->mode->isNormal()) {
+                       if (!empty($_GET['zrl']) && $this->mode->isNormal() && !$this->mode->isBackend()) {
                                if (!local_user()) {
                                        // Only continue when the given profile link seems valid
                                        // Valid profile links contain a path with "/profile/" and no query parameters