From 9986fc19109bc0d393f8ded89730178ba7f377f4 Mon Sep 17 00:00:00 2001 From: Alexander Kampmann Date: Mon, 27 Feb 2012 14:12:44 +0100 Subject: [PATCH 1/2] fixed syntax errors --- library/spam/b8/storage/storage_frndc.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/library/spam/b8/storage/storage_frndc.php b/library/spam/b8/storage/storage_frndc.php index 2b9374f67..cbc6fe81a 100644 --- a/library/spam/b8/storage/storage_frndc.php +++ b/library/spam/b8/storage/storage_frndc.php @@ -256,7 +256,7 @@ class b8_storage_frndc extends b8_storage_base $token = dbesc($token); $count = dbesc($count); $uid = dbesc($uid); - array_push($this->_puts, '("' . $token . '", "' . $count . '", '"' . $uid .'")'); + array_push($this->_puts, '("' . $token . '", "' . $count . '", "' . $uid .'")'); } /** @@ -273,7 +273,7 @@ class b8_storage_frndc extends b8_storage_base $token = dbesc($token); $count = dbesc($count); $uid = dbesc($uid); - array_push($this->_puts, '("' . $token . '", "' . $count . '", '"' . $uid .'")'); + array_push($this->_puts, '("' . $token . '", "' . $count . '", "' . $uid .'")'); } /** @@ -325,7 +325,7 @@ class b8_storage_frndc extends b8_storage_base if(count($this->_updates) > 0) { // this still needs work - $result = q("select * from " . $this->config['table_name'] . ' where token = '; + $result = q("select * from " . $this->config['table_name'] . ' where token = '); $result = q(' From 42d591d25761fda0206dc5ab96e7d9b0fc779b42 Mon Sep 17 00:00:00 2001 From: Fabio Comuni Date: Mon, 27 Feb 2012 18:48:59 +0100 Subject: [PATCH 2/2] revert 01a2791e3a to avoid random preg internal errors. fix contact_template --- include/template_processor.php | 8 +++++--- mod/contacts.php | 4 ++-- view/contact_template.tpl | 4 ++-- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/include/template_processor.php b/include/template_processor.php index 7f270fb4b..28c3f07dd 100755 --- a/include/template_processor.php +++ b/include/template_processor.php @@ -160,7 +160,8 @@ krsort($this->nodes); return $s; } - + + /* private function _str_replace($str){ #$this->search,$this->replace, $searchs = $this->search; @@ -183,7 +184,7 @@ } return str_replace($this->search,$this->replace, $str); - } + }*/ public function replace($s, $r) { @@ -205,7 +206,8 @@ $os = ""; $count=0; while($os!=$s && $count<10){ $os=$s; $count++; - $s = $this->_str_replace($s); + //$s = $this->_str_replace($s); + $s = str_replace($this->search, $this->replace, $s); } return template_unescape($s); } diff --git a/mod/contacts.php b/mod/contacts.php index c8edea151..ce352fe20 100755 --- a/mod/contacts.php +++ b/mod/contacts.php @@ -504,8 +504,8 @@ function contacts_content(&$a) { 'name' => $rr['name'], 'username' => $rr['name'], 'sparkle' => $sparkle, - 'url' => $url, - 'item' => $rr, + 'itemurl' => $rr['url'], + 'network' => network_to_name($rr['network']), ); } diff --git a/view/contact_template.tpl b/view/contact_template.tpl index d6f114d6e..f4c0670bf 100755 --- a/view/contact_template.tpl +++ b/view/contact_template.tpl @@ -17,8 +17,8 @@
$contact.name
-
$contact.item.url
-
$contact.item.network|network_to_name
+
$contact.itemurl
+
$contact.network