Commit 45d819c738d8953aeca6e08e8bae98b5a8f8351c
1 parent
c12bb66d
Allow for entity_checkboxes not to print a label.
git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@3968 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
8 additions
and
2 deletions
lib/templating/smartytemplate.inc.php
| ... | ... | @@ -58,11 +58,13 @@ class KTSmartyTemplate extends KTTemplate { |
| 58 | 58 | function entity_select ($params, &$smarty) { |
| 59 | 59 | require_once $smarty->_get_plugin_filepath('function', 'html_options'); |
| 60 | 60 | |
| 61 | - $entities = KTUtil::arrayGet($params, 'entities'); | |
| 61 | + $entities = KTUtil::arrayGet($params, 'entities', array()); | |
| 62 | + /* | |
| 62 | 63 | if (is_null($entities)) { |
| 63 | 64 | $smarty->trigger_error("assign: missing 'entities' parameter"); |
| 64 | 65 | return; |
| 65 | 66 | } |
| 67 | + */ | |
| 66 | 68 | |
| 67 | 69 | $method = KTUtil::arrayGet($params, 'method', 'getName'); |
| 68 | 70 | $none = KTUtil::arrayGet($params, 'none'); |
| ... | ... | @@ -126,7 +128,11 @@ class KTSmartyTemplate extends KTTemplate { |
| 126 | 128 | $params['output'] = array(); |
| 127 | 129 | foreach ($entities as $oEntity) { |
| 128 | 130 | $params['values'][] = call_user_func(array(&$oEntity, $idmethod)); |
| 129 | - $params['output'][] = call_user_func(array(&$oEntity, $method)); | |
| 131 | + if ($method != "none") { | |
| 132 | + $params['output'][] = call_user_func(array(&$oEntity, $method)); | |
| 133 | + } else { | |
| 134 | + $params['output'][] = null; | |
| 135 | + } | |
| 130 | 136 | } |
| 131 | 137 | unset($params['entities']); |
| 132 | 138 | unset($params['idmethod']); | ... | ... |