]> git.mxchange.org Git - friendica.git/blobdiff - src/Object/Post.php
Added some logging
[friendica.git] / src / Object / Post.php
index a1b3941aeff3a9b60ff54f6c2406a8e444a06d5c..d9f0d44d67df8ecc585916890ef5cb047d9e6fe6 100644 (file)
@@ -409,7 +409,9 @@ class Post
                }
 
                $direction = [];
-               if (DI::config()->get('debug', 'show_direction')) {
+               if (!empty($item['direction'])) {
+                       $direction = $item['direction'];
+               } elseif (DI::config()->get('debug', 'show_direction')) {
                        $conversation = DBA::selectFirst('conversation', ['direction'], ['item-uri' => $item['uri']]);
                        if (!empty($conversation['direction']) && in_array($conversation['direction'], [1, 2])) {
                                $title = [1 => DI::l10n()->t('Pushed'), 2 => DI::l10n()->t('Pulled')];
@@ -495,6 +497,7 @@ class Post
                        'uriid'           => $item['uri-id'],
                        'return'          => (DI::args()->getCommand()) ? bin2hex(DI::args()->getCommand()) : '',
                        'direction'       => $direction,
+                       'reshared'        => $item['reshared'] ?? '',
                        'delivery'        => [
                                'queue_count'       => $item['delivery_queue_count'],
                                'queue_done'        => $item['delivery_queue_done'] + $item['delivery_queue_failed'], /// @todo Possibly display it separately in the future
@@ -902,21 +905,16 @@ class Post
 
                $comment_box = '';
                $conv = $this->getThread();
-               $ww = '';
-               if (($conv->getMode() === 'network') && $this->isWallToWall()) {
-                       $ww = 'ww';
-               }
 
                if ($conv->isWritable() && $this->isWritable()) {
-                       $qcomment = null;
-
                        /*
                         * Hmmm, code depending on the presence of a particular addon?
                         * This should be better if done by a hook
                         */
+                       $qcomment = null;
                        if (Addon::isEnabled('qcomment')) {
-                               $qc = ((local_user()) ? DI::pConfig()->get(local_user(), 'qcomment', 'words') : null);
-                               $qcomment = (($qc) ? explode("\n", $qc) : null);
+                               $words = DI::pConfig()->get(local_user(), 'qcomment', 'words');
+                               $qcomment = $words ? explode("\n", $words) : [];
                        }
 
                        // Fetch the user id from the parent when the owner user is empty
@@ -958,7 +956,6 @@ class Post
                                '$preview'     => DI::l10n()->t('Preview'),
                                '$indent'      => $indent,
                                '$sourceapp'   => DI::l10n()->t($a->sourcename),
-                               '$ww'          => $conv->getMode() === 'network' ? $ww : '',
                                '$rand_num'    => Crypto::randomDigits(12)
                        ]);
                }