diff --git a/api/src/Framework/Ajax.php b/api/src/Framework/Ajax.php index 0bb3f01434..d322df254e 100755 --- a/api/src/Framework/Ajax.php +++ b/api/src/Framework/Ajax.php @@ -599,6 +599,7 @@ abstract class Ajax extends Api\Framework } $data = array(); + $sendToBottom = array(); foreach($this->sideboxes[$appname] as $menu_name => &$file) { $current_menu = array( @@ -609,7 +610,7 @@ abstract class Ajax extends Api\Framework ); foreach($file as $item_text => $item_link) { - if ($item_text === 'menuOpened' || // flag, not menu entry + if ($item_text === 'menuOpened' || $item_text === 'sendToBottom' ||// flag, not menu entry $item_text === '_NewLine_' || $item_link === '_NewLine_') { continue; @@ -648,9 +649,17 @@ abstract class Ajax extends Api\Framework } $current_menu['entries'][] = $var; } - $data[] = $current_menu; + + if ($file['sendToBottom']) + { + $sendToBottom[] = $current_menu; + } + else + { + $data[] = $current_menu; + } } - return $data; + return array_merge($data, $sendToBottom); } /** diff --git a/api/src/Hooks.php b/api/src/Hooks.php index c006dc0187..32c3ca491f 100644 --- a/api/src/Hooks.php +++ b/api/src/Hooks.php @@ -280,6 +280,7 @@ class Hooks // PGP Encryption (Mailvelope plugin) restore/backup menu $file = Array( 'Backup/Restore ...' => 'javascript:app.'.$appname.'.mailvelopeCreateBackupRestoreDialog();', + 'sendToBottom' => true ); display_sidebox($appname, lang('PGP Encryption'), $file); }