Changeset 3883 in subversion


Ignore:
Timestamp:
Aug 9, 2010 2:35:10 AM (3 years ago)
Author:
alec
Message:
  • Rename hooks: contact_save -> contact_update, identity_save -> identity_update, delete_identity -> identity_delete
  • Print warning to the log about deprecated hook names usage
Location:
trunk/roundcubemail/program
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/roundcubemail/program/include/rcube_plugin_api.php

    r3840 r3883  
    5959    'get_address_book'  => 'addressbook_get', 
    6060    'create_contact'    => 'contact_create', 
    61     'save_contact'      => 'contact_save', 
     61    'save_contact'      => 'contact_update', 
     62    'contact_save'      => 'contact_update', 
    6263    'delete_contact'    => 'contact_delete', 
    6364    'manage_folders'    => 'folders_list', 
     
    6869    'list_identities'   => 'identities_list', 
    6970    'create_identity'   => 'identity_create', 
    70     'save_identity'     => 'identity_save', 
     71    'delete_identity'   => 'identity_delete', 
     72    'save_identity'     => 'identity_update', 
     73    'identity_save'     => 'identity_update', 
    7174  ); 
    7275 
     
    194197    if (is_callable($callback)) { 
    195198      if (isset($this->deprecated_hooks[$hook])) { 
    196         /* Uncoment after 0.4-stable release 
    197199        raise_error(array('code' => 522, 'type' => 'php', 
    198200          'file' => __FILE__, 'line' => __LINE__, 
    199201          'message' => "Deprecated hook name. ".$hook.' -> '.$this->deprecated_hooks[$hook]), true, false); 
    200         */ 
    201202        $hook = $this->deprecated_hooks[$hook]; 
    202203      } 
  • trunk/roundcubemail/program/steps/addressbook/save.inc

    r3840 r3883  
    5555if (!empty($cid)) 
    5656{ 
    57   $plugin = $RCMAIL->plugins->exec_hook('contact_save', array('id' => $cid, 'record' => $a_record, 'source' => get_input_value('_source', RCUBE_INPUT_GPC))); 
     57  $plugin = $RCMAIL->plugins->exec_hook('contact_update', 
     58    array('id' => $cid, 'record' => $a_record, 'source' => get_input_value('_source', RCUBE_INPUT_GPC))); 
    5859  $a_record = $plugin['record']; 
    5960   
  • trunk/roundcubemail/program/steps/settings/delete_identity.inc

    r3780 r3883  
    3131if ($iid && preg_match('/^[0-9]+(,[0-9]+)*$/', $iid)) 
    3232{ 
    33   $plugin = $RCMAIL->plugins->exec_hook('delete_identity', array('id' => $iid)); 
     33  $plugin = $RCMAIL->plugins->exec_hook('identity_delete', array('id' => $iid)); 
    3434   
    3535  if (!$plugin['abort'] && $USER->delete_identity($iid)) { 
  • trunk/roundcubemail/program/steps/settings/save_identity.inc

    r3840 r3883  
    6262{ 
    6363  $iid = get_input_value('_iid', RCUBE_INPUT_POST); 
    64   $plugin = $RCMAIL->plugins->exec_hook('identity_save', array('id' => $iid, 'record' => $save_data)); 
     64  $plugin = $RCMAIL->plugins->exec_hook('identity_update', array('id' => $iid, 'record' => $save_data)); 
    6565  $save_data = $plugin['record']; 
    6666 
Note: See TracChangeset for help on using the changeset viewer.