@@ 1892-1928 (lines=37) @@ | ||
1889 | ||
1890 | $i = 1; |
|
1891 | $oldId = 0; |
|
1892 | while (($row = $this->_config->getDb()->fetchObject($result)) && $i <= $count) { |
|
1893 | if ($oldId != $row->id) { |
|
1894 | ||
1895 | if ($this->groupSupport) { |
|
1896 | if (!in_array($row->user_id, array(-1, $this->user)) || !in_array($row->group_id, $this->groups)) { |
|
1897 | continue; |
|
1898 | } |
|
1899 | } else { |
|
1900 | if (!in_array($row->user_id, array(-1, $this->user))) { |
|
1901 | continue; |
|
1902 | } |
|
1903 | } |
|
1904 | ||
1905 | $data['visits'] = $row->visits; |
|
1906 | $data['thema'] = $row->thema; |
|
1907 | $data['date'] = $row->datum; |
|
1908 | $data['last_visit'] = $row->last_visit; |
|
1909 | ||
1910 | $title = $row->thema; |
|
1911 | $url = sprintf( |
|
1912 | '%s?%saction=artikel&cat=%d&id=%d&artlang=%s', |
|
1913 | PMF_Link::getSystemRelativeUri(), |
|
1914 | $sids, |
|
1915 | $row->category_id, |
|
1916 | $row->id, |
|
1917 | $row->lang |
|
1918 | ); |
|
1919 | $oLink = new PMF_Link($url, $this->_config); |
|
1920 | $oLink->itemTitle = $row->thema; |
|
1921 | $oLink->tooltip = $title; |
|
1922 | $data['url'] = $oLink->toString(); |
|
1923 | ||
1924 | $topten[] = $data; |
|
1925 | $i++; |
|
1926 | } |
|
1927 | $oldId = $row->id; |
|
1928 | } |
|
1929 | ||
1930 | return $topten; |
|
1931 | } |
|
@@ 1998-2034 (lines=37) @@ | ||
1995 | ||
1996 | $i = 0; |
|
1997 | $oldId = 0; |
|
1998 | while (($row = $this->_config->getDb()->fetchObject($result)) && $i < $count ) { |
|
1999 | if ($oldId != $row->id) { |
|
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 | $i++; |
|
2032 | } |
|
2033 | $oldId = $row->id; |
|
2034 | } |
|
2035 | ||
2036 | return $latest; |
|
2037 | } |