Minahito
minah****@users*****
2006年 3月 29日 (水) 00:15:07 JST
Index: xoops2jp/html/modules/base/class/comment.php diff -u xoops2jp/html/modules/base/class/comment.php:1.1.2.3 xoops2jp/html/modules/base/class/comment.php:1.1.2.4 --- xoops2jp/html/modules/base/class/comment.php:1.1.2.3 Tue Mar 28 22:29:21 2006 +++ xoops2jp/html/modules/base/class/comment.php Wed Mar 29 00:15:07 2006 @@ -66,6 +66,27 @@ return parent::delete($comment); } + + /** + * + * Return array of module id that comments are written. + * + * @return array + */ + function getModuleIds() + { + $ret = array(); + + $sql = "SELECT DISTINCT com_modid FROM " . $this->mTable; + $res = $this->db->query($sql); + if ($res) { + while ($row = $this->db->fetchArray($res)) { + $ret[] = $row['com_modid']; + } + } + + return $ret; + } } ?>