• R/O
  • SSH
  • HTTPS

jeanscms: コミット


コミットメタ情報

リビジョン356 (tree)
日時2014-12-18 06:25:13
作者kmorimatsu

ログメッセージ

Hide comments when HIDDEN flags are up.

変更サマリ

差分

--- plugins/LatestComments/trunk/jp_LatestComments.php (revision 355)
+++ plugins/LatestComments/trunk/jp_LatestComments.php (revision 356)
@@ -18,7 +18,7 @@
1818 return '_JP_LATESTCOMMENTS_DESC';
1919 }
2020 static public function version(){
21- return '0.1.2';
21+ return '0.1.3';
2222 }
2323 static public function tag_latestcomments(&$data,$skin=false,$max=false,$gid=false){
2424 if (!$max) $max=isset($data['max']) ? $data['max']:10;
@@ -26,12 +26,14 @@
2626 $select='SELECT g.id as gid, ExtractValue(g.xml,"url") as url, c.id as id, c.itemid as itemid, c.body as body, c.author as author, c.flags as flags, c.xml as xml';
2727 if ($gid) {
2828 $query=$select.' FROM jeans_comment as c, jeans_item as i, jeans_group as g
29- WHERE c.itemid=i.id AND NOT i.flags & <%const:sql::FLAG_HIDDEN%>
29+ WHERE c.itemid=i.id AND NOT c.flags & <%const:sql::FLAG_HIDDEN%>
30+ AND NOT i.flags & <%const:sql::FLAG_HIDDEN%>
3031 AND i.gid=g.id AND g.id=<%gid%> AND NOT g.flags & <%const:sql::FLAG_HIDDEN%>
3132 ORDER BY c.id ASC LIMIT <%max%> ';
3233 } else {
3334 $query=$select.' FROM jeans_comment as c, jeans_item as i, jeans_group as g
34- WHERE c.itemid=i.id AND NOT i.flags & <%const:sql::FLAG_HIDDEN%>
35+ WHERE c.itemid=i.id AND NOT c.flags & <%const:sql::FLAG_HIDDEN%>
36+ AND NOT i.flags & <%const:sql::FLAG_HIDDEN%>
3537 AND i.gid=g.id AND NOT g.flags & <%const:sql::FLAG_HIDDEN%>
3638 ORDER BY c.id DESC LIMIT <%max%> ';
3739 }
旧リポジトリブラウザで表示