]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/Update/Network.php
old boot.php functions replaced in src/module (4)
[friendica.git] / src / Module / Update / Network.php
index 2b71d23c4e4c9ea7973afe71aaef772f9df046fc..c8eefab918ed29f439d772ac0ceddbf18cafd3cc 100644 (file)
 
 namespace Friendica\Module\Update;
 
+use Friendica\Core\Session;
 use Friendica\Core\System;
 use Friendica\DI;
+use Friendica\Model\Item;
 use Friendica\Model\Post;
 use Friendica\Module\Conversation\Network as NetworkModule;
 
@@ -31,8 +33,7 @@ class Network extends NetworkModule
        protected function rawContent(array $request = [])
        {
                if (!isset($_GET['p']) || !isset($_GET['item'])) {
-                       DI::page()->logRuntime();
-                       exit();
+                       System::exit();
                }
 
                $this->parseRequest($_GET);
@@ -56,7 +57,7 @@ class Network extends NetworkModule
                        } elseif (self::$order === 'received') {
                                // Only load new toplevel posts
                                $conditionFields['unseen'] = true;
-                               $conditionFields['gravity'] = GRAVITY_PARENT;
+                               $conditionFields['gravity'] = Item::GRAVITY_PARENT;
                        } else {
                                // Load all unseen items
                                $conditionFields['unseen'] = true;
@@ -75,7 +76,7 @@ class Network extends NetworkModule
                                $ordering = '`commented`';
                        }
 
-                       $o = DI::conversation()->create($items, 'network', $profile_uid, false, $ordering, local_user());
+                       $o = DI::conversation()->create($items, 'network', $profile_uid, false, $ordering, Session::getLocalUser());
                }
 
                System::htmlUpdateExit($o);