]> git.mxchange.org Git - friendica.git/commitdiff
"system_unavailable.php" is unavailable now
authorMichael <heluecht@pirati.ca>
Wed, 13 Dec 2017 21:55:19 +0000 (21:55 +0000)
committerMichael <heluecht@pirati.ca>
Wed, 13 Dec 2017 21:55:19 +0000 (21:55 +0000)
boot.php
include/dba.php
include/system_unavailable.php [deleted file]
src/Core/System.php

index fa26028113251db526161ea8380a07f4b92b1d48..d9a64e570ac49cf6f919eac570b4ecc4908f53c4 100644 (file)
--- a/boot.php
+++ b/boot.php
@@ -563,16 +563,6 @@ function x($s, $k = null)
        }
 }
 
-/**
- * @brief Called from db initialisation if db is dead.
- */
-function system_unavailable()
-{
-       include 'system_unavailable.php';
-       system_down();
-       killme();
-}
-
 /**
  * @brief Returns the baseurl.
  *
index fe191a9e21b3bf46f2043119b0d669a19b75c634..e08880c605af34276f7ef1e3036b5f9d9d665613 100644 (file)
@@ -97,7 +97,7 @@ class dba {
                if (!self::$connected) {
                        self::$db = null;
                        if (!$install) {
-                               system_unavailable();
+                               System::unavailable();
                        }
                }
                $a->save_timestamp($stamp1, "network");
diff --git a/include/system_unavailable.php b/include/system_unavailable.php
deleted file mode 100644 (file)
index bd7196c..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-<?php
-
-function system_down() {
-echo <<< EOT
-<html>
-<head><title>System Unavailable</title></head>
-<body>
-Apologies but this site is unavailable at the moment. Please try again later.
-</body>
-</html>
-EOT;
-}
\ No newline at end of file
index 45e4f652af55d3eb71b61d1cc7ebde0b1f7d8840..1c4d8633065178aa0037112f70c99df0405a4ced 100644 (file)
@@ -100,6 +100,20 @@ class System
                return implode(', ', $callstack2);
        }
 
+       /**
+        * @brief Called from db initialisation when db is dead.
+        */
+       static public function unavailable() {
+echo <<< EOT
+<html>
+       <head><title>System Unavailable</title></head>
+       <body>Apologies but this site is unavailable at the moment. Please try again later.</body>
+</html>
+EOT;
+
+               killme();
+       }
+
        /// @todo Move the following functions from boot.php
        /*
        function get_guid($size = 16, $prefix = "")