@@ 134-147 (lines=14) @@ | ||
131 | $criteria->setLimit($limit); |
|
132 | ||
133 | $tags = empty($list) ? '' : array($blog_prefix . 'blog_title', $blog_prefix . 'blog_time'); |
|
134 | switch ($query_type) { |
|
135 | case 'category': |
|
136 | $blogs_obj =& $blog_handler->getByCategory($criteria, $tags); |
|
137 | $count_blog = $blog_handler->getCountByCategory($criteria); |
|
138 | break; |
|
139 | case 'bookmark': |
|
140 | $blogs_obj =& $blog_handler->getByBookmark($criteria, $tags); |
|
141 | $count_blog = $blog_handler->getCountByBookmark($criteria); |
|
142 | break; |
|
143 | default: |
|
144 | $blogs_obj =& $blog_handler->getAll($criteria, $tags); |
|
145 | $count_blog = $blog_handler->getCount($criteria); |
|
146 | break; |
|
147 | } |
|
148 | ||
149 | /* Objects to array */ |
|
150 | $blogs = array(); |
@@ 178-191 (lines=14) @@ | ||
175 | $article_prefix . 'blog_id', |
|
176 | $article_prefix . 'art_time' |
|
177 | ); |
|
178 | switch ($query_type) { |
|
179 | case 'category': |
|
180 | $articles_obj =& $article_handler->getByCategory($criteria, $tags); |
|
181 | $count_article = $article_handler->getCountByCategory($criteria); |
|
182 | break; |
|
183 | case 'bookmark': |
|
184 | $articles_obj =& $article_handler->getByBookmark($criteria, $tags); |
|
185 | $count_article = $article_handler->getCountByBookmark($criteria); |
|
186 | break; |
|
187 | default: |
|
188 | $articles_obj =& $article_handler->getAll($criteria, $tags); |
|
189 | $count_article = $article_handler->getCount($criteria); |
|
190 | break; |
|
191 | } |
|
192 | ||
193 | if (!empty($blog_data)) { |
|
194 | $blogs[$blog_data['id']] = $blog_data['title']; |