]> git.mxchange.org Git - friendica.git/commitdiff
revert 01a2791e3a to avoid random preg internal errors. fix contact_template
authorFabio Comuni <fabrix.xm@gmail.com>
Mon, 27 Feb 2012 17:48:59 +0000 (18:48 +0100)
committerFabio Comuni <fabrix.xm@gmail.com>
Mon, 27 Feb 2012 17:48:59 +0000 (18:48 +0100)
include/template_processor.php
mod/contacts.php
view/contact_template.tpl

index 7f270fb4b39504b9d601e12d2cc6603a8d6ffde0..28c3f07ddd1e46dfc477deb4f0fc9b7a1479d6c4 100755 (executable)
                        krsort($this->nodes);
                        return $s;
                }
-
+               
+        /*
                private function _str_replace($str){
                        #$this->search,$this->replace,
                        $searchs = $this->search;
                                
                        }
                        return str_replace($this->search,$this->replace, $str);
-               }
+               }*/
 
        
                public function replace($s, $r) {
                        $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);
                }
index c8edea151866d91c2cd56e3b75d8f5a22526bac9..ce352fe204c9ec3c91c9fb593b0a63c49ab60784 100755 (executable)
@@ -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']),
                        );
                }
 
index d6f114d6ebab4e2d5e3946cbcb434e4bbf589a8b..f4c0670bfefcf505fd5cf203ed6dea1fcd00e522 100755 (executable)
@@ -17,8 +17,8 @@
                        
        </div>
        <div class="contact-name" id="contact-entry-name-$contact.id" >$contact.name</div>
-       <div class="contact-details" id="contact-entry-url-$contact.id" >$contact.item.url</div>
-       <div class="contact-details" id="contact-entry-network-$contact.id" >$contact.item.network|network_to_name</div>
+       <div class="contact-details" id="contact-entry-url-$contact.id" >$contact.itemurl</div>
+       <div class="contact-details" id="contact-entry-network-$contact.id" >$contact.network</div>
 
 
 </div>