summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: bd1132c)
raw | patch | inline | side by side (parent: bd1132c)
author | hzerres <hzerres@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 20 Oct 2010 09:14:09 +0000 (09:14 +0000) | ||
committer | hzerres <hzerres@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 20 Oct 2010 09:14:09 +0000 (09:14 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20098 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/groupware/personal/groupware/class_Groupware.inc | patch | blob | history | |
gosa-plugins/groupware/personal/groupware/class_GroupwareDao.inc | patch | blob | history |
diff --git a/gosa-plugins/groupware/personal/groupware/class_Groupware.inc b/gosa-plugins/groupware/personal/groupware/class_Groupware.inc
index 0f03abdb3484ceda2176a42c15f7a60dd7af164a..bd5c624cd5ba9ac04c3854dd880b3984bb6b053d 100644 (file)
return($res);
}
-
/*! \brief Checks if feature is availavle on the server (a call to getCapabilities achieves this.)
*/
public function isFeatureEnabled($featureName)
$featureReq = array(
"primaryMail" => array(
'acctGetPrimaryMailAddress'),
- "quotaUsage" => array("_off",
+ "quotaUsage" => array(
'acctGetQuota'),
- "quotaSize" => array("_off",
+ "quotaSize" => array(
'acctSetQuota','acctGetQuota'),
"mailLocations" => array(
'getMailboxLocations'),
"forwardingAddresses" => array(
'acctAddMailForwardAddress','acctDelMailForwardAddress',
'acctGetMailForwardAddresses','acctSetMailForwardAddresses'),
- "vacationMessage" => array("_off",
+ "vacationMessage" => array(
'acctDelFilter','acctGetFilters','acctSetFilters','acctSetFilters'),
"mailBoxWarnLimit" => array(
'acctSetQuota','acctGetQuota'),
"mailBoxSendSizelimit" => array(
'acctSetQuota','acctGetQuota'),
- "mailBoxHardSizelimit" => array(
+ //This is the same as qotaSize - should stay turned off
+ "mailBoxHardSizelimit" => array( "_off",
'acctSetQuota','acctGetQuota'),
"mailBoxAutomaticRemoval" => array(
'acctSetQuota','acctGetQuota'),
//Save quota
if( ($this->isFeatureEnabled("mailBoxWarnLimit") ||
$this->isFeatureEnabled("mailBoxSendSizelimit") ||
- $this->isFeatureEnabled("mailBoxHardSizelimit") ||
+ $this->isFeatureEnabled("quotaSize") ||
$this->isFeatureEnabled("mailBoxAutomaticRemoval"))
&& ($this->hasFeaturebeenChanged("mailBoxWarnLimit") ||
$this->hasFeaturebeenChanged("mailBoxSendSizelimit") ||
- $this->hasFeaturebeenChanged("mailBoxHardSizelimit") ||
+ $this->hasFeaturebeenChanged("quotaSize") ||
$this->hasFeaturebeenChanged("mailBoxAutomaticRemoval") )){
$quota = array( "warn_limit" => $this->mailBoxWarnLimitValue,
"send_limit" => $this->mailBoxSendSizelimitValue,
- "hard_limit" => $this->mailBoxHardSizelimitValue,
+ "hard_limit" => $this->quotaSize,
"hold" => $this->quotaSize);
$this->groupwareDao->save("quotaSize", $this->uid, $quota);
*/
function check()
{
- //add some checks
+ //checked only if features are enabled.
$messages = plugin::check();
-
- //Check the dates
- // TODO: check only if features are enabled.
//required vacationEnabled
if($this->vacationEnabled){
diff --git a/gosa-plugins/groupware/personal/groupware/class_GroupwareDao.inc b/gosa-plugins/groupware/personal/groupware/class_GroupwareDao.inc
index 6194987fedb2c56d601aaeb0dd47e429b1bb8dea..0ad4a0e4aa3c0d7096acd0d36e68389d5e62bb3a 100644 (file)
<?php
-/*! \brief Data Access Object for groupwares
+/*! \brief Data Access Object for groupware
*/
class GroupwareDao{
function __construct(&$pluginRef)
{
$this->groupwarePluginRef = &$pluginRef;
-
- // TODO: Remove all echos
$this->init();
}
public function init()
{
$this->availableMethods = $this->groupwarePluginRef->rpcExec('gwGetCapabilities');
- //$this->availableProperties = $this->groupwarePluginRef->rpcExec('gwGetSupportedProperties');
- //$this->debug("availableProperties on init:", $this->availableProperties);
}
//Folder Id from the User ...
//user/$id/
$resultArr["mailFolder"] = $this->get("mailFolder", array("user/".$uid."/"));
- //print_a($resultArr["mailFolder"]);
+ print_a($resultArr["mailFolder"]);
/*
"RIGHTS_NONE", 0);
"RIGHTS_READ", LOOKUP | READ | STATUS);
"RIGHTS_WRITE", RIGHTS_APPEND | WRITE | CREATE | DELETE);
""
*/
- /*
- $resultArr["mailFolder"] = array(
- 'user/wiwu/Aufgaben' => array(
- "name" =>"Aufgaben",
- "acls"=> array(
- array(
- "name" => "wiwu",
- "acl" => GROUPWARE_RIGHTS_ALL,
- "type"=>"user"),
- array(
- "name" => "2a",
- "acl" => GROUPWARE_RIGHTS_ALL,
- "type"=>"user"))),
-
- 'user/wiwu/Entw\xc3\xbcrfe' =>array(
- "name" => "Entw\xc3\xbcrfe",
- "acls" => array(
- array(
- "name" => "wiwu",
- "acl" => GROUPWARE_RIGHTS_ALL,
- "type"=>"user"))),
- 'user/wiwu/Gel\xc3\xb6schte Objekte' => array(
- "name" => "Gel\xc3\xb6schte Objekte",
- "acls" => array(
- array(
- "name" => "wiwu",
- "acl" => GROUPWARE_RIGHTS_ALL,
- "type"=>"user"))),
- 'user/wiwu/Synchronisierungsprobleme/Lokale Fehler' => array(
- "name" => "Lokale Fehler",
- "acls" => array(
- array(
- "name" => "wiwu",
- "acl" => GROUPWARE_RIGHTS_ALL,
- "type"=>"user"))),
- 'user/wiwu/Synchronisierungsprobleme/Serverfehler' => array(
- "name" => "Serverfehler",
- "acls" => array(
- array(
- "name" => "wiwu",
- "acl" => GROUPWARE_RIGHTS_ALL,
- "type"=>"user"))),
- 'shared/publicFolder' => array(
- "name" => "publicFolder",
- "acls" => array(
- array(
- "name" => "wiwu",
- "acl" => GROUPWARE_RIGHTS_ALL,
- "type"=>"user"))),
- );
- */
-
//need a status for the array - setting them now for the example data.
foreach($resultArr["mailFolder"] as $id => $folder){
// Usage is a Mapi function which is not yet
// example Array for Quota
- /*
- $quota = array( "warn_limit" => 1008,
- "send_limit" => 108,
- "hard_limit" => 1108,
- "hold" => 508,
- "usage" => 1108);
- */
$quota = $this->get("quotaSize", array($uid));
$resultArr["quotaSize"] = $quota["usage"];
return $resultArr;
}
- //TODO: move this function into the groupwareplugin. #
+ //TODO: move this function into the groupwareplugin.
//This is a feature with many datasets inside which should be cut in slices and saved separately.
//Since the knowledge about the feature is only known in the plugin this has got to be moved.