summaryrefslogtreecommitdiff
path: root/lib/blog/index.php
diff options
context:
space:
mode:
authorroot <root@adnab.me>2014-01-31 17:59:33 +0100
committerroot <root@adnab.me>2014-01-31 17:59:33 +0100
commit2a274c011d177f5ad1e863301b8b88c560a3829d (patch)
treeb9570b1809a12cd386d7f4db8e72d414518fccfc /lib/blog/index.php
parent1ed8a37bea8882cd3a1aa0f421dbc15493a781a0 (diff)
downloadBits-2a274c011d177f5ad1e863301b8b88c560a3829d.tar.gz
Bits-2a274c011d177f5ad1e863301b8b88c560a3829d.zip
Style bizarre
Diffstat (limited to 'lib/blog/index.php')
-rw-r--r--lib/blog/index.php5
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);