projects
/
civicrm-core.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a487725
)
Modified dao.tpl to fix Gencode's DAOP generation
author
Paul Delbar
<paul.delbar@delius.be>
Mon, 26 Aug 2013 18:42:26 +0000
(20:42 +0200)
committer
Paul Delbar
<paul.delbar@delius.be>
Mon, 26 Aug 2013 18:42:26 +0000
(20:42 +0200)
GenCode was creating bad default values if the default xas not
surrounded by a string delimiter (CRM-13289)
xml/templates/dao.tpl
patch
|
blob
|
blame
|
history
diff --git
a/xml/templates/dao.tpl
b/xml/templates/dao.tpl
index 7c3806b65490f58fc7f8b8781150ae01d15922df..f6e7ad545a2563f656a2eeb56122a5fc0b196872 100644
(file)
--- 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}',