]> git.mxchange.org Git - friendica.git/commitdiff
Some optimization
authorDomovoy <domovoy@errlock.org>
Fri, 24 Aug 2012 02:48:49 +0000 (04:48 +0200)
committerDomovoy <domovoy@errlock.org>
Fri, 24 Aug 2012 02:48:49 +0000 (04:48 +0200)
object/Item.php

index 86b792cffb9ec3f25506c8f628a579c4f03bdda2..153d8fb6755d20a7a49a570a027e01a3aa42ed31 100644 (file)
@@ -594,6 +594,9 @@ class Item extends BaseObject {
                        $tags = $this->get_data_value('tag');
                        if(strpos($tags, '@[url') !== FALSE) {
                                // We have at least one @ tag
+                               $this->set_template('wall2wall');
+                               $this->wall_to_wall = true;
+                               
                                $matches = array();
                                preg_match_all('/\@\[url=([^\]]+)\]([^\[]+)\[\/url\]/', $tags, $matches, PREG_SET_ORDER);
 
@@ -608,8 +611,6 @@ class Item extends BaseObject {
                                                $this->owner_url = zrl($r[0]['url']);
                                                $this->owner_name = $r[0]['name'];
                                                $this->owner_photo = $r[0]['photo'];
-                                               $this->set_template('wall2wall');
-                                               $this->wall_to_wall = true;
                                                break;
                                        }
                                }
@@ -620,8 +621,6 @@ class Item extends BaseObject {
                                        $this->owner_name = $matches[0][2];
                                        // Use the nosign
                                        $this->owner_photo = $a->get_baseurl .'/images/nosign.jpg';
-                                       $this->set_template('wall2wall');
-                                       $this->wall_to_wall = true;
                                }
                        }
                }