aboutsummaryrefslogtreecommitdiffstats
path: root/include/functions_category.inc.php
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2008-02-28 02:41:48 +0000
committerrvelices <rv-github@modusoptimus.com>2008-02-28 02:41:48 +0000
commitc73923204927f406d492491398980d3aa429c4eb (patch)
tree717f79ecab01b8d97c359c27406be6dd26ff8193 /include/functions_category.inc.php
parent618158aca4d99fe522b0f54d547442f17a5db148 (diff)
- migrate many templates to smarty
git-svn-id: http://piwigo.org/svn/trunk@2223 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--include/functions_category.inc.php24
1 files changed, 23 insertions, 1 deletions
diff --git a/include/functions_category.inc.php b/include/functions_category.inc.php
index a0a42135e..cbbe2fce9 100644
--- a/include/functions_category.inc.php
+++ b/include/functions_category.inc.php
@@ -278,6 +278,7 @@ function display_select_categories($categories,
{
global $template;
+ // TODO - remove from here after old template removed
foreach ($categories as $category)
{
$selected = '';
@@ -299,13 +300,34 @@ function display_select_categories($categories,
$option.= '- '.$category['name'];
}
- $template->assign_block_vars(
+ $template->_old->assign_block_vars(
$blockname,
array('SELECTED'=>$selected,
'VALUE'=>$category['id'],
'OPTION'=>$option
));
}
+ // TODO - remove until here after old template removed
+ $tpl_cats = array();
+ foreach ($categories as $category)
+ {
+ if ($fullname)
+ {
+ $option = get_cat_display_name_cache($category['uppercats'],
+ null,
+ false);
+ }
+ else
+ {
+ $option = str_repeat('&nbsp;',
+ (3 * substr_count($category['global_rank'], '.')));
+ $option.= '- '.$category['name'];
+ }
+ $tpl_cats[ $category['id'] ] = $option;
+ }
+
+ $template->smarty->assign( $blockname, $tpl_cats);
+ $template->smarty->assign( $blockname.'_selected', $selecteds);
}
function display_select_cat_wrapper($query, $selecteds, $blockname,