From 4267d5de92e7b1e7a97c1448eb770b2e642bd28e Mon Sep 17 00:00:00 2001 From: ebullient Date: Wed, 28 Jan 2004 04:10:26 +0000 Subject: [PATCH] Move over the options for DMN. I cheated here - I took away all the top bottom crap and just said yes or no do you want Delete & Prev and Delete & Next links. To the translation team - spank me with a paddle, I changed a string. I tried to avoid it, but the option string just wasn't right for core.. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@6451 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- include/options/display.php | 7 +++++++ plugins/delete_move_next/setup.php | 6 +++--- src/read_body.php | 12 ++++-------- 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/include/options/display.php b/include/options/display.php index 9654bb46..e9c740f7 100644 --- a/include/options/display.php +++ b/include/options/display.php @@ -379,6 +379,13 @@ function load_optpage_data_display() { 'type' => SMOPT_TYPE_BOOLEAN, 'refresh' => SMOPT_REFRESH_ALL ); + $optvals[SMOPT_GRP_MESSAGE][] = array( + 'name' => 'delete_prev_next_display', + 'caption' => _("Show 'Delete & Prev/Next' Links"), + 'type' => SMOPT_TYPE_BOOLEAN, + 'refresh' => SMOPT_REFRESH_ALL + ); + } /* Assemble all this together and return it as our result. */ $result = array( diff --git a/plugins/delete_move_next/setup.php b/plugins/delete_move_next/setup.php index 98ea5dc3..d9dee572 100644 --- a/plugins/delete_move_next/setup.php +++ b/plugins/delete_move_next/setup.php @@ -26,9 +26,9 @@ function squirrelmail_plugin_init_delete_move_next() { $squirrelmail_plugin_hooks['right_main_after_header']['delete_move_next'] = 'delete_move_next_action'; // $squirrelmail_plugin_hooks['read_body_bottom']['delete_move_next'] = 'delete_move_next_read_b'; // $squirrelmail_plugin_hooks['read_body_menu_bottom']['delete_move_next'] = 'delete_move_next_read_t'; - $squirrelmail_plugin_hooks['options_display_inside']['delete_move_next'] = 'delete_move_next_display_inside'; - $squirrelmail_plugin_hooks['options_display_save']['delete_move_next'] = 'delete_move_next_display_save'; - $squirrelmail_plugin_hooks['loading_prefs']['delete_move_next'] = 'delete_move_next_loading_prefs'; +// $squirrelmail_plugin_hooks['options_display_inside']['delete_move_next'] = 'delete_move_next_display_inside'; +// $squirrelmail_plugin_hooks['options_display_save']['delete_move_next'] = 'delete_move_next_display_save'; +// $squirrelmail_plugin_hooks['loading_prefs']['delete_move_next'] = 'delete_move_next_loading_prefs'; } diff --git a/src/read_body.php b/src/read_body.php index b1194317..a5b1052c 100644 --- a/src/read_body.php +++ b/src/read_body.php @@ -490,7 +490,7 @@ function formatMenubar($mailbox, $passed_id, $passed_ent_id, $message, $mbx_resp global $base_uri, $draft_folder, $where, $what, $color, $sort, $startMessage, $PHP_SELF, $save_as_draft, $uid_support, $enable_forward_as_attachment, $imapConnection, $lastTargetMailbox, - $delete_move_next_t, $delete_move_next_b; + $data_dir, $username; $topbar_delimiter = ' | '; $double_delimiter = '    '; @@ -577,7 +577,8 @@ function formatMenubar($mailbox, $passed_id, $passed_ent_id, $message, $mbx_resp // Only bother with Delete & Prev and Delete & Next IF // we have UID support, and top display is enabled. - if ( $uid_support && $delete_move_next_t == 'on' ) { + $delete_prev_next_display = getPref($data_dir, $username, 'delete_prev_next_display', 1); + if ( $uid_support && $delete_prev_next_display == 1 ) { $del_prev_link = _("Delete & Prev"); if ($prev >= 0) { $uri = $base_uri . 'src/read_body.php?passed_id='.$prev. @@ -955,12 +956,7 @@ if (($attachment_common_show_images) && } } -// If a bar at the bottom is also wanted, print menu bar again, -// only upside down. -if ($delete_move_next_b != 'off') { - formatMenuBar($mailbox, $passed_id, $passed_ent_id, $message, $mbx_response, FALSE); -} - +formatMenuBar($mailbox, $passed_id, $passed_ent_id, $message, $mbx_response, FALSE); do_hook('read_body_bottom'); do_hook('html_bottom'); -- 2.25.1