summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8bc4270)
raw | patch | inline | side by side (parent: 8bc4270)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 31 Aug 2006 11:32:52 +0000 (11:32 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 31 Aug 2006 11:32:52 +0000 (11:32 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4558 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/personal/environment/class_environment.inc | patch | blob | history |
diff --git a/plugins/personal/environment/class_environment.inc b/plugins/personal/environment/class_environment.inc
index 55a9216a1efda8cb9550849fe17ce98bac5f4b41..338b8837f530eb8da52d1af37067519ec2f5e6b0 100644 (file)
$this->useProfile = false;
}
- /* Set to group environment if we editing a group */
- if(!isset($this->parent)){
- $this->is_group = true;
- }
-
/* Set resolutions */
$this->gotoXResolutions = array("auto"=>_("auto"),
"640x480" => "640x480",
}
+
+ /* Detect type of edited object (user|group)*/
+ function detect_grouptype()
+ {
+ if((!isset($this->parent))&&(!$this->is_account)){
+ $this->is_group = false;
+ }elseif((isset($this->parent))&&(!isset($this->parent->by_object['posixAccount']))){
+ $this->is_group = true;
+ }else{
+ $this->is_group = false;
+ }
+ }
+
+
function execute()
{
/* Call parent execute */
plugin::execute();
+ $this->detect_grouptype();
+
/* Fill templating stuff */
$smarty= get_smarty();
$display= "";
*/
}elseif((isset($this->parent))&&(!isset($this->parent->by_object['posixAccount']))){
$smarty->assign("is_account","true");
- $this->is_group = true;
$this->uid = $this->cn;
$this->attrs['uid'] = $this->cn;
*/
$smarty->assign("is_account","true");
- $this->is_group = false;
-
/* Change state if needed */
if (isset($_POST['modify_state'])){
if(($this->acl_is_createable() && !$this->is_account) ||
/* Call common method to give check the hook */
$message= plugin::check();
+ $this->detect_grouptype
+
if(preg_match("/[^0-9]/",$this->gotoProfileQuota)) {
$message[]=_("Please set a valid profile quota size.");
}
* 2.2 And each type has two modes, Admin (e.g. 'gotoUserAdminPrinter') and Normal
*/
+ $this->detect_grouptype();
+
if($this->add_del_printer_member_was_called){
$types = array( "gotoUserPrinter" => "AddUser",