- if ($no_active=='active' && x($_GET,'order')) {
- switch($_GET['order']){
- case 'post': $postord_active = 'active'; $no_active=''; break;
- case 'comment' : $all_active = 'active'; $no_active=''; break;
- }
+ return $group;
+}
+
+/**
+ * @brief Sets the pager data and returns SQL
+ *
+ * @param App $a The global App
+ * @param integer $update Used for the automatic reloading
+ * @return string SQL with the appropriate LIMIT clause
+ */
+function networkPager($a, $update)
+{
+ if ($update) {
+ // only setup pagination on initial page view
+ return ' LIMIT 100';
+ }
+
+ // check if we serve a mobile device and get the user settings
+ // accordingly
+ if ($a->is_mobile) {
+ $itemspage_network = PConfig::get(local_user(), 'system', 'itemspage_mobile_network');
+ $itemspage_network = ((intval($itemspage_network)) ? $itemspage_network : 20);
+ } else {
+ $itemspage_network = PConfig::get(local_user(), 'system', 'itemspage_network');
+ $itemspage_network = ((intval($itemspage_network)) ? $itemspage_network : 40);
+ }
+
+ // now that we have the user settings, see if the theme forces
+ // a maximum item number which is lower then the user choice
+ if (($a->force_max_items > 0) && ($a->force_max_items < $itemspage_network)) {
+ $itemspage_network = $a->force_max_items;
+ }
+
+ $a->set_pager_itemspage($itemspage_network);
+
+ return sprintf(" LIMIT %d, %d ", intval($a->pager['start']), intval($a->pager['itemspage']));
+}
+
+/**
+ * @brief Sets items as seen
+ *
+ * @param array $condition The array with the SQL condition
+ */
+function networkSetSeen($condition)
+{
+ if (empty($condition)) {
+ return;