]> git.wh0rd.org - tt-rss.git/blobdiff - index.php
more work on singleton-based DB
[tt-rss.git] / index.php
index 7fb7a7878732c146cfbc0a16f1f1d6eb34ccb85c..66e236dae28664e781243d8603f767b831d0a2fe 100644 (file)
--- a/index.php
+++ b/index.php
@@ -19,6 +19,7 @@
        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";
@@ -31,7 +32,7 @@
 
        $link = db_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME);
 
-       if (!init_connection($link)) return;
+       if (!init_plugins($link)) return;
 
        global $pluginhost;
 
@@ -50,8 +51,6 @@
 
        login_sequence($link);
 
-       no_cache_incantation();
-
        header('Content-Type: text/html; charset=utf-8');
 
 ?>
        <?php
                require 'lib/jshrink/Minifier.php';
 
+               print get_minified_js(array("tt-rss",
+                       "functions", "feedlist", "viewfeed", "FeedTree"));
+
                global $pluginhost;
 
                foreach ($pluginhost->get_plugins() as $n => $p) {
                        }
                }
 
-               print get_minified_js(array("tt-rss",
-                       "functions", "feedlist", "viewfeed", "FeedTree"));
-
                init_js_translations();
        ?>
        </script>
        </div>
 </div>
 
-<div style="display : none" onclick="Element.hide(this)" id="small_article_preview"></div>
-
-<div id="notify" class="notify"><span id="notify_body">&nbsp;</span></div>
+<div id="notify" class="notify" style="display : none"></div>
 <div id="cmdline" style="display : none"></div>
 <div id="headlines-tmp" style="display : none"></div>
 
                        <option selected="selected" value="default"><?php echo __('Default') ?></option>
                        <option value="feed_dates"><?php echo __('Newest first') ?></option>
                        <option value="date_reverse"><?php echo __('Oldest first') ?></option>
+                       <option value="title"><?php echo __('Title') ?></option>
                </select>
 
-               <select title="<?php echo __('Mark feed as read') ?>"
-                       onchange="catchupCurrentFeed(event)"
-                       dojoType="dijit.form.Select" name="catchup_feed">
-                       <option selected="selected" value="default"><?php echo __('Mark as read') ?></option>
-                       <option value="all"><?php echo __('All articles') ?></option>
-                       <option value="1day"><?php echo __('Older than one day') ?></option>
-                       <option value="1week"><?php echo __('Older than one week') ?></option>
-                       <option value="2weeks"><?php echo __('Older than two weeks') ?></option>
-               </select>
+               <div dojoType="dijit.form.ComboButton" onclick="catchupCurrentFeed()">
+                       <span><?php echo __('Mark as read') ?></span>
+                       <div dojoType="dijit.DropDownMenu">
+                               <div dojoType="dijit.MenuItem" onclick="catchupCurrentFeed('1day')">
+                                       <?php echo __('Older than one day') ?>
+                               </div>
+                               <div dojoType="dijit.MenuItem" onclick="catchupCurrentFeed('1week')">
+                                       <?php echo __('Older than one week') ?>
+                               </div>
+                               <div dojoType="dijit.MenuItem" onclick="catchupCurrentFeed('2week')">
+                                       <?php echo __('Older than two weeks') ?>
+                               </div>
+                       </div>
+               </div>
 
                </form>
 
-               <?php
-                       global $pluginhost;
-                       foreach ($pluginhost->get_hooks($pluginhost::HOOK_TOOLBAR_BUTTON) as $p) {
-                                echo $p->hook_toolbar_button();
-                       }
-               ?>
-
                <div class="actionChooser">
 
+                       <?php
+                               global $pluginhost;
+                               foreach ($pluginhost->get_hooks($pluginhost::HOOK_TOOLBAR_BUTTON) as $p) {
+                                        echo $p->hook_toolbar_button();
+                               }
+                       ?>
+
                        <button id="net-alert" dojoType="dijit.form.Button" style="display : none" disabled="true"
                                title="<?php echo __("Communication problem with server.") ?>">
                        <img