diff options
Diffstat (limited to 'lib/blog/index.php')
-rw-r--r-- | lib/blog/index.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/blog/index.php b/lib/blog/index.php index dd353d3..08aa630 100644 --- a/lib/blog/index.php +++ b/lib/blog/index.php @@ -51,7 +51,7 @@ $q = (isset($fvalues['tag']) ? "LEFT JOIN blog_tags bb ON bb.post = blog_posts.id AND bb.tag = '" . escs($fvalues['tag'])."' " : ""). "WHERE blog_posts.draft = 0 ". (isset($fvalues['author']) ? 'AND blog_posts.owner = ' . intval($fvalues['author']) .' ' : ''). - (isset($fvalues['date']) ? "AND blog_posts.date >= '" . escs(str_replace('.', '-', $fvalues['date'])) ."-01 00:00:00' " . + (isset($fvalues['date']) ? "AND blog_posts.date >= '" . escs(str_replace('_', '-', $fvalues['date'])) ."-01 00:00:00' " . "AND blog_posts.date <= '" . escs(str_replace('.', '-', $fvalues['date'])) . "-31 23:59:59'" : ''). (isset($fvalues['tag']) ? " AND bb.post != 0 " : ""). "GROUP BY blog_posts.id ". @@ -64,9 +64,10 @@ while ($pp = mysql_fetch_assoc($n)) { count_in('author', $pp['owner_id'], $pp['owner']); $tags = explode(', ', $pp['tags']); foreach ($tags as $tag) { + if ($tag == "") continue; count_in('tag', $tag, $tag); } - count_in('date', str_replace('-', '.', $pp['month']), $pp['month']); + count_in('date', str_replace('-', '_', $pp['month']), $pp['month']); } $can_post = ($user['priv'] >= $apps['blog']['drafts'] && $user['id'] != 0); |