X-Git-Url: https://git.wh0rd.org/?a=blobdiff_plain;f=index.php;h=3b0962f02e20cac66cace1d782672757ce14852b;hb=50052fb78a3a9d1bb3fa488e7fd7b23125c38124;hp=0d0646c79b7e42a029f95dff096a53ecc1a620cd;hpb=96f0a3e79d7c01831472b1e58b2a7646fbb7deff;p=tt-rss.git diff --git a/index.php b/index.php index 0d0646c7..3b0962f0 100644 --- a/index.php +++ b/index.php @@ -1,13 +1,25 @@ Fatal Error: You forgot to copy config.php-dist to config.php and edit it.\n"; exit; } + // 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.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"; @@ -18,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'); @@ -49,49 +55,87 @@ Tiny Tiny RSS - - - - - + - + - - - - - + - - + - - foreach ($pluginhost->get_plugins() as $n => $p) { + + + + + - +
@@ -112,36 +156,8 @@
- - -
 
+
- -
@@ -153,19 +169,22 @@
-
-
"> +
-
+ 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(); + } + ?> + + +
+
-
- get_plugin("digest")) { ?> -
- -
-
- -
-
-
+
+ + get_hooks(PluginHost::HOOK_ACTION_ITEM) as $p) { + echo $p->hook_action_item(); + } + ?> + + +
+
+ +
-
-
+ -
-
-
-
- -