From: Paul Delbar Date: Mon, 26 Aug 2013 18:42:26 +0000 (+0200) Subject: Modified dao.tpl to fix Gencode's DAOP generation X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=9e1ed3011323a6f149d079b1811ad503294100e5;p=civicrm-core.git 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) --- 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}',