From 3069eaf35e833ffe4a1c1c7829dd7e168ae27420 Mon Sep 17 00:00:00 2001 From: Ciro Mattia Gonano Date: Wed, 11 Sep 2013 15:56:48 +0200 Subject: Merge up to r3319 --- .../Smarty-2.6.0/libs/plugins/function.counter.php | 88 ---------------------- 1 file changed, 88 deletions(-) delete mode 100644 buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/plugins/function.counter.php (limited to 'buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/plugins/function.counter.php') diff --git a/buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/plugins/function.counter.php b/buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/plugins/function.counter.php deleted file mode 100644 index 2536c14e..00000000 --- a/buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/plugins/function.counter.php +++ /dev/null @@ -1,88 +0,0 @@ - - * Name: counter
- * Purpose: print out a counter value - * @link http://smarty.php.net/manual/en/language.function.counter.php {counter} - * (Smarty online manual) - * @param array parameters - * @param Smarty - * @return string|null - */ -function smarty_function_counter($params, &$smarty) -{ - static $counters = array(); - - extract($params); - - if (!isset($name)) { - if(isset($id)) { - $name = $id; - } else { - $name = "default"; - } - } - - if (!isset($counters[$name])) { - $counters[$name] = array( - 'start'=>1, - 'skip'=>1, - 'direction'=>'up', - 'count'=>1 - ); - } - $counter =& $counters[$name]; - - if (isset($start)) { - $counter['start'] = $counter['count'] = $start; - } - - if (!empty($assign)) { - $counter['assign'] = $assign; - } - - if (isset($counter['assign'])) { - $smarty->assign($counter['assign'], $counter['count']); - } - - if (isset($print)) { - $print = (bool)$print; - } else { - $print = empty($counter['assign']); - } - - if ($print) { - $retval = $counter['count']; - } else { - $retval = null; - } - - if (isset($skip)) { - $counter['skip'] = $skip; - } - - if (isset($direction)) { - $counter['direction'] = $direction; - } - - if ($counter['direction'] == "down") - $counter['count'] -= $counter['skip']; - else - $counter['count'] += $counter['skip']; - - return $retval; - -} - -/* vim: set expandtab: */ - -?> -- cgit v1.2.3