summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2fc90af)
raw | patch | inline | side by side (parent: 2fc90af)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 20 Oct 2006 04:20:55 +0000 (04:20 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 20 Oct 2006 04:20:55 +0000 (04:20 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@4903 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/admin/groups/class_groupMail.inc | patch | blob | history |
index 31557a6c4c12aa858266cacd3f4ca4826feddfa5..20a421455a14cca1e72c837000ecf2b17f86b73f 100644 (file)
var $perms = array();
var $gosaMailDeliveryMode = "[L ]"; //
var $gosaMailMaxSize = ""; //
-
+
+ var $remove_folder_from_imap = true;
/* Helper */
var $indexed_acl= array();
/* Load templating engine */
$smarty= get_smarty();
+ $display = "";
if ($_SESSION['js']==FALSE){
$smarty->assign("javascript", "false");
} else {
/* Do we represent a valid account? */
if (!$this->is_account && $this->parent == NULL){
- $display= "<img alt=\"\" src=\"images/stop.png\" align=middle> <b>".
+
+ $display.= "<img alt=\"\" src=\"images/stop.png\" align=middle> <b>".
_("This 'dn' has no valid mail extensions.")."</b>";
return ($display);
}
$display= $this->show_header(_("Remove mail account"),
_("This account has mail features enabled. You can disable them by clicking below."));
} else {
- $display= $this->show_header(_("Create mail account"),
+ $display.= $this->show_header(_("Create mail account"),
_("This account has mail features disabled. You can enable them by clicking below."));
+
+ /* Show checkbox that allows us to remove imap entry too*/
+ if($this->initially_was_account){
+
+ $c = "";
+ if($this->remove_folder_from_imap){
+ $c= " checked ";
+ }
+
+ $display .= "<h2>Shared folder delete options</h2>
+ <input class='center' type='checkbox' name='remove_folder_from_imap' value='1' ".$c."
+ title='"._("Remove shared folder from mail server database")."'>";
+ $display .= _("Remove the shared folder and all its contents from mail server.");
+ }
+
return ($display);
}
}
/* Connect to IMAP server for account deletion */
if ($this->initially_was_account){
+
$method= new $this->method($this->config);
- if ($method->connect($this->gosaMailServer)){
+ if ($method->connect($this->gosaMailServer) && $this->remove_folder_from_imap){
+
/* Remove account from IMAP server */
$method->deleteMailbox($this->uid);
$method->disconnect();
/* Keep uid */
unset ($this->attrs['uid']);
-
$ldap->cd($this->dn);
$ldap->modify ($this->attrs);
show_ldap_error($ldap->get_error(), _("Removing group mail settings failed"));
/* Save data to object */
function save_object()
{
+
+ /* Check if user wants to remove the shared folder from imap too */
+ if($this->initially_was_account && !$this->is_account){
+ if(isset($_POST['remove_folder_from_imap'])){
+ $this->remove_folder_from_imap = true;
+ }else{
+ $this->remove_folder_from_imap = false;
+ }
+ }
+
/* Assemble mail delivery mode
The mode field in ldap consists of values between braces, this must
be called when 'mail' is set, because checkboxes may not be set when