<?php
/*
 * $Id: function.toolbars.php 20665 2009-08-07 15:13:18Z jonnybradley $
 *
 * Smarty plugin to display content only to some groups
 */

function smarty_function_toolbars($params, &$smarty)
{
	if( ! isset( $params['section'] ) ) {
		global $section;
		if( ! empty($section) )
			$params['section'] = $section;
		else
			$params['section'] = 'global';
	}

	if( isset( $params['comments'] ) && $params['comments'] == 'y' ) {
		$comments = true;
	} else {
		$comments = false;
	}
	
	if( ! isset( $params['area_name'] ) ) {
		$params['area_name'] = 'wikiedit';
	}

	include_once( 'lib/toolbars/toolbarslib.php' );
	$list = ToolbarsList::fromPreference( $params['section'] . ($comments ? '_comments' : '') );
	return $list->getWikiHtml( $params['area_name'] );
}


<?php
/*
 * $Id: function.toolbars.php 20665 2009-08-07 15:13:18Z jonnybradley $
 *
 * Smarty plugin to display content only to some groups
 */

function smarty_function_toolbars($params, $content)
{
	if( ! isset( $params['section'] ) ) {
		global $section;
		if( ! empty($section) )
			$params['section'] = $section;
		else
			$params['section'] = 'global';
	}

	if( isset( $params['comments'] ) && $params['comments'] == 'y' ) {
		$comments = true;
	} else {
		$comments = false;
	}
	
	if( ! isset( $params['area_name'] ) ) {
		$params['area_name'] = 'wikiedit';
	}

	include_once( 'lib/toolbars/toolbarslib.php' );
	$list = ToolbarsList::fromPreference( $params['section'] . ($comments ? '_comments' : '') );
	return $list->getWikiHtml( $params['area_name'] );
}


--- 
+++ 
@@ -5,7 +5,7 @@
  * Smarty plugin to display content only to some groups
  */
 
-function smarty_function_toolbars($params, $content)
+function smarty_function_toolbars($params, &$smarty)
 {
 	if( ! isset( $params['section'] ) ) {
 		global $section;
[FIX] Correct (if unused) param for a Smarty function


git-svn-id: a7fabbc6a7c54ea5c67cbd16bd322330fd10cc35@20807 b456876b-0849-0410-b77d-98878d47e9d5
