X-Git-Url: https://git.wh0rd.org/?a=blobdiff_plain;f=index.php;h=9be7d5ccc35f25197911e50b289cbafe7ce31f12;hb=HEAD;hp=840959a18638f281486d3c9c734569ef7fe874f6;hpb=7c97d17aaf373339a8bcd917ad59ca6018148f0d;p=tt-rss.git diff --git a/index.php b/index.php index 840959a1..9be7d5cc 100644 --- a/index.php +++ b/index.php @@ -1,4 +1,8 @@ Fatal Error: You forgot to copy config.php-dist to config.php and edit it.\n"; @@ -7,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"; @@ -25,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()) { - header('Location: mobile/index.php'); + } else if ($mobile->isMobile() && PluginHost::getInstance()->get_plugin("mobile")) { + header('Location: backend.php?op=mobile'); + exit; + } else if ($mobile->isMobile() && PluginHost::getInstance()->get_plugin("digest")) { + header('Location: backend.php?op=digest'); exit; } } - - login_sequence($link); - - $dt_add = time(); - - no_cache_incantation(); + login_sequence(); header('Content-Type: text/html; charset=utf-8'); @@ -55,16 +54,30 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - <?php echo PAGE_TITLE ?> - - - + Tiny Tiny RSS + - + + + + + + + + + + - - - - - - - - + + + + + - +
@@ -122,22 +166,8 @@
- - -
 
+
- -
@@ -154,12 +184,17 @@
-
+ get_hooks(PluginHost::HOOK_MAIN_TOOLBAR_BUTTON) as $p) { + echo $p->hook_main_toolbar_button(); + } + ?> + + + +
- +
- - - +
+ +
+
+ +
+
+ +
+
+ +
+
+
+ get_hooks(PluginHost::HOOK_TOOLBAR_BUTTON) as $p) { + echo $p->hook_toolbar_button(); + } + ?> + - - -
@@ -215,55 +255,51 @@
-
- get_plugin("digest")) { ?> -
- -
- -
- -
-
-
+
+ + get_hooks(PluginHost::HOOK_ACTION_ITEM) as $p) { + echo $p->hook_action_item(); + } + ?> +
+ +
-
-
+ -
-
-
- -