summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b85f638)
raw | patch | inline | side by side (parent: b85f638)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 31 Aug 2006 10:42:48 +0000 (10:42 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 31 Aug 2006 10:42:48 +0000 (10:42 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@4555 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 0ef15be9aa12359830515909d54fc7cce0a39841..9f5e7c4ce77ab61b47d4e9f17af887b10cfc8bd3 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 */
All these tab management is done here
*/
+ $this->detect_grouptype();
+
/* Working from Usermenu an the Account is currently disbled
* this->parent : is only set if we are working in a list of tabs
* is_account : is only true if the needed objectClass is given
*/
}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;
/* Do we need to flip is_account state? */
if (isset($_POST['modify_state'])){
function check()
{
/* Call common method to give check the hook */
+ $this->detect_grouptype();
$message= plugin::check();
if(preg_match("/[^0-9]/",$this->gotoProfileQuota)) {
"gotoUserAdminPrinter" => "AddAdminUser",
"gotoGroupAdminPrinter" => "AddAdminGroup");
+ /* Detect type of edited object, sometimes this wasn't set correctly ... */
+ $this->detect_grouptype();
+
if($this->is_group){
$s_suffix = "Group";
$useVar = "cn";