]> git.mxchange.org Git - friendica.git/commitdiff
Got of the get_* function about data, use get_data_value instead (except for get_id...
authorDomovoy <domovoy@errlock.org>
Sat, 11 Aug 2012 15:51:25 +0000 (17:51 +0200)
committerDomovoy <domovoy@errlock.org>
Sat, 11 Aug 2012 15:51:25 +0000 (17:51 +0200)
object/Conversation.php
object/Item.php

index 6675a005306b0315a13ac0b08d4c0047c1e4b3b2..a42e6d038da4eceec573324b53981887d8ce360b 100644 (file)
@@ -54,7 +54,7 @@ class Conversation extends BaseObject {
                $result = array();
 
                foreach($this->threads as $item) {
-                       if($item->get_network() === NETWORK_MAIL && local_user() != $item->get_uid())
+                       if($item->get_data_value('network') === NETWORK_MAIL && local_user() != $item->get_data_value('uid'))
                                continue;
                        $item_data = $item->get_template_data($cmnt_tpl, $this->mode, $alike, $dlike);
                        if(!$item_data) {
index a9115ee08e8759bc66c95b56b2ff34f54e5570fc..8deabb1b611f40a829280b75d96964220d4d8bc0 100644 (file)
@@ -107,7 +107,7 @@ class Item extends BaseObject {
                if(($normalised != 'mailbox') && (x($a->contacts,$normalised)))
                        $profile_avatar = $a->contacts[$normalised]['thumb'];
                else
-                       $profile_avatar = (((strlen($item['author-avatar'])) && $diff_author) ? $item['author-avatar'] : $a->get_cached_avatar_image($this->get_thumb()));
+                       $profile_avatar = (((strlen($item['author-avatar'])) && $diff_author) ? $item['author-avatar'] : $a->get_cached_avatar_image($this->get_data_value('thumb')));
 
                $locate = array('location' => $item['location'], 'coord' => $item['coord'], 'html' => '');
                call_hooks('render_location',$locate);
@@ -334,18 +334,6 @@ class Item extends BaseObject {
        public function get_id() {
                return $this->get_data_value('id');
        }
-       
-       public function get_network() {
-               return $this->get_data_value('network');
-       }
-       
-       public function get_uid() {
-               return $this->get_data_value('uid');
-       }
-       
-       public function get_thumb() {
-               return $this->get_data_value('thumb');
-       }
 
        /**
         * Add a child item
@@ -434,7 +422,7 @@ class Item extends BaseObject {
         *              _ value on success
         *              _ false on failure
         */
-       private function get_data_value($name) {
+       public function get_data_value($name) {
                if(!x($this->data, $name)) {
                        logger('[ERROR] Item::get_data_value : Item has no value name "'. $name .'".', LOGGER_DEBUG);
                        return false;