Remove hook aliases deprecated long time ago, CS fixes

pull/262/head
Aleksander Machniak 10 years ago
parent 091f5e2978
commit 8c2075b9fc

@ -47,40 +47,8 @@ class rcube_plugin_api
protected $objectsmap = array();
protected $template_contents = array();
protected $exec_stack = array();
protected $deprecated_hooks = array();
// Deprecated names of hooks, will be removed after 0.5-stable release
protected $deprecated_hooks = array(
'create_user' => 'user_create',
'kill_session' => 'session_destroy',
'upload_attachment' => 'attachment_upload',
'save_attachment' => 'attachment_save',
'get_attachment' => 'attachment_get',
'cleanup_attachments' => 'attachments_cleanup',
'display_attachment' => 'attachment_display',
'remove_attachment' => 'attachment_delete',
'outgoing_message_headers' => 'message_outgoing_headers',
'outgoing_message_body' => 'message_outgoing_body',
'address_sources' => 'addressbooks_list',
'get_address_book' => 'addressbook_get',
'create_contact' => 'contact_create',
'save_contact' => 'contact_update',
'contact_save' => 'contact_update',
'delete_contact' => 'contact_delete',
'manage_folders' => 'folders_list',
'list_mailboxes' => 'mailboxes_list',
'save_preferences' => 'preferences_save',
'user_preferences' => 'preferences_list',
'list_prefs_sections' => 'preferences_sections_list',
'list_identities' => 'identities_list',
'create_identity' => 'identity_create',
'delete_identity' => 'identity_delete',
'save_identity' => 'identity_update',
'identity_save' => 'identity_update',
// to be removed after 0.8
'imap_init' => 'storage_init',
'mailboxes_list' => 'storage_folders',
'imap_connect' => 'storage_connect',
);
/**
* This implements the 'singleton' design pattern
@ -283,14 +251,17 @@ class rcube_plugin_api
$info = false;
if (!class_exists($plugin_name, false)) {
if (is_readable($fn))
if (is_readable($fn)) {
include($fn);
else
}
else {
return false;
}
}
if (class_exists($plugin_name))
if (class_exists($plugin_name)) {
$info = $plugin_name::info();
}
// fall back to composer.json file
if (!$info) {
@ -301,8 +272,9 @@ class rcube_plugin_api
$info['license'] = $json['license'];
$info['uri'] = $json['homepage'];
$info['require'] = array_filter(array_keys((array)$json['require']), function($pname) {
if (strpos($pname, '/') == false)
if (strpos($pname, '/') == false) {
return false;
}
list($vendor, $name) = explode('/', $pname);
return !($name == 'plugin-installer' || $vendor == 'pear-pear');
});

Loading…
Cancel
Save