Sunday 5th December 2010
Local Packages
Updated contagged to fix the Edit template, which was broken when used with Smarty 3.x:
[Sun Dec 05 12:19:53 2010] [error] [client 2001:470:9279::2] PHP Fatal error: Uncaught exception 'SmartyCompilerException' with message 'Syntax Error in template "/usr/share/php/contagged/inc/../templates/entry_edit.tpl" on line 226 " {foreach from=$entry.mail|smarty:nodefaults item=mail}" unknown modifier "smarty"' in /usr/share/php/Smarty/sysplugins/smarty_internal_templatecompilerbase.php:423\nStack trace:\n#0 /usr/share/php/Smarty/sysplugins/smarty_internal_compile_private_modifier.php(62): Smarty_Internal_TemplateCompilerBase->trigger_template_error('unknown modifie...', 226)\n#1 /usr/share/php/Smarty/sysplugins/smarty_internal_templatecompilerbase.php(271): Smarty_Internal_Compile_Private_Modifier->compile(Array, Object(Smarty_Internal_SmartyTemplateCompiler), Array, NULL, NULL)\n#2 /usr/share/php/Smarty/sysplugins/smarty_internal_templatecompilerbase.php(123): Smarty_Internal_TemplateCompilerBase->callTagCompiler('private_modifie...', Array, Array)\n#3 /usr/share/php/Smarty/sysplugins/smarty_internal_templateparser.php(2392): Smarty_Internal_TemplateCompilerBase->compileTag(' in /usr/share/php/Smarty/sysplugins/smarty_internal_templatecompilerbase.php on line 423, referer: http://www.city-fan.org/ldapab/entry.php?dn=uid%3D1142004059%2C%20ou%3Dcontacts%2C%20dc%3Dcity-fan%2C%20dc%3Dorg
Whilst I know next to nothing about either PHP or Smarty, I managed to get it to work with this patch:
--- templates/entry_edit.tpl 2010-12-05 12:27:29.554691239 +0000 +++ templates/entry_edit.tpl 2010-12-05 13:46:13.274677271 +0000 @@ -223,10 +223,10 @@ </tr> {/if} {if $fields._mail} - {foreach from=$entry.mail|smarty:nodefaults item=mail} + {foreach from=$entry.mail item=mail} <tr> <th>{$lang.mail} {counter}:</th> - <td><input type="text" class="input" name="entry[mail][]" value="{$mail}" /></td> + <td><input type="text" class="input" name="entry[mail][]" value="{$mail|h}" /></td> </tr> {/foreach} <tr>