| @@ 1578-1584 (lines=7) @@ | ||
| 1575 | ); |
|
| 1576 | $result = $this->_config->getDb()->query($query); |
|
| 1577 | ||
| 1578 | if ($this->_config->getDb()->numRows($result) > 0) { |
|
| 1579 | while ($row = $this->_config->getDb()->fetchObject($result)) { |
|
| 1580 | $question = $row->question; |
|
| 1581 | } |
|
| 1582 | } else { |
|
| 1583 | $question = $this->pmf_lang['no_cats']; |
|
| 1584 | } |
|
| 1585 | ||
| 1586 | return $question; |
|
| 1587 | } |
|
| @@ 1725-1730 (lines=6) @@ | ||
| 1722 | ||
| 1723 | $result = $this->_config->getDb()->query($query); |
|
| 1724 | ||
| 1725 | if ($this->_config->getDb()->numRows($result) > 0) { |
|
| 1726 | $row = $this->_config->getDb()->fetchObject($result); |
|
| 1727 | $answerPreview = strip_tags($row->answer); |
|
| 1728 | } else { |
|
| 1729 | $answerPreview = $this->_config->get('main.metaDescription'); |
|
| 1730 | } |
|
| 1731 | ||
| 1732 | return PMF_Utils::makeShorterText($answerPreview, $wordCount); |
|
| 1733 | } |
|
| @@ 2873-2877 (lines=5) @@ | ||
| 2870 | ||
| 2871 | $result = $this->_config->getDb()->query($query); |
|
| 2872 | ||
| 2873 | if ($this->_config->getDb()->numRows($result) > 0) { |
|
| 2874 | while (($row = $this->_config->getDb()->fetchObject($result))) { |
|
| 2875 | $permissions[] = (int) $row->permission; |
|
| 2876 | } |
|
| 2877 | } |
|
| 2878 | ||
| 2879 | return $permissions; |
|
| 2880 | } |
|
| @@ 659-663 (lines=5) @@ | ||
| 656 | PMF_Db::getTablePrefix()); |
|
| 657 | $result = $this->_config->getDb()->query($query); |
|
| 658 | ||
| 659 | if ($this->_config->getDb()->numRows($result) > 0) { |
|
| 660 | while ($row = $this->_config->getDb()->fetchObject($result)) { |
|
| 661 | $number[$row->category_id] = $row->number; |
|
| 662 | } |
|
| 663 | } |
|
| 664 | ||
| 665 | $output = '<ul class="pmf-category-overview">'; |
|
| 666 | $open = 0; |
|
| @@ 1642-1646 (lines=5) @@ | ||
| 1639 | ||
| 1640 | $result = $this->_config->getDb()->query($query); |
|
| 1641 | ||
| 1642 | if ($this->_config->getDb()->numRows($result) > 0) { |
|
| 1643 | while ($row = $this->_config->getDb()->fetchObject($result)) { |
|
| 1644 | $numRecordsByCat[$row->category_id] = $row->number; |
|
| 1645 | } |
|
| 1646 | } |
|
| 1647 | ||
| 1648 | return $numRecordsByCat; |
|
| 1649 | } |
|
| @@ 1678-1682 (lines=5) @@ | ||
| 1675 | PMF_Db::getTablePrefix()); |
|
| 1676 | $result = $this->_config->getDb()->query($query); |
|
| 1677 | ||
| 1678 | if ($this->_config->getDb()->numRows($result) > 0) { |
|
| 1679 | while ($row = $this->_config->getDb()->fetchObject($result)) { |
|
| 1680 | $matrix[$row->id_cat][$row->id] = true; |
|
| 1681 | } |
|
| 1682 | } |
|
| 1683 | ||
| 1684 | return $matrix; |
|
| 1685 | } |
|