]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/Update/Network.php
Merge remote-tracking branch 'upstream/develop' into user-defined-channels
[friendica.git] / src / Module / Update / Network.php
index adb73141d6a11e951c4cb9ba118f89d59b84f7df..612d4079c8cb73654e9ab9b518a3e4c2c248af85 100644 (file)
@@ -35,25 +35,21 @@ class Network extends NetworkModule
 
                $this->parseRequest($request);
 
-               $profile_uid = intval($request['p']);
-
                $o = '';
 
-               if (empty($request['force'])) {
+               if (!$this->update && !$this->force) {
                        System::htmlUpdateExit($o);
                }
 
-               $items = $this->getItems();
-
-               if (self::$order === 'received') {
-                       $ordering = '`received`';
-               } elseif (self::$order === 'created') {
-                       $ordering = '`created`';
+               if ($this->timeline->isChannel($this->selectedTab, $this->session->getLocalUserId())) {
+                       $items = $this->getChannelItems();
+               } elseif ($this->timeline->isCommunity($this->selectedTab)) {
+                       $items = $this->getCommunityItems();
                } else {
-                       $ordering = '`commented`';
+                       $items = $this->getItems();
                }
 
-               $o = $this->conversation->render($items, Conversation::MODE_NETWORK, $profile_uid, false, $ordering, $this->session->getLocalUserId());
+               $o = $this->conversation->render($items, Conversation::MODE_NETWORK, true, false, $this->getOrder(), $this->session->getLocalUserId());
 
                System::htmlUpdateExit($o);
        }