]> git.mxchange.org Git - friendica.git/blobdiff - src/Core/System.php
Fix: Queries with empty selections hadn't worked anymore
[friendica.git] / src / Core / System.php
index b0cfe28bee0cdf5b8746e4f5d369280925dc00a2..46f0cb4f32fbb9859aee3a203ca968f00b8a3762 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,15 +26,8 @@ use Friendica\Network\HTTPException\InternalServerErrorException;
 use Friendica\Util\XML;
 
 /**
- * @file include/Core/System.php
- *
  * Contains the class with system relevant stuff
  */
-
-
-/**
- * System methods
- */
 class System
 {
        /**
@@ -282,6 +292,24 @@ class System
                return true;
        }
 
+       /**
+        * Exit method used by asynchronous update modules
+        *
+        * @param string $o
+        */
+       public static function htmlUpdateExit($o)
+       {
+               header("Content-type: text/html");
+               echo "<!DOCTYPE html><html><body>\r\n";
+               // We can remove this hack once Internet Explorer recognises HTML5 natively
+               echo "<section>";
+               // reportedly some versions of MSIE don't handle tabs in XMLHttpRequest documents very well
+               echo str_replace("\t", "       ", $o);
+               echo "</section>";
+               echo "</body></html>\r\n";
+               exit();
+       }
+
        /// @todo Move the following functions from boot.php
        /*
        function local_user()