| @@ 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 | } |
|
| @@ 2865-2869 (lines=5) @@ | ||
| 2862 | ||
| 2863 | $result = $this->_config->getDb()->query($query); |
|
| 2864 | ||
| 2865 | if ($this->_config->getDb()->numRows($result) > 0) { |
|
| 2866 | while (($row = $this->_config->getDb()->fetchObject($result))) { |
|
| 2867 | $permissions[] = (int) $row->permission; |
|
| 2868 | } |
|
| 2869 | } |
|
| 2870 | ||
| 2871 | return $permissions; |
|
| 2872 | } |
|
| @@ 658-662 (lines=5) @@ | ||
| 655 | PMF_Db::getTablePrefix()); |
|
| 656 | $result = $this->_config->getDb()->query($query); |
|
| 657 | ||
| 658 | if ($this->_config->getDb()->numRows($result) > 0) { |
|
| 659 | while ($row = $this->_config->getDb()->fetchObject($result)) { |
|
| 660 | $number[$row->category_id] = $row->number; |
|
| 661 | } |
|
| 662 | } |
|
| 663 | ||
| 664 | $output = '<ul class="pmf-category-overview">'; |
|
| 665 | $open = 0; |
|
| @@ 1638-1642 (lines=5) @@ | ||
| 1635 | ||
| 1636 | $result = $this->_config->getDb()->query($query); |
|
| 1637 | ||
| 1638 | if ($this->_config->getDb()->numRows($result) > 0) { |
|
| 1639 | while ($row = $this->_config->getDb()->fetchObject($result)) { |
|
| 1640 | $numRecordsByCat[$row->category_id] = $row->number; |
|
| 1641 | } |
|
| 1642 | } |
|
| 1643 | ||
| 1644 | return $numRecordsByCat; |
|
| 1645 | } |
|
| @@ 1674-1678 (lines=5) @@ | ||
| 1671 | PMF_Db::getTablePrefix()); |
|
| 1672 | $result = $this->_config->getDb()->query($query); |
|
| 1673 | ||
| 1674 | if ($this->_config->getDb()->numRows($result) > 0) { |
|
| 1675 | while ($row = $this->_config->getDb()->fetchObject($result)) { |
|
| 1676 | $matrix[$row->id_cat][$row->id] = true; |
|
| 1677 | } |
|
| 1678 | } |
|
| 1679 | ||
| 1680 | return $matrix; |
|
| 1681 | } |
|