]> git.mxchange.org Git - friendica.git/blobdiff - index.php
Yet more standards
[friendica.git] / index.php
index 8560f8c27745f20b58375663cc59f58ff6cfd744..0b941d887d5422ce31ff39a56e066815aee6765c 100644 (file)
--- a/index.php
+++ b/index.php
  *
  */
 
-use \Friendica\Core\Config;
+use Friendica\App;
+use Friendica\Core\Config;
 
-require_once('boot.php');
-require_once('object/BaseObject.php');
+require_once 'boot.php';
+require_once 'object/BaseObject.php';
 
 $a = new App;
 BaseObject::set_app($a);
@@ -66,14 +67,14 @@ if (!$install) {
        }
 
        if (get_config('system', 'force_ssl') AND ($a->get_scheme() == "http") AND
-               (intval(get_config('system','ssl_policy')) == SSL_POLICY_FULL) AND
+               (intval(get_config('system', 'ssl_policy')) == SSL_POLICY_FULL) AND
                (substr(App::get_baseurl(), 0, 8) == "https://")) {
                header("HTTP/1.1 302 Moved Temporarily");
-               header("Location: ".App::get_baseurl()."/".$a->query_string);
+               header("Location: " . App::get_baseurl() . "/" . $a->query_string);
                exit();
        }
 
-       require_once("include/session.php");
+       require_once 'include/session.php';
        load_hooks();
        call_hooks('init_1');
 
@@ -174,6 +175,10 @@ if (! x($_SESSION,'sysmsg_info')) {
        $_SESSION['sysmsg_info'] = array();
 }
 
+// Array for informations about last received items
+if (! x($_SESSION,'last_updated')) {
+       $_SESSION['last_updated'] = array();
+}
 /*
  * check_config() is responsible for running update scripts. These automatically
  * update the DB schema whenever we push a new one out. It also checks to see if
@@ -336,14 +341,6 @@ if ($a->module_loaded) {
                $func = str_replace('-','_',current_theme()) . '_init';
                $func($a);
        }
-/// @TODO commented out? old-lost again? :-)
-//     elseif (x($a->theme_info,"extends") && file_exists("view/theme/".$a->theme_info["extends"]."/theme.php")) {
-//             require_once("view/theme/".$a->theme_info["extends"]."/theme.php");
-//             if (function_exists(str_replace('-','_',$a->theme_info["extends"]) . '_init')) {
-//                     $func = str_replace('-','_',$a->theme_info["extends"]) . '_init';
-//                     $func($a);
-//             }
-//     }
 
        if (($_SERVER['REQUEST_METHOD'] === 'POST') && (! $a->error)
                && (function_exists($a->module . '_post'))
@@ -490,7 +487,7 @@ header("X-Friendica-Version: " . FRIENDICA_VERSION);
 header("Content-type: text/html; charset=utf-8");
 
 /*
- * We use $_GET["mode"] for special page templates. So we will check if we have 
+ * We use $_GET["mode"] for special page templates. So we will check if we have
  * to load another page template than the default one.
  * The page templates are located in /view/php/ or in the theme directory.
  */