Browse Source

Reenabled the move_messages_button_action hook and changed its name to mailbox_display_button_action to promote the new location. This name change will also make it easier for plugins to support both stable and devel, instead of breaking alot of things

Jimmy Conner 21 years ago
parent
commit
e938355b60
3 changed files with 9 additions and 7 deletions
  1. 2 0
      ChangeLog
  2. 1 2
      doc/plugin.txt
  3. 6 5
      functions/mailbox_display.php

+ 2 - 0
ChangeLog

@@ -86,6 +86,8 @@ Version 1.5.1 -- CVS
   - Changed structure of xtra_code functions that are used by some translations.
   - Added Uighur language support.
   - Added status bar to compose window when "Compose In New Window" is used.
+  - Reenabled the move_messages_button_action hook and changed its name to
+    mailbox_display_button_action to promote the new location
 
 Version 1.5.0
 --------------------

+ 1 - 2
doc/plugin.txt

@@ -248,6 +248,7 @@ but may be out of date soon thereafter.  You never know.  ;-)
   check_handleAsSent_result      functions/mailbox_display.php   do_hook
   subject_link                   functions/mailbox_display.php   concat_hook
   mailbox_display_buttons        functions/mailbox_display.php   do_hook
+  mailbox_display_button_action  functions/mailbox_display.php   hook_func
   message_body                   functions/mime.php              do_hook
   ^ attachment $type0/$type1     functions/mime.php              do_hook
   attachments_bottom             functions/mime.php              hook_func
@@ -273,8 +274,6 @@ but may be out of date soon thereafter.  You never know.  ;-)
   login_top                      src/login.php                   do_hook
   login_form                     src/login.php                   do_hook
   login_bottom                   src/login.php                   do_hook
-  move_before_move               src/move_messages.php           do_hook
-  move_messages_button_action    src/move_messages.php           concat_hook
   * optpage_set_loadinfo         src/options.php                 do_hook
   * optpage_loadhook_personal    src/options.php                 do_hook
   * optpage_loadhook_display     src/options.php                 do_hook

+ 6 - 5
functions/mailbox_display.php

@@ -1867,11 +1867,8 @@ function handleMessageListForm($imapConnection,&$aMailbox,$sButton='',$aUid = ar
                 !in_array($aUid[0],$aMailbox['UIDSET'][$aMailbox['SETINDEX']])) {
                 break;
             }
-            // What kind of hook is this, can it be removed? Disabled for now because it can invalidate the cache
-            //if (!boolean_hook_function('move_messages_button_action', NULL, 1)) {
-                $aUpdatedMsgs = sqimap_msgs_list_delete($imapConnection, $mailbox, $aUid,$bypass_trash);
-                $bExpunge = true;
-            //}
+            $aUpdatedMsgs = sqimap_msgs_list_delete($imapConnection, $mailbox, $aUid,$bypass_trash);
+            $bExpunge = true;
             break;
           case 'unsetDeleted':
           case 'setSeen':
@@ -1899,6 +1896,10 @@ function handleMessageListForm($imapConnection,&$aMailbox,$sButton='',$aUid = ar
                 $aMailbox['FORWARD_SESSION'] = $composesession;
             }
             break;
+          default:
+            // Hook for plugin buttons
+            do_hook_function('mailbox_display_button_action', $aUid);
+            break;
         }
         /**
          * Updates messages is an array containing the result of the untagged