diff options
author | Aleksander Machniak <alec@alec.pl> | 2014-01-05 18:59:24 +0100 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2014-01-05 18:59:24 +0100 |
commit | 090d3ed38c62fc71d3a7efb60e62c24103c6b1fe (patch) | |
tree | 9afaddc7db96526e69797acce3968190406a59a2 | |
parent | 72975e14970ec4eeac927b80754ee3a5c6ada58e (diff) |
Fix compat. with PHP 5.2 (#1489500)
-rw-r--r-- | program/steps/settings/responses.inc | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/program/steps/settings/responses.inc b/program/steps/settings/responses.inc index fcc9c9a10..35a2a1b64 100644 --- a/program/steps/settings/responses.inc +++ b/program/steps/settings/responses.inc @@ -104,10 +104,16 @@ function rcmail_responses_list($attrib) $out = $RCMAIL->table_output($attrib, $plugin['list'], $plugin['cols'], 'key'); + $readonly_responses = array(); + foreach ($plugin['list'] as $item) { + if (!empty($item['static'])) { + $readonly_responses[] = $item['key']; + } + } + // set client env $OUTPUT->add_gui_object('responseslist', $attrib['id']); - $OUTPUT->set_env('readonly_responses', array_values(array_map(function($rec){ return $rec['key']; }, - array_filter($plugin['list'], function($item){ return !empty($item['static']); })))); + $OUTPUT->set_env('readonly_responses', $readonly_responses); return $out; } |