]> git.mxchange.org Git - friendica.git/blobdiff - src/Object/Thread.php
Use a constant fieldlist
[friendica.git] / src / Object / Thread.php
index a03bae6e9d1da65f3b052293fb0d1090e86f8d72..799029a28117ec8844481b76aa0c6651957e540a 100644 (file)
@@ -17,7 +17,7 @@ require_once 'include/text.php';
  */
 class Thread extends BaseObject
 {
-       private $parents = array();
+       private $parents = [];
        private $mode = null;
        private $writable = false;
        private $profile_owner = 0;
@@ -60,14 +60,14 @@ class Thread extends BaseObject
                                break;
                        case 'profile':
                                $this->profile_owner = $a->profile['profile_uid'];
-                               $this->writable = can_write_wall($a, $this->profile_owner);
+                               $this->writable = can_write_wall($this->profile_owner);
                                break;
                        case 'display':
                                $this->profile_owner = $a->profile['uid'];
-                               $this->writable = can_write_wall($a, $this->profile_owner) || $writable;
+                               $this->writable = can_write_wall($this->profile_owner) || $writable;
                                break;
                        case 'community':
-                               $this->profile_owner = local_user();
+                               $this->profile_owner = 0;
                                $this->writable = $writable;
                                break;
                        default:
@@ -172,7 +172,7 @@ class Thread extends BaseObject
        public function getTemplateData($conv_responses)
        {
                $a = self::getApp();
-               $result = array();
+               $result = [];
                $i = 0;
 
                foreach ($this->parents as $item) {