From ce0a16df01c6062b960aeb0c806ab040b1e6e94a Mon Sep 17 00:00:00 2001 From: Domovoy Date: Fri, 24 Aug 2012 04:48:49 +0200 Subject: [PATCH] Some optimization --- object/Item.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/object/Item.php b/object/Item.php index 86b792cffb..153d8fb675 100644 --- a/object/Item.php +++ b/object/Item.php @@ -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; } } } -- 2.39.5