Move over the options for DMN.
authorebullient <ebullient@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 28 Jan 2004 04:10:26 +0000 (04:10 +0000)
committerebullient <ebullient@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 28 Jan 2004 04:10:26 +0000 (04:10 +0000)
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
plugins/delete_move_next/setup.php
src/read_body.php

index 9654bb46acebf847f0daa432948ea8b076bc67cd..e9c740f77591285196e3fec36b8d9e542ce2df16 100644 (file)
@@ -379,6 +379,13 @@ function load_optpage_data_display() {
             'type'    => SMOPT_TYPE_BOOLEAN,
             'refresh' => SMOPT_REFRESH_ALL
         );
             '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(
     }
     /* Assemble all this together and return it as our result. */
     $result = array(
index 98ea5dc34951a615d2dfafa145d09c8070ac3984..d9dee5726256eea9a1a62a470fa760ef85b8db33 100644 (file)
@@ -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['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';
 }
 
 
 }
 
 
index b1194317eaa99a4e7c1a13df71d2d514f9ae1dd6..a5b1052c3c324787e4591d9a4649fef744997eba 100644 (file)
@@ -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,
     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 = '&nbsp;|&nbsp;';
     $double_delimiter = '&nbsp;&nbsp;&nbsp;&nbsp;';
 
     $topbar_delimiter = '&nbsp;|&nbsp;';
     $double_delimiter = '&nbsp;&nbsp;&nbsp;&nbsp;';
@@ -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.
 
         // 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.
             $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');
 
 do_hook('read_body_bottom');
 do_hook('html_bottom');