aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2013-09-12 22:41:09 +0200
committerGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2013-09-12 22:41:09 +0200
commit7627970862e03a9061ddced3423689e9dccd6f45 (patch)
tree2c18f481c218b3443ee172581fcaf3a5b2676b5c
parente15b7fd6ec5ae770ce232b2a0cea7b281254d96e (diff)
Corrected bug with the default "No Category"
The SQL optimisation patch had introduced a bug with "No Category", now solved
-rwxr-xr-xapp/controllers/feedController.php1
-rwxr-xr-xapp/models/Category.php2
-rw-r--r--app/models/Feed.php3
3 files changed, 5 insertions, 1 deletions
diff --git a/app/controllers/feedController.php b/app/controllers/feedController.php
index 18a46f322..d685857bd 100755
--- a/app/controllers/feedController.php
+++ b/app/controllers/feedController.php
@@ -17,6 +17,7 @@ class feedController extends ActionController {
if (Request::isPost ()) {
$url = Request::param ('url_rss');
$cat = Request::param ('category');
+ if (empty($cat)) $cat = '000000';
$user = Request::param ('username');
$pass = Request::param ('password');
$params = array ();
diff --git a/app/models/Category.php b/app/models/Category.php
index 362bce621..70cc0d16f 100755
--- a/app/models/Category.php
+++ b/app/models/Category.php
@@ -179,7 +179,7 @@ class CategoryDAO extends Model_pdo {
if ($prePopulateFeeds) {
$sql = 'SELECT c.id as c_id, c.name as c_name, c.color as c_color, count(e.id) as nbNotRead, f.* '
. 'FROM ' . $this->prefix . 'category c '
- . 'INNER JOIN ' . $this->prefix . 'feed f ON f.category = c.id '
+ . 'LEFT OUTER JOIN ' . $this->prefix . 'feed f ON f.category = c.id '
. 'LEFT OUTER JOIN ' . $this->prefix . 'entry e ON e.id_feed = f.id AND e.is_read = 0 '
. 'GROUP BY f.id '
. 'ORDER BY c.name, f.name';
diff --git a/app/models/Feed.php b/app/models/Feed.php
index e9e21f06a..2a93be757 100644
--- a/app/models/Feed.php
+++ b/app/models/Feed.php
@@ -502,6 +502,9 @@ class HelperFeed {
}
foreach ($listDAO as $key => $dao) {
+ if (empty ($dao['url'])) {
+ continue;
+ }
if (isset ($dao['id'])) {
$key = $dao['id'];
}