From 9e1ed3011323a6f149d079b1811ad503294100e5 Mon Sep 17 00:00:00 2001 From: Paul Delbar Date: Mon, 26 Aug 2013 20:42:26 +0200 Subject: [PATCH] Modified dao.tpl to fix Gencode's DAOP generation GenCode was creating bad default values if the default xas not surrounded by a string delimiter (CRM-13289) --- xml/templates/dao.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xml/templates/dao.tpl b/xml/templates/dao.tpl index 7c3806b654..f6e7ad545a 100644 --- a/xml/templates/dao.tpl +++ b/xml/templates/dao.tpl @@ -211,7 +211,7 @@ class {$table.className} extends CRM_Core_DAO {ldelim} 'rule' => '{$field.rule}', {/if} {* field.rule *} {if $field.default} - 'default' => '{$field.default|substring:1:-1}', + 'default' => '{if ($field.default[0]=="'" or $field.default[0]=='"')}{$field.default|substring:1:-1}{else}{$field.default}{/if}', {/if} {* field.default *} {if $field.enumValues} 'enumValues' => '{$field.enumValues}', -- 2.25.1