From: hickert Date: Tue, 28 Jun 2011 11:29:47 +0000 (+0000) Subject: Fixed dialog handling for the user-generic plugin. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=d6336a0c6f44b2bbf61ac56bad2beb3d570a1e23;p=gosa.git Fixed dialog handling for the user-generic plugin. -Do not show an empty page after user properties of the own account were changed. git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6@20924 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/plugins/personal/generic/class_user.inc b/gosa-core/plugins/personal/generic/class_user.inc index f6de8cfad..b4224693b 100644 --- a/gosa-core/plugins/personal/generic/class_user.inc +++ b/gosa-core/plugins/personal/generic/class_user.inc @@ -110,7 +110,7 @@ class user extends plugin var $manager = ""; var $manager_name = ""; - + var $passwordClass = NULL; /* attribute list for save action */ var $attributes= array("sn", "givenName", "uid", "personalTitle", "academicTitle", diff --git a/gosa-core/plugins/personal/generic/main.inc b/gosa-core/plugins/personal/generic/main.inc index b7cbfc87b..8eaa21235 100644 --- a/gosa-core/plugins/personal/generic/main.inc +++ b/gosa-core/plugins/personal/generic/main.inc @@ -98,7 +98,9 @@ if ( $cleanup ){ session::set('user',$user); $display.=$user->passwordClass->execute(); } else { - session::un_set ('user'); + $display.= $user->execute (); + session::un_set ('user'); + session::un_set ('edit'); } } else { @@ -117,52 +119,53 @@ if ( $cleanup ){ }else{ $display.= $user->execute (); } + } - /* Store changes in session */ - if (session::is_set('edit')){ - session::set('user',$user); - } + /* Store changes in session */ + if (session::is_set('edit')){ + session::set('user',$user); + } - /* Show page footer depending on the mode */ - if (!$user->cert_dialog && !$user->picture_dialog && !$user->dialog && $user->is_account && empty($lock_msg)){ - $display.= "

"; + /* Show page footer depending on the mode */ + if (!$user->passwordClass && !$user->cert_dialog && !$user->picture_dialog && !$user->dialog && $user->is_account && empty($lock_msg)){ + $display.= "

"; - /* Are we in edit mode? */ - if (session::is_set('edit')){ - $display.= "\n"; - $display.= " "; - $display.= "\n"; + /* Are we in edit mode? */ + if (session::is_set('edit')){ + $display.= "\n"; + $display.= " "; + $display.= "\n"; - $info= "\"\" ".$ui->dn." "; + $info= "\"\" ".$ui->dn." "; + } else { + /* 'viewid' may be set by i.e. the phonelist plugin. This + means that we want to go back... */ + if (isset ($viewid)){ + $str= msgPool::backButton(); + $fn = "back"; } else { - /* 'viewid' may be set by i.e. the phonelist plugin. This - means that we want to go back... */ - if (isset ($viewid)){ - $str= msgPool::backButton(); - $fn = "back"; - } else { - $str= msgPool::editButton(); - $fn = "edit"; - $info= "\"\" ".$ui->dn." "; - } + $str= msgPool::editButton(); + $fn = "edit"; + $info= "\"\" ".$ui->dn." "; + } - /* Only display edit button if there is at least one attribute editable */ - if(preg_match("/r/",$ui->get_permissions($ui->dn,"users/user"))){ - if ($fn == "edit"){ - $info.= "\"\" ". - msgPool::clickEditToChange(); - $display.= "\n"; - } + /* Only display edit button if there is at least one attribute editable */ + if(preg_match("/r/",$ui->get_permissions($ui->dn,"users/user"))){ + if ($fn == "edit"){ + $info.= "\"\" ". + msgPool::clickEditToChange(); + $display.= "\n"; } - - $display.= "\n"; } - $display.= "

\n"; + + $display.= "\n"; } + $display.= "

\n"; } + /* Page header*/ $display= print_header(get_template_path('plugins/generic/images/plugin.png'), _("Generic user information"), $info).$display;