mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-08-05 08:22:35 +02:00
smarty 3 - first pass for tests
git-svn-id: http://piwigo.org/svn/trunk@23384 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
@@ -2,24 +2,24 @@
|
||||
/**
|
||||
* Smarty plugin
|
||||
* @package Smarty
|
||||
* @subpackage plugins
|
||||
* @subpackage PluginsFunction
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Smarty {counter} function plugin
|
||||
*
|
||||
* Type: function<br>
|
||||
* Name: counter<br>
|
||||
* Purpose: print out a counter value
|
||||
*
|
||||
* @author Monte Ohrt <monte at ohrt dot com>
|
||||
* @link http://smarty.php.net/manual/en/language.function.counter.php {counter}
|
||||
* @link http://www.smarty.net/manual/en/language.function.counter.php {counter}
|
||||
* (Smarty online manual)
|
||||
* @param array parameters
|
||||
* @param Smarty
|
||||
* @param array $params parameters
|
||||
* @param Smarty_Internal_Template $template template object
|
||||
* @return string|null
|
||||
*/
|
||||
function smarty_function_counter($params, &$smarty)
|
||||
function smarty_function_counter($params, $template)
|
||||
{
|
||||
static $counters = array();
|
||||
|
||||
@@ -43,7 +43,7 @@ function smarty_function_counter($params, &$smarty)
|
||||
}
|
||||
|
||||
if (isset($counter['assign'])) {
|
||||
$smarty->assign($counter['assign'], $counter['count']);
|
||||
$template->assign($counter['assign'], $counter['count']);
|
||||
}
|
||||
|
||||
if (isset($params['print'])) {
|
||||
@@ -75,6 +75,4 @@ function smarty_function_counter($params, &$smarty)
|
||||
|
||||
}
|
||||
|
||||
/* vim: set expandtab: */
|
||||
|
||||
?>
|
||||
?>
|
||||
Reference in New Issue
Block a user