summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 358000f)
raw | patch | inline | side by side (parent: 358000f)
author | hzerres <hzerres@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 21 Oct 2010 14:57:34 +0000 (14:57 +0000) | ||
committer | hzerres <hzerres@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 21 Oct 2010 14:57:34 +0000 (14:57 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20117 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/gosa-plugins/groupware/personal/groupware/class_Groupware.inc b/gosa-plugins/groupware/personal/groupware/class_Groupware.inc
index 9d6310caca7503a49030b4683cc8fbf085e859e8..de109fc09f0ca312b7cda2fe7a3be8f7c23c7148 100644 (file)
// Folder related attributes, will be moved into a speperate widget late on
var $currentSelectedFolder = "";
- var $plHeadline = "Groupware";
- var $plDescription = "GOsa groupware extension.";
+ var $plHeadline = "Groupware";
+ var $plDescription = "GOsa groupware extension.";
var $pathTitle = "GOsa groupware extension.";
var $view_logged = FALSE;
"vacationMessage", "mailBoxWarnLimitEnabled", "mailBoxWarnLimitValue",
"mailBoxSendSizelimitEnabled", "mailBoxSendSizelimitValue", "mailBoxHardSizelimitEnabled",
"mailBoxHardSizelimitValue", "mailBoxAutomaticRemovalEnabled", "mailBoxAutomaticRemovalValue",
- "localDeliveryOnly", "dropOwnMails", "mailFolder");
-
+ "localDeliveryOnly", "dropOwnMails", "mailFolder", "mailLimitReceiveValue", "mailLimitSendValue",
+ "mailLimitReceiveEnabled", "mailLimitSendEnabled");
var $enabledFeatures = array();
var $flagAttributes = array("vacationEnabled","mailBoxWarnLimitEnabled","mailBoxSendSizelimitEnabled",
- "mailBoxHardSizelimitEnabled","mailBoxAutomaticRemovalEnabled","localDeliveryOnly","dropOwnMails");
+ "mailBoxHardSizelimitEnabled","mailBoxAutomaticRemovalEnabled","localDeliveryOnly","dropOwnMails",
+ "mailLimitReceiveEnabled", "mailLimitSendEnabled");
var $mailAddressSelectDialog = NULL;
var $filterManager = NULL;
var $mailBoxAutomaticRemovalValue = 100;
var $localDeliveryOnly = FALSE;
var $dropOwnMails = FALSE;
+ var $mailLimitReceiveEnabled = FALSE;
+ var $mailLimitReceiveValue = 0;
+ var $mailLimitSendEnabled = FALSE;
+ var $mailLimitSendValue = 0;
+
+
var $groupwareDao = null;
// Used in the folder editor as the starting folder, usually user/username
"forwardingAddresses" => array(
'acctAddMailForwardAddress','acctDelMailForwardAddress',
'acctGetMailForwardAddresses','acctSetMailForwardAddresses'),
- "vacationMessage" => array("_off",
+ "vacationMessage" => array(
'acctDelFilter','acctGetFilters','acctSetFilters','acctSetFilters'),
"mailBoxWarnLimit" => array(
'acctSetQuota','acctGetQuota'),
"dropOwnMails" => array( "_off",
'acctDelFilter','acctGetFilters','acctSetFilters','acctSetFilters'),
"mailFolder" => array(
- 'folderList','folderDel','folderAdd')
+ 'folderList','folderDel','folderAdd'),
+ "mailLimit" => array(
+ 'acctGetMailLimit', 'acctSetMailLimit')
);
// Check if all required methods can be called!
$this->dialog = TRUE;
return($this->filterManager->execute());
}
+ /****************
+ MailLimits
+ ****************/
+
-
+
+
/****************
Folder editor
****************/
$this->dialog = TRUE;
return($this->FolderWidget->execute());
}
-
/****************
Account status
$this->dialog= TRUE;
}
-
// Close dialogs, action was canceled
if (isset($_POST['mailAddressSelect_cancel'])){
$this->mailAddressSelectDialog= FALSE;
$smarty = get_smarty();
foreach($this->attributes as $attr){
+ print
$smarty->assign($attr, $this->$attr);
}
// Detect checkbox states
$checkAttrs = array("mailBoxWarnLimit","mailBoxSendSizelimit",
- "mailBoxHardSizelimit","mailBoxAutomaticRemoval");
+ "mailBoxHardSizelimit","mailBoxAutomaticRemoval", "mailLimitReceive", "mailLimitSend");
foreach($checkAttrs as $boxname){
if($this->acl_is_writeable($boxname)){
$v = $boxname."Value";
$fw[$this->forwardingAddresses[0]] = true;
$this->groupwareDao->save("forwardingAddresses", $this->uid, array($fw));
}
-
}
//Save quota - it consists of four values...
if( ($this->isFeatureEnabled("mailBoxWarnLimit") ||
//checks for feature "dropOwnMails"
if($this->isFeatureEnabled("dropOwnMails") && $this->hasFeaturebeenChanged("dropOwnMails")){}
+
+ //checks for feature "mailLimit"
+ if($this->isFeatureEnabled("mailLimit") && $this->hasFeaturebeenChanged("mailLimit")){
+ $this->groupwareDao->save("mailLimit", $this->uid, array("receive"=>$this->mailLimitReceiveValue, "send"=>$this->mailLimitSendValue,));
+ }
+
//checks for feature "quotaUsage"
//not to be saved
}
}
}
}
+ //checks for feature "mailLimit"
+ if ($this->isFeatureEnabled("mailLimit")){}
+
//checks for feature "mailBoxWarnLimit"
if ($this->isFeatureEnabled("mailBoxWarnLimit")){}
"mailBoxHardSizelimit" => _("Hard sizelimit"),
"mailBoxAutomaticRemoval" => _("Automatic mail removal"),
"localDeliveryOnly" => _("Local delivery only"),
- "dropOwnMails" => _("Drop own mails")
+ "dropOwnMails" => _("Drop own mails"),
+ "mailLimitSend" => _("mail Limit send"),
+ "mailLimitReceive" => _("mail Limit receive")
)
));
}
"mailBoxAutomaticRemovalEnabled" => "mailBoxAutomaticRemovalEnabled",
"mailBoxAutomaticRemovalValue" => "mailBoxAutomaticRemovalValue",
"localDeliveryOnly" => "localDeliveryOnly",
- "dropOwnMails" => "dropOwnMails");
+ "dropOwnMails" => "dropOwnMails",
+ "mailLimitReceiveValue" => "mailLimitReceiveValue",
+ "mailLimitSendValue" => "mailLimitSendValue",
+ "mailLimitReceiveEnabled" => "mailLimitReceiveEnabled",
+ "mailLimitSendEnabled" => "mailLimitSendEnabled"
+ );
// Map values from source array to class members
foreach($map as $target => $source){
}
-?>
+?>
\ No newline at end of file
diff --git a/gosa-plugins/groupware/personal/groupware/class_GroupwareDao.inc b/gosa-plugins/groupware/personal/groupware/class_GroupwareDao.inc
index 606bab0f4f752fbc53a824ddeb651981a6815105..dd8773374c0b293d2c2fa1a333b68403020f362c 100644 (file)
"delete"=>"gwFolderDel"),
"private_folderACLS" => array("get"=>"gwFolderGetMembers",
"save"=>"gwFolderSetMembers",
- "delete"=>"gwFolderDelMember")
+ "delete"=>"gwFolderDelMember"),
+ "mailLimit" => array("get"=>"gwAcctGetMailLimit",
+ "save"=>"gwAcctSetMailLimit")
);
}
}
-
+ //get the current MailLimits ... if this feature is enabled.
+ if($this->groupwarePluginRef->isFeatureEnabled("mailLimit")){
+ $mailLimits = $this->get("mailLimit", array($uid));
+
+ if($mailLimits["receive"] > 0){
+ $resultArr["mailLimitReceiveEnabled"] = true;
+ $resultArr["mailLimitReceiveValue"] = $mailLimits["receive"];
+ }else{
+ $resultArr["mailLimitReceiveEnabled"] = false;
+ $resultArr["mailLimitReceiveValue"] = 0;
+ }
+ if($mailLimits["send"] > 0){
+ $resultArr["mailLimitSendEnabled"] = true;
+ $resultArr["mailLimitSendValue"] = $mailLimits["send"];
+ }else{
+ $resultArr["mailLimitSendEnabled"] = false;
+ $resultArr["mailLimitSendValue"] = 0;
+ }
+ }
//this function seems to be broken on the server.
//addding dummy
diff --git a/gosa-plugins/groupware/personal/groupware/generic.tpl b/gosa-plugins/groupware/personal/groupware/generic.tpl
index 1e0c6d4b9c6720ba13e230a48619e94a6e6795e6..7893edd83aab4376b4d9bcb9cad0d01105f2e6a6 100644 (file)
</tr>
{/if}
</table>
-
</td>
{if !$alternateAddresses_isActive}
</td>
</tr>
{/if}
+ {if $mailLimit_isActive}
+ <tr>
+ <td>
+ <input id='mailLimitReceiveEnabled' value='1' name="mailLimitReceiveEnabled" value="1"
+ {if $mailLimitReceiveEnabled} checked {/if} class="center" type='checkbox'>
+ <label for="mailLimit">{t}Mailbox size limits receiving mails{/t}</label>
+ <input id="mailLimitReceiveValue" name="mailLimitReceiveValue"
+ size="6" align="middle" type='text' value="{$mailLimitReceiveValue}" class="center"> {t}kbyte{/t}
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <input id='mailLimitSendEnabled' value='1' name="mailLimitSendEnabled" value="1"
+ {if $mailLimitSendEnabled} checked {/if} class="center" type='checkbox'>
+ <label for="mailLimit">{t}Mailbox size limits sending mails{/t}</label>
+ <input id="mailLimitSendValue" name="mailLimitSendValue"
+ size="6" align="middle" type='text' value="{$mailLimitSendValue}" class="center"> {t}kbyte{/t}
+ </td>
+ </tr>
+ {/if}
{if $localDeliveryOnly_isActive}
<tr>
<td>