X-Git-Url: https://git.wh0rd.org/?a=blobdiff_plain;f=index.php;h=36d87558f9c024ffaace4a71cd90da92733e925a;hb=23419d117bf6db266ce2fc4b7e8d14e96b788f9b;hp=3a68c90f67b202d1f68af8e814e8e5fa476f2041;hpb=854a2ace869b29f805d203bb74968ef1500eb54b;p=tt-rss.git diff --git a/index.php b/index.php index 3a68c90f..36d87558 100644 --- a/index.php +++ b/index.php @@ -5,11 +5,11 @@ exit; } - set_include_path(get_include_path() . PATH_SEPARATOR . - dirname(__FILE__) ."/include"); + set_include_path(dirname(__FILE__) ."/include" . PATH_SEPARATOR . + get_include_path()); - require_once "functions.php"; require_once "sessions.php"; + require_once "functions.php"; require_once "sanity_check.php"; require_once "version.php"; require_once "config.php"; @@ -18,9 +18,15 @@ $mobile = new Mobile_Detect(); + $link = db_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME); + + if (!init_connection($link)) return; + + global $pluginhost; + if (!$_REQUEST['mobile']) { - if ($mobile->isTablet()) { - header('Location: digest.php'); + if ($mobile->isTablet() && $pluginhost->get_plugin("digest")) { + header('Location: backend.php?op=digest'); exit; } else if ($mobile->isMobile()) { header('Location: mobile/index.php'); @@ -28,9 +34,6 @@ } } - $link = db_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME); - - if (!init_connection($link)) return; login_sequence($link); @@ -71,10 +74,11 @@ get_plugins() as $n => $p) { + if (method_exists($p, "get_js")) { + echo JSMin::minify($p->get_js()); } } @@ -110,7 +114,7 @@ - -
 
@@ -183,21 +185,8 @@ -   - - - - -