| @@ 78-82 (lines=5) @@ | ||
| 75 | $i = 0; |
|
| 76 | while ($myrow = $xoopsDB->fetchArray($result)) { |
|
| 77 | $display = true; |
|
| 78 | if ($modid && $gpermHandler) { |
|
| 79 | if ($restricted && !$gpermHandler->checkRight('news_view', $myrow['topicid'], $groups, $modid)) { |
|
| 80 | $display = false; |
|
| 81 | } |
|
| 82 | } |
|
| 83 | ||
| 84 | if ($display) { |
|
| 85 | $ret[$i]['image'] = 'assets/images/news.png'; |
|
| @@ 118-122 (lines=5) @@ | ||
| 115 | $result = $xoopsDB->query($sql, $limit, $offset); |
|
| 116 | while ($myrow = $xoopsDB->fetchArray($result)) { |
|
| 117 | $display = true; |
|
| 118 | if ($modid && $gpermHandler) { |
|
| 119 | if ($restricted && !$gpermHandler->checkRight('news_view', $myrow['com_itemid'], $groups, $modid)) { |
|
| 120 | $display = false; |
|
| 121 | } |
|
| 122 | } |
|
| 123 | if ($i + 1 > $limit) { |
|
| 124 | $display = false; |
|
| 125 | } |
|