]> git.wh0rd.org Git - tt-rss.git/commitdiff
do some warning housekeeping
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Fri, 5 Nov 2010 14:16:29 +0000 (17:16 +0300)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Fri, 5 Nov 2010 14:16:29 +0000 (17:16 +0300)
backend.php
db-prefs.php
functions.php

index e13019d45f9106e202e76a64d6edc7da4fc860e9..521472051473027336449e3998d780789da67fc8 100644 (file)
                        $subop = db_escape_string($_REQUEST["subop"]);
                        $view_mode = db_escape_string($_REQUEST["view_mode"]);
                        $limit = (int) get_pref($link, "DEFAULT_ARTICLE_LIMIT");
-                       $cat_view = db_escape_string($_REQUEST["cat"]);
-                       $next_unread_feed = db_escape_string($_REQUEST["nuf"]);
-                       $offset = db_escape_string($_REQUEST["skip"]);
-                       $vgroup_last_feed = db_escape_string($_REQUEST["vgrlf"]);
+                       @$cat_view = db_escape_string($_REQUEST["cat"]);
+                       @$next_unread_feed = db_escape_string($_REQUEST["nuf"]);
+                       @$offset = db_escape_string($_REQUEST["skip"]);
+                       @$vgroup_last_feed = db_escape_string($_REQUEST["vgrlf"]);
                        $csync = $_REQUEST["csync"];
                        $order_by = db_escape_string($_REQUEST["order_by"]);
 
index 228fa7ff8784f5a563e13359c0505c3129e1799e..af187df1b9849e0924b3f64a52e07c2f3adef377 100644 (file)
 
                $pref_name = db_escape_string($pref_name);
                $prefs_cache = true;
+               $profile = false;
 
                if (!$user_id) {
                        $user_id = $_SESSION["uid"];
-                       $profile = $_SESSION["profile"];
+                       @$profile = $_SESSION["profile"];
                } else {
                        $user_id = sprintf("%d", $user_id);
                        $prefs_cache = false;
@@ -29,7 +30,7 @@
                if (get_schema_version($link) < 63) $profile_qpart = "";
 
                if ($prefs_cache && !defined('DISABLE_SESSIONS') && !SINGLE_USER_MODE) {        
-                       if ($_SESSION["prefs_cache"] && $_SESSION["prefs_cache"][$pref_name]) {
+                       if ($_SESSION["prefs_cache"] && @$_SESSION["prefs_cache"][$pref_name]) {
                                $tuple = $_SESSION["prefs_cache"][$pref_name];
                                return convert_pref_type($tuple["value"], $tuple["type"]);
                        }
@@ -84,7 +85,7 @@
 
                if (!$user_id) {
                        $user_id = $_SESSION["uid"];
-                       $profile = $_SESSION["profile"];
+                       @$profile = $_SESSION["profile"];
                } else {
                        $user_id = sprintf("%d", $user_id);
                        $prefs_cache = false;
index 256a6402eb7db893f85187a9760a839a1ea04035..11c539153fd5fa2711805abd2a0a4f5a26ceac9d 100644 (file)
        }
 
        function get_user_theme_path($link) {
+               $theme_path = '';
 
                if (get_schema_version($link) >= 63 && $_SESSION["uid"]) {
                        $theme_name = get_pref($link, "_THEME_ID");
                                $feeds_qpart = "ttrss_user_entries.feed_id = ttrss_feeds.id AND";
                        } else {
                                $from_qpart = "ttrss_user_entries,ttrss_entries";
+                               $feeds_qpart = '';
                        }
 
                        $query = "SELECT count(int_id) AS unread 
 
                if (!$owner_uid) $owner_uid = $_SESSION["uid"];
 
+               $ext_tables_part = "";
+
                        if ($search) {
                        
                                $search_query_part = getSearchSql($search, $match_on);
                                        FROM
                                                $from_qpart
                                        WHERE
-                                       $group_limit_part
                                        $feed_check_qpart
                                        ttrss_user_entries.ref_id = ttrss_entries.id AND
                                        ttrss_user_entries.owner_uid = '$owner_uid' AND
                        print "<div id=\"subtoolbar_ftitle\">";
 
                        if ($feed_site_url) {
-                               if (!$bottom) {
-                                       $target = "target=\"_blank\"";
-                               }
+                               $target = "target=\"_blank\"";
                                print "<a title=\"".__("Visit the website")."\"$target href=\"$feed_site_url\">".
                                        truncate_string($feed_title,30)."</a>";
                        } else {
 
                        if ($search) {
                                $search_q = "&q=$search&m=$match_on&smode=$search_mode";
+                       } else {
+                               $search_q = "";
                        }
 
                        $rss_link = "backend.php?op=rss&id=$feed_id&is_cat=$is_cat&view-mode=$view_mode$search_q";
                        catchup_feed($link, $subop_split[1], false);
                }
 
+               // FIXME: might break tag display?
 
-               if ($feed_id > 0) {             
+               if ($feed > 0) {                
                        $result = db_query($link,
                                "SELECT id FROM ttrss_feeds WHERE id = '$feed' LIMIT 1");
                
 
                /// START /////////////////////////////////////////////////////////////////////////////////
 
-               $search = db_escape_string($_REQUEST["query"]);
+               @$search = db_escape_string($_REQUEST["query"]);
 
                if ($search) { 
                        $disable_cache = true;
                }
 
-               $search_mode = db_escape_string($_REQUEST["search_mode"]);
-               $match_on = db_escape_string($_REQUEST["match_on"]);
+               @$search_mode = db_escape_string($_REQUEST["search_mode"]);
+               @$match_on = db_escape_string($_REQUEST["match_on"]);
 
                if (!$match_on) {
                        $match_on = "both";
 #                                                      $line["feed_title"]."</a>       
 
                                        if (!get_pref($link, 'VFEED_GROUP_BY_FEED')) {
-                                               if ($line["feed_title"]) {                      
+                                               if (@$line["feed_title"]) {                     
                                                        print "<span class=\"hlFeed\">
                                                                (<a href=\"javascript:viewfeed($feed_id, '', false)\">".
                                                                $line["feed_title"]."</a>)
 
                                        print "<td class='hlMarkedPic'>$score_pic</td>";
 
-                                       if ($line["feed_title"] && !get_pref($link, 'VFEED_GROUP_BY_FEED')) {
+                                       if (@$line["feed_title"] && !get_pref($link, 'VFEED_GROUP_BY_FEED')) {
                                                print "<td onclick=\"viewfeed($feed_id)\" class=\"hlFeedIcon\">$feed_icon_img</td>";
                                        }
 
 
                        $label_id = $line["id"];
                        $label_caption = $line["caption"];
+                       $id = $line["id"];
 
                        if ($feed_id < -10 && $feed_id == -11-$label_id) {
                                print "<li id=\"LHDL-$id\"