| @@ 1896-1928 (lines=33) @@ | ||
| 1893 | $topten = []; | |
| 1894 | $data = []; | |
| 1895 | ||
| 1896 |         while ($row = $this->_config->getDb()->fetchObject($result)) { | |
| 1897 | ||
| 1898 |             if ($this->groupSupport) { | |
| 1899 |                 if (!in_array($row->user_id, array(-1, $this->user)) || !in_array($row->group_id, $this->groups)) { | |
| 1900 | continue; | |
| 1901 | } | |
| 1902 |             } else { | |
| 1903 |                 if (!in_array($row->user_id, array(-1, $this->user))) { | |
| 1904 | continue; | |
| 1905 | } | |
| 1906 | } | |
| 1907 | ||
| 1908 | $data['visits'] = $row->visits; | |
| 1909 | $data['thema'] = $row->thema; | |
| 1910 | $data['date'] = $row->datum; | |
| 1911 | $data['last_visit'] = $row->last_visit; | |
| 1912 | ||
| 1913 | $title = $row->thema; | |
| 1914 | $url = sprintf( | |
| 1915 | '%s?%saction=artikel&cat=%d&id=%d&artlang=%s', | |
| 1916 | PMF_Link::getSystemRelativeUri(), | |
| 1917 | $sids, | |
| 1918 | $row->category_id, | |
| 1919 | $row->id, | |
| 1920 | $row->lang | |
| 1921 | ); | |
| 1922 | $oLink = new PMF_Link($url, $this->_config); | |
| 1923 | $oLink->itemTitle = $row->thema; | |
| 1924 | $oLink->tooltip = $title; | |
| 1925 | $data['url'] = $oLink->toString(); | |
| 1926 | ||
| 1927 | $topten[] = $data; | |
| 1928 | } | |
| 1929 | ||
| 1930 | ||
| 1931 | return $topten; | |
| @@ 1999-2031 (lines=33) @@ | ||
| 1996 | $latest = []; | |
| 1997 | $data = []; | |
| 1998 | ||
| 1999 |         while (($row = $this->_config->getDb()->fetchObject($result))) { | |
| 2000 | ||
| 2001 |             if ($this->groupSupport) { | |
| 2002 |                 if (!in_array($row->user_id, array(-1, $this->user)) || !in_array($row->group_id, $this->groups)) { | |
| 2003 | continue; | |
| 2004 | } | |
| 2005 |             } else { | |
| 2006 |                 if (!in_array($row->user_id, array(-1, $this->user))) { | |
| 2007 | continue; | |
| 2008 | } | |
| 2009 | } | |
| 2010 | ||
| 2011 | $data['datum'] = $row->datum; | |
| 2012 | $data['thema'] = $row->thema; | |
| 2013 | $data['content'] = $row->content; | |
| 2014 | $data['visits'] = $row->visits; | |
| 2015 | ||
| 2016 | $title = $row->thema; | |
| 2017 | $url = sprintf( | |
| 2018 | '%s?%saction=artikel&cat=%d&id=%d&artlang=%s', | |
| 2019 | PMF_Link::getSystemRelativeUri(), | |
| 2020 | $sids, | |
| 2021 | $row->category_id, | |
| 2022 | $row->id, | |
| 2023 | $row->lang | |
| 2024 | ); | |
| 2025 | $oLink = new PMF_Link($url, $this->_config); | |
| 2026 | $oLink->itemTitle = $row->thema; | |
| 2027 | $oLink->tooltip = $title; | |
| 2028 | $data['url'] = $oLink->toString(); | |
| 2029 | ||
| 2030 | $latest[] = $data; | |
| 2031 | } | |
| 2032 | ||
| 2033 | return $latest; | |
| 2034 | } | |