]> git.mxchange.org Git - friendica.git/blobdiff - src/Core/System.php
Merge pull request #8230 from AlfredSK/AlfredSK-statistics-query
[friendica.git] / src / Core / System.php
index d5902c003a4f8abf3a757d55e6bfef586173b33f..f092427e58e85a6eaa85d5a2ddf3efbfed07ee8f 100644 (file)
@@ -1,7 +1,24 @@
 <?php
 /**
- * @file src/Core/System.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\Core;
 
 use Friendica\DI;
@@ -9,43 +26,13 @@ use Friendica\Network\HTTPException\InternalServerErrorException;
 use Friendica\Util\XML;
 
 /**
- * @file include/Core/System.php
- *
- * @brief Contains the class with system relevant stuff
- */
-
-
-/**
- * @brief System methods
+ * Contains the class with system relevant stuff
  */
 class System
 {
        /**
-        * @brief Retrieves the Friendica instance base URL
-        *
-        * @param bool $ssl Whether to append http or https under BaseURL::SSL_POLICY_SELFSIGN
-        * @return string Friendica server base URL
-        */
-       public static function baseUrl($ssl = false)
-       {
-               return DI::baseUrl()->get($ssl);
-       }
-
-       /**
-        * @brief Removes the baseurl from an url. This avoids some mixed content problems.
-        *
-        * @param string $orig_url The url to be cleaned
+        * Returns a string with a callstack. Can be used for logging.
         *
-        * @return string The cleaned url
-        * @throws \Exception
-        */
-       public static function removedBaseUrl(string $orig_url)
-       {
-               return DI::baseUrl()->remove($orig_url);
-       }
-
-       /**
-        * @brief Returns a string with a callstack. Can be used for logging.
         * @param integer $depth optional, default 4
         * @return string
         */
@@ -117,7 +104,7 @@ class System
        }
 
        /**
-        * @brief Send HTTP status header and exit.
+        * Send HTTP status header and exit.
         *
         * @param integer $val     HTTP status result value
         * @param string  $message Error message. Optional.
@@ -141,7 +128,7 @@ class System
        }
 
        /**
-        * @brief Encodes content to json.
+        * Encodes content to json.
         *
         * This function encodes an array to json format
         * and adds an application/json HTTP header to the output.
@@ -251,7 +238,7 @@ class System
        }
 
        /**
-        * @brief Returns the system user that is executing the script
+        * Returns the system user that is executing the script
         *
         * This mostly returns something like "www-data".
         *
@@ -268,7 +255,7 @@ class System
        }
 
        /**
-        * @brief Checks if a given directory is usable for the system
+        * Checks if a given directory is usable for the system
         *
         * @param      $directory
         * @param bool $check_writable
@@ -307,14 +294,12 @@ class System
 
        /// @todo Move the following functions from boot.php
        /*
-       function killme()
        function local_user()
        function public_contact()
        function remote_user()
        function notice($s)
        function info($s)
        function is_site_admin()
-       function get_server()
        function get_temppath()
        function get_cachefile($file, $writemode = true)
        function get_itemcachepath()