From: <jon...@us...> - 2011-06-17 14:50:22
|
Revision: 34967 http://tikiwiki.svn.sourceforge.net/tikiwiki/?rev=34967&view=rev Author: jonnybradley Date: 2011-06-17 14:50:15 +0000 (Fri, 17 Jun 2011) Log Message: ----------- [FIX] perspectives: Better handling of nonexistent prefs in perspectives (so you can remove them by dragging) Modified Paths: -------------- branches/7.x/lib/smarty_tiki/function.preference.php Modified: branches/7.x/lib/smarty_tiki/function.preference.php =================================================================== --- branches/7.x/lib/smarty_tiki/function.preference.php 2011-06-17 14:25:24 UTC (rev 34966) +++ branches/7.x/lib/smarty_tiki/function.preference.php 2011-06-17 14:50:15 UTC (rev 34967) @@ -52,6 +52,13 @@ return $smarty->fetch( 'prefs/' . $info['type'] . '.tpl' ); } else { - return tr( 'Preference %0 is not defined.', $params['name'] ); + $info = array('value' => tra('Error'), 'default_val' => tra('Error'), + 'name' => tr( 'Preference %0 is not defined', $params['name'] ) + ); + if (strpos($_SERVER["SCRIPT_NAME"], 'tiki-edit_perspective.php') !== false) { + $info['hint'] = tra('Drag this out of the perspective and resave it.'); + } + $smarty->assign( 'p', $info ); + return $smarty->fetch( 'prefs/text.tpl' ); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |