| @@ 403-411 (lines=9) @@ | ||
| 400 | . ' OR expired = 0) '; |
|
| 401 | ||
| 402 | if ((int)$topic != 0) { |
|
| 403 | if (!is_array($topic)) { |
|
| 404 | $sql .= ' AND topicid=' . (int)$topic . ' AND (ihome=1 OR ihome=0)'; |
|
| 405 | } else { |
|
| 406 | if (count($topic) > 0) { |
|
| 407 | $sql .= ' AND topicid IN (' . implode(',', $topic) . ')'; |
|
| 408 | } else { |
|
| 409 | return null; |
|
| 410 | } |
|
| 411 | } |
|
| 412 | } else { |
|
| 413 | if ($checkRight) { |
|
| 414 | $topics = news_MygetItemIds('news_view'); |
|
| @@ 600-608 (lines=9) @@ | ||
| 597 | { |
|
| 598 | $myts = MyTextSanitizer::getInstance(); |
|
| 599 | $sql = 'SELECT topic_id, topic_title, topic_imgurl FROM ' . $this->table . ' WHERE '; |
|
| 600 | if (!is_array($topic)) { |
|
| 601 | $sql .= ' topic_id=' . (int)$topic; |
|
| 602 | } else { |
|
| 603 | if (count($topic) > 0) { |
|
| 604 | $sql .= ' topic_id IN (' . implode(',', $topic) . ')'; |
|
| 605 | } else { |
|
| 606 | return null; |
|
| 607 | } |
|
| 608 | } |
|
| 609 | $result = $this->db->query($sql); |
|
| 610 | while ($row = $this->db->fetchArray($result)) { |
|
| 611 | $topicstitles[$row['topic_id']] = array( |
|