]> git.mxchange.org Git - friendica.git/commitdiff
Correct identification of wall-to-wall items (see friendica/friendica@96b9cda43df132a...
authorDomovoy <domovoy@errlock.org>
Sat, 18 Aug 2012 15:36:38 +0000 (17:36 +0200)
committerDomovoy <domovoy@errlock.org>
Sat, 18 Aug 2012 15:36:38 +0000 (17:36 +0200)
object/Item.php

index bfd2db711abcb02249fb62cfbf7a9f46492597d2..b1656ed0553dbc82f4c0aecdee59f0865a30a97b 100644 (file)
@@ -544,35 +544,35 @@ class Item extends BaseObject {
                                        $this->set_template('wall2wall');
                                        $this->wall_to_wall = true;
                                }
-                       }
-                       else if($this->get_data_value('owner-link')) {
-
-                               $owner_linkmatch = (($this->get_data_value('owner-link')) && link_compare($this->get_data_value('owner-link'),$this->get_data_value('author-link')));
-                               $alias_linkmatch = (($this->get_data_value('alias')) && link_compare($this->get_data_value('alias'),$this->get_data_value('author-link')));
-                               $owner_namematch = (($this->get_data_value('owner-name')) && $this->get_data_value('owner-name') == $this->get_data_value('author-name'));
-                               if((! $owner_linkmatch) && (! $alias_linkmatch) && (! $owner_namematch)) {
-
-                                       // The author url doesn't match the owner (typically the contact)
-                                       // and also doesn't match the contact alias. 
-                                       // The name match is a hack to catch several weird cases where URLs are 
-                                       // all over the park. It can be tricked, but this prevents you from
-                                       // seeing "Bob Smith to Bob Smith via Wall-to-wall" and you know darn
-                                       // well that it's the same Bob Smith. 
-
-                                       // But it could be somebody else with the same name. It just isn't highly likely. 
-                                       
-
-                                       $this->owner_photo = $this->get_data_value('owner-avatar');
-                                       $this->owner_name = $this->get_data_value('owner-name');
-                                       $this->set_template('wall2wall');
-                                       $this->wall_to_wall = true;
-                                       // If it is our contact, use a friendly redirect link
-                                       if((link_compare($this->get_data_value('owner-link'),$this->get_data_value('url'))) 
-                                               && ($this->get_data_value('network') === NETWORK_DFRN)) {
-                                               $this->owner_url = $this->get_redirect_url();
+                               else if($this->get_data_value('owner-link')) {
+
+                                       $owner_linkmatch = (($this->get_data_value('owner-link')) && link_compare($this->get_data_value('owner-link'),$this->get_data_value('author-link')));
+                                       $alias_linkmatch = (($this->get_data_value('alias')) && link_compare($this->get_data_value('alias'),$this->get_data_value('author-link')));
+                                       $owner_namematch = (($this->get_data_value('owner-name')) && $this->get_data_value('owner-name') == $this->get_data_value('author-name'));
+                                       if((! $owner_linkmatch) && (! $alias_linkmatch) && (! $owner_namematch)) {
+
+                                               // The author url doesn't match the owner (typically the contact)
+                                               // and also doesn't match the contact alias. 
+                                               // The name match is a hack to catch several weird cases where URLs are 
+                                               // all over the park. It can be tricked, but this prevents you from
+                                               // seeing "Bob Smith to Bob Smith via Wall-to-wall" and you know darn
+                                               // well that it's the same Bob Smith. 
+
+                                               // But it could be somebody else with the same name. It just isn't highly likely. 
+                                               
+
+                                               $this->owner_photo = $this->get_data_value('owner-avatar');
+                                               $this->owner_name = $this->get_data_value('owner-name');
+                                               $this->set_template('wall2wall');
+                                               $this->wall_to_wall = true;
+                                               // If it is our contact, use a friendly redirect link
+                                               if((link_compare($this->get_data_value('owner-link'),$this->get_data_value('url'))) 
+                                                       && ($this->get_data_value('network') === NETWORK_DFRN)) {
+                                                       $this->owner_url = $this->get_redirect_url();
+                                               }
+                                               else
+                                                       $this->owner_url = zrl($this->get_data_value('owner-link'));
                                        }
-                                       else
-                                               $this->owner_url = zrl($this->get_data_value('owner-link'));
                                }
                        }
                }