| @@ 585-593 (lines=9) @@ | ||
| 582 | { |
|
| 583 | $myts = MyTextSanitizer::getInstance(); |
|
| 584 | $sql = 'SELECT topic_id, topic_title, topic_imgurl FROM ' . $this->table . ' WHERE '; |
|
| 585 | if (!is_array($topic)) { |
|
| 586 | $sql .= ' topic_id=' . (int)$topic; |
|
| 587 | } else { |
|
| 588 | if (count($topic) > 0) { |
|
| 589 | $sql .= ' topic_id IN (' . implode(',', $topic) . ')'; |
|
| 590 | } else { |
|
| 591 | return null; |
|
| 592 | } |
|
| 593 | } |
|
| 594 | $result = $this->db->query($sql); |
|
| 595 | while ($row = $this->db->fetchArray($result)) { |
|
| 596 | $topicstitles[$row['topic_id']] = array('title' => $myts->displayTarea($row['topic_title']), 'picture' => XOOPS_URL . '/uploads/news/image/' . $row['topic_imgurl']); |
|
| @@ 377-385 (lines=9) @@ | ||
| 374 | . ' OR expired = 0) '; |
|
| 375 | ||
| 376 | if ((int)$topic != 0) { |
|
| 377 | if (!is_array($topic)) { |
|
| 378 | $sql .= ' AND topicid=' . (int)$topic . ' AND (ihome=1 OR ihome=0)'; |
|
| 379 | } else { |
|
| 380 | if (count($topic) > 0) { |
|
| 381 | $sql .= ' AND topicid IN (' . implode(',', $topic) . ')'; |
|
| 382 | } else { |
|
| 383 | return null; |
|
| 384 | } |
|
| 385 | } |
|
| 386 | } else { |
|
| 387 | if ($checkRight) { |
|
| 388 | $topics = news_MygetItemIds('news_view'); |
|