Changeset e6ce006 in github
- Timestamp:
- Jul 30, 2010 2:34:02 AM (3 years ago)
- Branches:
- master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
- Children:
- 95fd49e4
- Parents:
- ee09d46
- Location:
- program
- Files:
-
- 17 edited
-
include/rcmail.php (modified) (3 diffs)
-
include/rcube_imap.php (modified) (2 diffs)
-
include/rcube_plugin_api.php (modified) (2 diffs)
-
include/rcube_user.php (modified) (2 diffs)
-
steps/addressbook/copy.inc (modified) (1 diff)
-
steps/addressbook/delete.inc (modified) (1 diff)
-
steps/addressbook/import.inc (modified) (1 diff)
-
steps/addressbook/save.inc (modified) (2 diffs)
-
steps/mail/addcontact.inc (modified) (1 diff)
-
steps/mail/attachments.inc (modified) (3 diffs)
-
steps/mail/compose.inc (modified) (3 diffs)
-
steps/mail/func.inc (modified) (1 diff)
-
steps/mail/sendmail.inc (modified) (5 diffs)
-
steps/settings/func.inc (modified) (3 diffs)
-
steps/settings/manage_folders.inc (modified) (1 diff)
-
steps/settings/save_identity.inc (modified) (2 diffs)
-
steps/settings/save_prefs.inc (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
program/include/rcmail.php
r9048094 re6ce006 256 256 $abook_type = strtolower($this->config->get('address_book_type')); 257 257 258 $plugin = $this->plugins->exec_hook(' get_address_book', array('id' => $id, 'writeable' => $writeable));258 $plugin = $this->plugins->exec_hook('addressbook_get', array('id' => $id, 'writeable' => $writeable)); 259 259 260 260 // plugin returned instance of a rcube_addressbook … … 322 322 } 323 323 324 $plugin = $this->plugins->exec_hook('address _sources', array('sources' => $list));324 $plugin = $this->plugins->exec_hook('addressbooks_list', array('sources' => $list)); 325 325 $list = $plugin['sources']; 326 326 … … 929 929 public function kill_session() 930 930 { 931 $this->plugins->exec_hook(' kill_session');931 $this->plugins->exec_hook('session_destroy'); 932 932 933 933 $this->session->remove(); -
program/include/rcube_imap.php
rc51304d re6ce006 2590 2590 2591 2591 // Give plugins a chance to provide a list of mailboxes 2592 $data = rcmail::get_instance()->plugins->exec_hook(' list_mailboxes',2592 $data = rcmail::get_instance()->plugins->exec_hook('mailboxes_list', 2593 2593 array('root' => $root, 'filter' => $filter, 'mode' => 'LSUB')); 2594 2594 … … 2621 2621 { 2622 2622 // Give plugins a chance to provide a list of mailboxes 2623 $data = rcmail::get_instance()->plugins->exec_hook(' list_mailboxes',2623 $data = rcmail::get_instance()->plugins->exec_hook('mailboxes_list', 2624 2624 array('root' => $root, 'filter' => $filter, 'mode' => 'LIST')); 2625 2625 -
program/include/rcube_plugin_api.php
rd5d9680 re6ce006 43 43 private $required_plugins = array('filesystem_attachments'); 44 44 private $active_hook = false; 45 46 // Deprecated names of hooks, will be removed after 0.5-stable release 47 private $deprecated_hooks = array( 48 'create_user' => 'user_create', 49 'kill_session' => 'session_destroy', 50 'upload_attachment' => 'attachment_upload', 51 'save_attachment' => 'attachment_save', 52 'get_attachment' => 'attachment_get', 53 'cleanup_attachments' => 'attachments_cleanup', 54 'display_attachment' => 'attachment_display', 55 'remove_attachment' => 'attachment_delete', 56 'outgoing_message_headers' => 'message_outgoing_headers', 57 'outgoing_message_body' => 'message_outgoing_body', 58 'address_sources' => 'addressbooks_list', 59 'get_address_book' => 'addressbook_get', 60 'create_contact' => 'contact_create', 61 'save_contact' => 'contact_save', 62 'delete_contact' => 'contact_delete', 63 'manage_folders' => 'folders_list', 64 'list_mailboxes' => 'mailboxes_list', 65 'save_preferences' => 'preferences_save', 66 'user_preferences' => 'preferences_list', 67 'list_prefs_sections' => 'preferences_sections_list', 68 'list_identities' => 'identities_list', 69 'create_identity' => 'identity_create', 70 'save_identity' => 'identity_save', 71 ); 45 72 46 73 /** … … 165 192 public function register_hook($hook, $callback) 166 193 { 167 if (is_callable($callback)) 194 if (is_callable($callback)) { 195 if (isset($this->deprecated_hooks[$hook])) { 196 /* Uncoment after 0.4-stable release 197 raise_error(array('code' => 522, 'type' => 'php', 198 'file' => __FILE__, 'line' => __LINE__, 199 'message' => "Deprecated hook name. ".$hook.' -> '.$this->deprecated_hooks[$hook]), true, false); 200 */ 201 $hook = $this->deprecated_hooks[$hook]; 202 } 168 203 $this->handlers[$hook][] = $callback; 204 } 169 205 else 170 206 raise_error(array('code' => 521, 'type' => 'php', -
program/include/rcube_user.php
r8dfe51e re6ce006 386 386 } 387 387 388 $data = $rcmail->plugins->exec_hook(' create_user',388 $data = $rcmail->plugins->exec_hook('user_create', 389 389 array('user'=>$user, 'user_name'=>$user_name, 'user_email'=>$user_email)); 390 390 … … 445 445 $record['standard'] = $standard; 446 446 447 $plugin = $rcmail->plugins->exec_hook(' create_identity',447 $plugin = $rcmail->plugins->exec_hook('identity_create', 448 448 array('login' => true, 'record' => $record)); 449 449 -
program/steps/addressbook/copy.inc
rb25dfd0 re6ce006 38 38 39 39 foreach ($arr_cids as $cid) { 40 $plugin = $RCMAIL->plugins->exec_hook('c reate_contact', array(40 $plugin = $RCMAIL->plugins->exec_hook('contact_create', array( 41 41 'record' => $CONTACTS->get_record($cid, true), 42 42 'source' => $target, -
program/steps/addressbook/delete.inc
rb25dfd0 re6ce006 24 24 preg_match('/^[a-zA-Z0-9\+\/=_-]+(,[a-zA-Z0-9\+\/=_-]+)*$/', $cid) 25 25 ) { 26 $plugin = $RCMAIL->plugins->exec_hook(' delete_contact', array('id' => $cid, 'source' => get_input_value('_source', RCUBE_INPUT_GPC)));26 $plugin = $RCMAIL->plugins->exec_hook('contact_delete', array('id' => $cid, 'source' => get_input_value('_source', RCUBE_INPUT_GPC))); 27 27 28 28 $deleted = !$plugin['abort'] ? $CONTACTS->delete($cid) : false; -
program/steps/addressbook/import.inc
rb25dfd0 re6ce006 156 156 ); 157 157 158 $plugin = $RCMAIL->plugins->exec_hook('c reate_contact', array('record' => $a_record, 'source' => null));158 $plugin = $RCMAIL->plugins->exec_hook('contact_create', array('record' => $a_record, 'source' => null)); 159 159 $a_record = $plugin['record']; 160 160 -
program/steps/addressbook/save.inc
rb25dfd0 re6ce006 55 55 if (!empty($cid)) 56 56 { 57 $plugin = $RCMAIL->plugins->exec_hook(' save_contact', array('id' => $cid, 'record' => $a_record, 'source' => get_input_value('_source', RCUBE_INPUT_GPC)));57 $plugin = $RCMAIL->plugins->exec_hook('contact_save', array('id' => $cid, 'record' => $a_record, 'source' => get_input_value('_source', RCUBE_INPUT_GPC))); 58 58 $a_record = $plugin['record']; 59 59 … … 103 103 } 104 104 105 $plugin = $RCMAIL->plugins->exec_hook('c reate_contact', array('record' => $a_record, 'source' => get_input_value('_source', RCUBE_INPUT_GPC)));105 $plugin = $RCMAIL->plugins->exec_hook('contact_create', array('record' => $a_record, 'source' => get_input_value('_source', RCUBE_INPUT_GPC))); 106 106 $a_record = $plugin['record']; 107 107 -
program/steps/mail/addcontact.inc
rb25dfd0 re6ce006 48 48 else 49 49 { 50 $plugin = $RCMAIL->plugins->exec_hook('c reate_contact', array('record' => $contact, 'source' => null));50 $plugin = $RCMAIL->plugins->exec_hook('contact_create', array('record' => $contact, 'source' => null)); 51 51 $contact = $plugin['record']; 52 52 -
program/steps/mail/attachments.inc
rb25dfd0 re6ce006 33 33 $id = $regs[1]; 34 34 if ($attachment = $_SESSION['compose']['attachments'][$id]) 35 $attachment = $RCMAIL->plugins->exec_hook(' remove_attachment', $attachment);35 $attachment = $RCMAIL->plugins->exec_hook('attachment_delete', $attachment); 36 36 if ($attachment['status']) { 37 37 if (is_array($_SESSION['compose']['attachments'][$id])) { … … 51 51 $id = $regs[1]; 52 52 if ($attachment = $_SESSION['compose']['attachments'][$id]) 53 $attachment = $RCMAIL->plugins->exec_hook(' display_attachment', $attachment);53 $attachment = $RCMAIL->plugins->exec_hook('attachment_display', $attachment); 54 54 55 55 if ($attachment['status']) { … … 88 88 ); 89 89 90 $attachment = $RCMAIL->plugins->exec_hook(' upload_attachment', $attachment);90 $attachment = $RCMAIL->plugins->exec_hook('attachment_upload', $attachment); 91 91 92 92 if ($attachment['status'] && !$attachment['abort']) { -
program/steps/mail/compose.inc
r90e7080 re6ce006 82 82 // save attachment if valid 83 83 if (($attachment['data'] && $attachment['name']) || ($attachment['path'] && file_exists($attachment['path']))) { 84 $attachment = rcmail::get_instance()->plugins->exec_hook(' save_attachment', $attachment);84 $attachment = rcmail::get_instance()->plugins->exec_hook('attachment_save', $attachment); 85 85 } 86 86 … … 830 830 ); 831 831 832 $attachment = rcmail::get_instance()->plugins->exec_hook(' save_attachment', $attachment);832 $attachment = rcmail::get_instance()->plugins->exec_hook('attachment_save', $attachment); 833 833 834 834 if ($attachment['status']) { … … 854 854 ); 855 855 856 $attachment = rcmail::get_instance()->plugins->exec_hook(' save_attachment', $attachment);856 $attachment = rcmail::get_instance()->plugins->exec_hook('attachment_save', $attachment); 857 857 858 858 if ($attachment['status']) { -
program/steps/mail/func.inc
rdb1f1e3 re6ce006 1326 1326 1327 1327 $rcmail = rcmail::get_instance(); 1328 $rcmail->plugins->exec_hook(' cleanup_attachments',array());1328 $rcmail->plugins->exec_hook('attachments_cleanup', array()); 1329 1329 $rcmail->session->remove('compose'); 1330 1330 } -
program/steps/mail/sendmail.inc
rb25dfd0 re6ce006 359 359 360 360 // exec hook for header checking and manipulation 361 $data = $RCMAIL->plugins->exec_hook(' outgoing_message_headers', array('headers' => $headers));361 $data = $RCMAIL->plugins->exec_hook('message_outgoing_headers', array('headers' => $headers)); 362 362 363 363 // sending aborted by plugin … … 429 429 430 430 if ($isHtml) { 431 $plugin = $RCMAIL->plugins->exec_hook(' outgoing_message_body',431 $plugin = $RCMAIL->plugins->exec_hook('message_outgoing_body', 432 432 array('body' => $message_body, 'type' => 'html', 'message' => $MAIL_MIME)); 433 433 … … 447 447 } 448 448 449 $plugin = $RCMAIL->plugins->exec_hook(' outgoing_message_body',449 $plugin = $RCMAIL->plugins->exec_hook('message_outgoing_body', 450 450 array('body' => $plainTextPart, 'type' => 'alternative', 'message' => $MAIL_MIME)); 451 451 … … 457 457 } 458 458 else { 459 $plugin = $RCMAIL->plugins->exec_hook(' outgoing_message_body',459 $plugin = $RCMAIL->plugins->exec_hook('message_outgoing_body', 460 460 array('body' => $message_body, 'type' => 'plain', 'message' => $MAIL_MIME)); 461 461 … … 482 482 foreach ($_SESSION['compose']['attachments'] as $id => $attachment) { 483 483 // This hook retrieves the attachment contents from the file storage backend 484 $attachment = $RCMAIL->plugins->exec_hook(' get_attachment', $attachment);484 $attachment = $RCMAIL->plugins->exec_hook('attachment_get', $attachment); 485 485 486 486 $dispurl = '/\ssrc\s*=\s*[\'"]*\S+display-attachment\S+file=rcmfile' . preg_quote($attachment['id']) . '[\s\'"]*/'; -
program/steps/settings/func.inc
rb25dfd0 re6ce006 76 76 77 77 // get all identites from DB and define list of cols to be displayed 78 $plugin = $RCMAIL->plugins->exec_hook(' list_identities', array(78 $plugin = $RCMAIL->plugins->exec_hook('identities_list', array( 79 79 'list' => $list, 80 80 'cols' => array('mail'))); … … 132 132 133 133 // hook + define list cols 134 $plugin = $RCMAIL->plugins->exec_hook(' list_prefs_sections',134 $plugin = $RCMAIL->plugins->exec_hook('preferences_sections_list', 135 135 array('list' => $sections, 'cols' => array('section'))); 136 136 … … 677 677 } 678 678 679 $data = $RCMAIL->plugins->exec_hook(' user_preferences', array('section' => $sect['id'], 'blocks' => $blocks));679 $data = $RCMAIL->plugins->exec_hook('preferences_list', array('section' => $sect['id'], 'blocks' => $blocks)); 680 680 $found = false; 681 681 -
program/steps/settings/manage_folders.inc
rb25dfd0 re6ce006 313 313 } 314 314 315 rcmail::get_instance()->plugins->exec_hook(' manage_folders', array('table'=>$table));315 rcmail::get_instance()->plugins->exec_hook('folders_list', array('table'=>$table)); 316 316 317 317 $OUTPUT->add_gui_object('subscriptionlist', $attrib['id']); -
program/steps/settings/save_identity.inc
rb25dfd0 re6ce006 62 62 { 63 63 $iid = get_input_value('_iid', RCUBE_INPUT_POST); 64 $plugin = $RCMAIL->plugins->exec_hook(' save_identity', array('id' => $iid, 'record' => $save_data));64 $plugin = $RCMAIL->plugins->exec_hook('identity_save', array('id' => $iid, 'record' => $save_data)); 65 65 $save_data = $plugin['record']; 66 66 … … 93 93 $save_data['email'] = $RCMAIL->user->get_username(); 94 94 95 $plugin = $RCMAIL->plugins->exec_hook(' create_identity', array('record' => $save_data));95 $plugin = $RCMAIL->plugins->exec_hook('identity_create', array('record' => $save_data)); 96 96 $save_data = $plugin['record']; 97 97 -
program/steps/settings/save_prefs.inc
rb25dfd0 re6ce006 96 96 } 97 97 98 $data = rcmail::get_instance()->plugins->exec_hook(' save_preferences',98 $data = rcmail::get_instance()->plugins->exec_hook('preferences_save', 99 99 array('prefs' => $a_user_prefs, 'section' => $CURR_SECTION)); 100 100
Note: See TracChangeset
for help on using the changeset viewer.
