]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Save some else blocks that makes the code just more complex.
authorRoland Haeder <roland@mxchange.org>
Wed, 13 Jan 2016 16:28:28 +0000 (17:28 +0100)
committerRoland Häder <roland@mxchange.org>
Sun, 29 Mar 2020 22:21:22 +0000 (00:21 +0200)
Signed-off-by: Roland Haeder <roland@mxchange.org>
lib/noticelistitem.php

index aa4f6b7bc683f4383a88eae9e8b9e455fa5fc26a..240bc8952fac4295f0234eb26fb693bf87581387 100644 (file)
@@ -76,20 +76,19 @@ class NoticeListItem extends Widget
     function __construct(Notice $notice, Action $out=null, array $prefs=array())
     {
         parent::__construct($out);
+
+        $this->notice  = $notice;
+
         if (!empty($notice->repeat_of)) {
             $original = Notice::getKV('id', $notice->repeat_of);
-            if (!$original instanceof Notice) { // could have been deleted
-                $this->notice = $notice;
-            } else {
+            if ($original instanceof Notice) { // could have been deleted
                 $this->notice = $original;
                 $this->repeat = $notice;
             }
-        } else {
-            $this->notice  = $notice;
         }
 
         $this->profile = $this->notice->getProfile();
-        
+
         // integer preferences
         foreach(array('maxchars') as $key) {
             if (array_key_exists($key, $prefs)) {