From 447bec696aee4c553cb905213628b2ccac7b5c40 Mon Sep 17 00:00:00 2001 From: spiderr Date: Thu, 11 Apr 2013 12:39:15 -0400 Subject: update modules for smarty 3 template centric variables, and assign modules to the _template --- modules/mod_last_changes.php | 2 +- modules/mod_last_comments.php | 4 ++-- modules/mod_structure_toc.php | 2 +- modules/mod_top_authors.php | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) (limited to 'modules') diff --git a/modules/mod_last_changes.php b/modules/mod_last_changes.php index 389c21d..e2530cd 100644 --- a/modules/mod_last_changes.php +++ b/modules/mod_last_changes.php @@ -32,7 +32,7 @@ if( !empty( $module_params['show_date'] ) ) { $gBitSmarty->assign( 'showDate' , TRUE ); } -$gBitSmarty->assign( 'contentType', !empty( $module_params['content_type_guid'] ) ? $module_params['content_type_guid'] : NULL ); +$_template->tpl_vars['contentType'] = new Smarty_variable( !empty( $module_params['content_type_guid'] ); $listHash = array( 'content_type_guid' => !empty( $module_params['content_type_guid'] ) ? $module_params['content_type_guid'] : NULL, diff --git a/modules/mod_last_comments.php b/modules/mod_last_comments.php index b4a2ccf..1450964 100644 --- a/modules/mod_last_comments.php +++ b/modules/mod_last_comments.php @@ -41,9 +41,9 @@ if( !empty( $params['root_content_type_guid'] ) ) { } $listHash['root_content_type_guid'] = $params['root_content_type_guid']; } -$gBitSmarty->assign( 'moduleTitle', $moduleTitle ); +$_template->tpl_vars['moduleTitle'] = new Smarty_variable( $moduleTitle ); $lcom = new LibertyComment(); $modLastComments = $lcom->getList( $listHash ); -$gBitSmarty->assign( 'modLastComments', $modLastComments ); +$_template->tpl_vars['modLastComments'] = new Smarty_variable( $modLastComments ); ?> diff --git a/modules/mod_structure_toc.php b/modules/mod_structure_toc.php index ddef770..8015d81 100644 --- a/modules/mod_structure_toc.php +++ b/modules/mod_structure_toc.php @@ -32,5 +32,5 @@ if( is_object( $gStructure ) && $gStructure->isValid() ) { } if( is_object( $struct ) && count( $struct->isValid() ) ) { - $gBitSmarty->assign( 'modStructureTOC', $struct->getToc( $struct->mInfo['root_structure_id'], 'asc', FALSE, 2 ) ); + $_template->tpl_vars['modStructureTOC'] = new Smarty_variable( $struct->getToc( $struct->mInfo['root_structure_id'], 'asc', FALSE, 2 ); } diff --git a/modules/mod_top_authors.php b/modules/mod_top_authors.php index 62ff6d8..8ede3e8 100644 --- a/modules/mod_top_authors.php +++ b/modules/mod_top_authors.php @@ -15,10 +15,10 @@ if( empty( $module_title ) ) { if( !empty( $module_params['content_type_guid'] ) && !empty( $gLibertySystem->mContentTypes[$module_params['content_type_guid']] ) ) { $title = tra( "Top Authors" ).': '.$gLibertySystem->getContentTypeName( $module_params['content_type_guid'] ); } else { - $gBitSmarty->assign( 'showContentType', TRUE ); + $_template->tpl_vars['showContentType'] = new Smarty_variable( TRUE ); $title = tra( "Top Authors" ); } - $gBitSmarty->assign( 'moduleTitle', $title ); + $_template->tpl_vars['moduleTitle'] = new Smarty_variable( $title ); } */ -- cgit v1.3