Force ID command use with name="Roundcube/Kolab" (T847)
This commit is contained in:
parent
825db26425
commit
4a959503f8
1 changed files with 26 additions and 0 deletions
|
@ -43,6 +43,7 @@ class libkolab extends rcube_plugin
|
|||
set_include_path($include_path);
|
||||
|
||||
$this->add_hook('storage_init', array($this, 'storage_init'));
|
||||
$this->add_hook('storage_connect', array($this, 'storage_connect'));
|
||||
$this->add_hook('user_delete', array('kolab_storage', 'delete_user_folders'));
|
||||
|
||||
$rcmail = rcube::get_instance();
|
||||
|
@ -90,6 +91,31 @@ class libkolab extends rcube_plugin
|
|||
return $p;
|
||||
}
|
||||
|
||||
/**
|
||||
* Hook into IMAP connection to replace client identity
|
||||
*/
|
||||
function storage_connect($p)
|
||||
{
|
||||
$client_name = 'Roundcube/Kolab';
|
||||
|
||||
if (empty($p['ident'])) {
|
||||
$p['ident'] = array(
|
||||
'name' => $client_name,
|
||||
'version' => RCUBE_VERSION,
|
||||
/*
|
||||
'php' => PHP_VERSION,
|
||||
'os' => PHP_OS,
|
||||
'command' => $_SERVER['REQUEST_URI'],
|
||||
*/
|
||||
);
|
||||
}
|
||||
else {
|
||||
$p['ident']['name'] = $client_name;
|
||||
}
|
||||
|
||||
return $p;
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for a singleton instance of the Bonnie API
|
||||
*
|
||||
|
|
Loading…
Add table
Reference in a new issue