X-Git-Url: https://git.wh0rd.org/?a=blobdiff_plain;f=index.php;h=a1bcd5643570549dbcf34ee1d8dff41f8541b609;hb=5edf4b73a439102ab18494375ee4ce4ab93c1b2b;hp=4c4fa5415e7377fb41a73385a9d699f76b686f9e;hpb=0ef32f48b26f94b041977730bf00fe2750e4ad25;p=tt-rss.git diff --git a/index.php b/index.php index 4c4fa541..a1bcd564 100644 --- a/index.php +++ b/index.php @@ -1,15 +1,27 @@ Fatal Error: You forgot to copy config.php-dist to config.php and edit it.\n"; exit; } - set_include_path(get_include_path() . PATH_SEPARATOR . - dirname(__FILE__) ."/include"); + // 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"; + exit; + } - require_once "functions.php"; + 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"; require_once "version.php"; require_once "config.php"; @@ -18,25 +30,22 @@ $mobile = new Mobile_Detect(); + if (!init_plugins()) return; + if (!$_REQUEST['mobile']) { - if ($mobile->isTablet()) { - header('Location: digest.php'); + if ($mobile->isTablet() && PluginHost::getInstance()->get_plugin("digest")) { + header('Location: backend.php?op=digest'); + exit; + } else if ($mobile->isMobile() && PluginHost::getInstance()->get_plugin("mobile")) { + header('Location: backend.php?op=mobile'); exit; - } else if ($mobile->isMobile()) { - header('Location: mobile/index.php'); + } else if ($mobile->isMobile() && PluginHost::getInstance()->get_plugin("digest")) { + header('Location: backend.php?op=digest'); exit; } } - $link = db_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME); - - if (!init_connection($link)) return; - - login_sequence($link); - - $dt_add = time(); - - no_cache_incantation(); + login_sequence(); header('Content-Type: text/html; charset=utf-8'); @@ -46,49 +55,85 @@ Tiny Tiny RSS - - - - - - + - + - - - - - + - - + - + + - foreach (array("tt-rss", "functions", "feedlist", "viewfeed", "FeedTree") as $js) { - if (!isset($_GET['debug'])) { - echo JSMin::minify(file_get_contents("js/$js.js")); - } else { - echo file_get_contents("js/$js.js"); + + - +
@@ -109,34 +154,8 @@
- - - - -
 
+
- -
@@ -148,19 +167,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_hooks(PluginHost::HOOK_ACTION_ITEM) as $p) { + echo $p->hook_action_item(); + } + ?> + + +
+
+ +
-
-
+ -
-
-
-
- -