X-Git-Url: https://git.wh0rd.org/?p=tt-rss.git;a=blobdiff_plain;f=index.php;h=9be7d5ccc35f25197911e50b289cbafe7ce31f12;hp=e390edffdd69a29e1d72f4201045cc6e22e827de;hb=HEAD;hpb=c88e4a2af317d5b1dfa60e639df9336a72fe879a diff --git a/index.php b/index.php index e390edff..9be7d5cc 100644 --- a/index.php +++ b/index.php @@ -11,14 +11,15 @@ // we need a separate check here because functions.php might get parsed // incorrectly before 5.3 because of :: syntax. - if (version_compare(PHP_VERSION, '5.3.0', '<')) { - print "Fatal Error: PHP version 5.3.0 or newer required.\n"; + if (version_compare(PHP_VERSION, '5.6.0', '<')) { + print "Fatal Error: PHP version 5.6.0 or newer required. You're using " . PHP_VERSION . ".\n"; exit; } set_include_path(dirname(__FILE__) ."/include" . PATH_SEPARATOR . get_include_path()); + require_once "autoload.php"; require_once "sessions.php"; require_once "functions.php"; require_once "sanity_check.php"; @@ -29,28 +30,22 @@ $mobile = new Mobile_Detect(); - $link = db_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME); - - if (!init_connection($link)) return; - - global $pluginhost; + if (!init_plugins()) return; if (!$_REQUEST['mobile']) { - if ($mobile->isTablet() && $pluginhost->get_plugin("digest")) { + if ($mobile->isTablet() && PluginHost::getInstance()->get_plugin("digest")) { header('Location: backend.php?op=digest'); exit; - } else if ($mobile->isMobile() && $pluginhost->get_plugin("mobile")) { + } else if ($mobile->isMobile() && PluginHost::getInstance()->get_plugin("mobile")) { header('Location: backend.php?op=mobile'); exit; - } else if ($mobile->isMobile() && $pluginhost->get_plugin("digest")) { + } else if ($mobile->isMobile() && PluginHost::getInstance()->get_plugin("digest")) { header('Location: backend.php?op=digest'); exit; } } - login_sequence($link); - - no_cache_incantation(); + login_sequence(); header('Content-Type: text/html; charset=utf-8'); @@ -60,24 +55,29 @@ Tiny Tiny RSS + + + - - - +