]> git.wh0rd.org - tt-rss.git/blobdiff - index.php
support comments on simplepie properly
[tt-rss.git] / index.php
index 1ecf1f9f57787b07d7f8bfc51e5833e67e3a40a9..445a8fa75e2b5b8da50990b62d3f6f545cb7f907 100644 (file)
--- a/index.php
+++ b/index.php
@@ -5,8 +5,8 @@
                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";
 
        $mobile = new Mobile_Detect();
 
-       if ($mobile->isMobile() && !$mobile->isTablet() && !$_REQUEST['mobile']) {
-               header('Location: mobile/index.php');
-               exit;
+       if (!$_REQUEST['mobile']) {
+               if ($mobile->isTablet()) {
+                       header('Location: digest.php');
+                       exit;
+               } else if ($mobile->isMobile()) {
+                       header('Location: mobile/index.php');
+                       exit;
+               }
        }
 
        $link = db_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME);
                }
 
                foreach (array("tt-rss", "functions", "feedlist", "viewfeed", "FeedTree") as $js) {
-                       echo JSMin::minify(file_get_contents("js/$js.js"));
+                       if (!isset($_GET['debug'])) {
+                               echo JSMin::minify(file_get_contents("js/$js.js"));
+                       } else {
+                               echo file_get_contents("js/$js.js");
+                       }
                }
        ?>
        </script>
 </div>
 
 <div id="header">
-       <?php if (!SINGLE_USER_MODE && !(ALLOW_REMOTE_USER_AUTH && AUTO_LOGIN)) { ?>
+       <?php if (!$_SESSION["hide_hello"]) { ?>
                        <?php echo __('Hello,') ?> <b><?php echo $_SESSION["name"] ?></b> |
        <?php } ?>
        <a href="prefs.php"><?php echo __('Preferences') ?></a>
                                <?php echo __('Comments?') ?></a>
        <?php } ?>
 
-       <?php if (!SINGLE_USER_MODE && !(ALLOW_REMOTE_USER_AUTH && AUTO_LOGIN)) { ?>
+       <?php if (!$_SESSION["hide_logout"]) { ?>
                        | <a href="backend.php?op=logout"><?php echo __('Logout') ?></a>
        <?php } ?>
 
                </select>
 
                <button dojoType="dijit.form.Button" name="update"
-                       onclick="scheduleFeedUpdate()">
+                       onclick="viewCurrentFeed()">
                        <?php echo __('Update') ?></button>
 
                <button dojoType="dijit.form.Button"