]> git.mxchange.org Git - friendica.git/commitdiff
ensure that jot_plugins inherit '$visitor' correctly
authorFriendika <info@friendika.com>
Sun, 6 Feb 2011 09:08:12 +0000 (01:08 -0800)
committerFriendika <info@friendika.com>
Sun, 6 Feb 2011 09:08:12 +0000 (01:08 -0800)
mod/network.php
mod/profile.php

index 2ec06fe614fea94d4c2786f091a4a88ef10cbcf3..b0196f92a4227b3a8d014e27432d6b534a467bec 100644 (file)
@@ -79,8 +79,10 @@ function network_content(&$a, $update = 0) {
 
                $celeb = ((($a->user['page-flags'] == PAGE_SOAPBOX) || ($a->user['page-flags'] == PAGE_COMMUNITY)) ? true : false);
 
-    $jotplugins = "";
-    call_hooks('jot_tool', $jotplugins);
+               $jotplugins = "";
+               call_hooks('jot_tool', $jotplugins);
+
+               $tpl = replace_macros($tpl,array('$jotplugins' => $jotplugins));        
 
                $o .= replace_macros($tpl,array(
                        '$return_path' => $a->cmd,
@@ -92,8 +94,7 @@ function network_content(&$a, $update = 0) {
                        '$lockstate' => $lockstate,
                        '$acl' => populate_acl((($group) ? $group_acl : $a->user), $celeb),
                        '$bang' => (($group) ? '!' : ''),
-                       '$profile_uid' => $_SESSION['uid'],
-                       '$jotplugins' => $jotplugins
+                       '$profile_uid' => $_SESSION['uid']
                ));
 
 
index 91c1ba6d850e25c2e74a41cd1282b2aaf5bc6a13..3b4616a34f14a878c4aef09b9d4e6602e0630654 100644 (file)
@@ -135,9 +135,11 @@ function profile_content(&$a, $update = 0) {
                        else
                                $lockstate = 'unlock';
        
-      $jotplugins = "";
-      call_hooks('jot_tool', $jotplugins); 
-        
+                       $jotplugins = "";
+                       call_hooks('jot_tool', $jotplugins); 
+
+                       $tpl = replace_macros($tpl,array('$jotplugins' => $jotplugins));        
+
                        $o .= replace_macros($tpl,array(
                                '$baseurl' => $a->get_baseurl(),
                                '$defloc' => (($is_owner) ? $a->user['default-location'] : ''),
@@ -148,8 +150,7 @@ function profile_content(&$a, $update = 0) {
                                '$emtitle' => t('Example: bob@example.com, mary@example.com'),
                                '$bang' => '',
                                '$acl' => (($is_owner) ? populate_acl($a->user, $celeb) : ''),
-                               '$profile_uid' => $a->profile['profile_uid'],
-                               '$jotplugins' => $jotplugins
+                               '$profile_uid' => $a->profile['profile_uid']
                        ));
                }