Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

assignGlobal not working within plugin/function in 3.1

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Plugins
View previous topic :: View next topic  
Author Message
talisto
Smarty n00b


Joined: 19 Nov 2012
Posts: 2

PostPosted: Mon Nov 19, 2012 10:05 pm    Post subject: assignGlobal not working within plugin/function in 3.1 Reply with quote

given the following example:

Code:

<?php

require_once("Smarty.class.php");

function test($params, $template) {
   $template->assignGlobal('var','testing');
}

$s = new Smarty();
$s->registerPlugin('function','test','test');

$s->display('string:{test}{$var}');


this should output 'testing'. This works in 3.0.x, but doesn't work in 3.1.12. Is this a bug, or has the usage changed?
Back to top
View user's profile Send private message
U.Tews
Administrator


Joined: 22 Nov 2006
Posts: 5068
Location: Hamburg / Germany

PostPosted: Tue Nov 20, 2012 2:07 am    Post subject: Reply with quote

This bug is now fixed in the SVN trunk and will later be included in 3.1.13
Back to top
View user's profile Send private message
talisto
Smarty n00b


Joined: 19 Nov 2012
Posts: 2

PostPosted: Fri Nov 23, 2012 7:41 am    Post subject: Reply with quote

Awesome, thanks!! Smile
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Plugins All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP