forked from extern/egroupware
Make folder acl be able to be selected from differnet accounts
This commit is contained in:
parent
13cf8a1f0d
commit
dc02eb28d7
@ -56,7 +56,8 @@ class mail_acl
|
||||
*/
|
||||
function __construct()
|
||||
{
|
||||
$this->mail_bo = mail_bo::getInstance(false, $GLOBALS['egw_info']['user']['preferences']['mail']['ActiveProfileID']);
|
||||
$acc_id = $_GET['acc_id']?$_GET['acc_id']:$GLOBALS['egw_info']['user']['preferences']['mail']['ActiveProfileID'];
|
||||
$this->mail_bo = mail_bo::getInstance(false, $acc_id);
|
||||
|
||||
}
|
||||
|
||||
@ -160,7 +161,7 @@ class mail_acl
|
||||
}
|
||||
else
|
||||
{
|
||||
error_log(__METHOD__.__LINE__. "()" . "The remove_acl suppose to return an array back, something is there");
|
||||
error_log(__METHOD__.__LINE__. "()" . "The remove_acl suppose to return an array back, something is wrong there");
|
||||
}
|
||||
egw_framework::refresh_opener($msg, 'mail', 'update');
|
||||
}
|
||||
@ -180,7 +181,6 @@ class mail_acl
|
||||
* the mailbox including all its subfolders will be considered.
|
||||
* @param string $msg Message
|
||||
*
|
||||
* @todo rights 'c' and 'd' should be fixed
|
||||
*/
|
||||
function update_acl ($content, &$msg)
|
||||
{
|
||||
@ -213,7 +213,7 @@ class mail_acl
|
||||
if($keys !== count($content['grid']))
|
||||
{
|
||||
array_push($validator, $keys);
|
||||
$msg = lang("Could not save the ACL! Because some names are empty!");
|
||||
$msg = lang("Error:Could not save the ACL! Because some names are empty!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2262,7 +2262,37 @@ app.classes.mail = AppJS.extend(
|
||||
*/
|
||||
all_folders: function(_action)
|
||||
{
|
||||
egw.json('mail.mail_ui.ajax_foldertree',[null,!_action.checked])
|
||||
var mailbox = _senders[0].id.split('::');
|
||||
acc_id = mailbox[0];
|
||||
egw.json('mail.mail_ui.ajax_foldertree',[acc_id,!_action.checked])
|
||||
.sendRequest();
|
||||
},
|
||||
|
||||
/**
|
||||
* Subscribe selected unsubscribed folder
|
||||
*
|
||||
* @param {sender} _senders
|
||||
* @param {action} _action
|
||||
*/
|
||||
subscribe_folder: function(_action,_senders)
|
||||
{
|
||||
var mailbox = _senders[0].id.split('::');
|
||||
var folder = mailbox[1], acc_id = mailbox[0];
|
||||
egw.json('mail.mail_ui.ajax_foldersubscription',[acc_id,folder,true])
|
||||
.sendRequest();
|
||||
},
|
||||
|
||||
/**
|
||||
* Unsubscribe selected subscribed folder
|
||||
*
|
||||
* @param {sender} _senders
|
||||
* @param {action} _action
|
||||
*/
|
||||
unsubscribe_folder: function(_action,_senders)
|
||||
{
|
||||
var mailbox = _senders[0].id.split('::');
|
||||
var folder = mailbox[1], acc_id = mailbox[0];
|
||||
egw.json('mail.mail_ui.ajax_foldersubscription',[acc_id,folder,false])
|
||||
.sendRequest();
|
||||
},
|
||||
|
||||
@ -2274,8 +2304,9 @@ app.classes.mail = AppJS.extend(
|
||||
*/
|
||||
edit_acl: function(_action, _senders)
|
||||
{
|
||||
var folder_id = _senders[0].id.split('::');
|
||||
this.egw.open_link('mail.mail_acl.edit&mailbox='+ jQuery.base64Encode(folder_id[1]), '_blank', '640x480');
|
||||
var mailbox = _senders[0].id.split('::');
|
||||
var folder = mailbox[1], acc_id = mailbox[0];
|
||||
this.egw.open_link('mail.mail_acl.edit&mailbox='+ jQuery.base64Encode(folder)+'&acc_id='+acc_id, '_blank', '640x480');
|
||||
},
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user