Plugin API: Added get_compose_responses hook (#5457)

pull/5498/head
Aleksander Machniak 8 years ago
parent 1618387de7
commit e3b61cd487

@ -1,6 +1,7 @@
CHANGELOG Roundcube Webmail
===========================
- Plugin API: Added get_compose_responses hook (#5457)
- Display error when trying to upload more files than specified in max_file_uploads (#5483)
- Add missing sql upgrade file for 'ip' column resize in session table (#5465)
- Do not show inline images of unsupported mimetype (#5463)

@ -380,7 +380,7 @@ class rcmail extends rcube
if (!$user_only) {
foreach ($this->config->get('compose_responses_static', array()) as $response) {
if (empty($response['key'])) {
$response['key'] = substr(md5($response['name']), 0, 16);
$response['key'] = substr(md5($response['name']), 0, 16);
}
$response['static'] = true;
@ -405,7 +405,15 @@ class rcmail extends rcube
ksort($responses, SORT_LOCALE_STRING);
}
return array_values($responses);
$responses = array_values($responses);
$hook = $this->plugins->exec_hook('get_compose_responses', array(
'list' => $responses,
'sorted' => $sorted,
'user_only' => $user_only,
));
return $hook['list'];
}
/**

Loading…
Cancel
Save