]> git.wh0rd.org Git - tt-rss.git/commitdiff
print_feed_cat_select: fix Uncategorized not recognized as default_id
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Thu, 16 Aug 2012 09:36:02 +0000 (13:36 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Thu, 16 Aug 2012 09:36:02 +0000 (13:36 +0400)
include/functions.php

index 0bb761f5dc94f21fe9fc62d98a7396ffc7c19887..1700a2e87a45caa109172ff742db490a6854a886 100644 (file)
                                        if (db_num_rows($result) > 0) {
                                                print "<option disabled=\"1\">--------</option>";
                                        }
-                                               print "<option value=\"0\">".__('Uncategorized')."</option>";
+
+                                       if ($default_id == 0) {
+                                               $is_selected = "selected=\"1\"";
+                                       } else {
+                                               $is_selected = "";
+                                       }
+
+                                       print "<option $is_selected value=\"0\">".__('Uncategorized')."</option>";
                                }
                                print "</select>";
                        }