summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d672c0b)
raw | patch | inline | side by side (parent: d672c0b)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 2 Nov 2006 08:46:51 +0000 (08:46 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 2 Nov 2006 08:46:51 +0000 (08:46 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4988 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/personal/environment/class_environment.inc | patch | blob | history | |
plugins/personal/environment/main.inc | patch | blob | history |
diff --git a/plugins/personal/environment/class_environment.inc b/plugins/personal/environment/class_environment.inc
index 36212289c6e386d85721b11aad4610a2755b91dd..940c63a729053a4f05cf657e34aeeac780569d1d 100644 (file)
"plDescription" => _("Environment settings"), // Description
"plSelfModify" => TRUE,
"plDepends" => array("user", "posixAccount"), // This plugin depends on
- "plPriority" => 2, // Position in tabs
+ "plPriority" => 3, // Position in tabs
"plSection" => "personal", // This belongs to personal
"plCategory" => array("users", "groups"), // Add to following categories
"plOptions" => array("resolution_hook" => array("type" => "string",
index c9662e6bafc565d55e176adc6369cd00955c59d8..059b5bd27d9fed8a98275b826a1c6efce7b44f04 100644 (file)
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-
+$lock_msg = "";
if (!$remove_lock){
/* Reset requested? */
if (isset($_POST['edit_cancel']) ||
/* Enter edit mode? */
if (isset($_POST['edit'])){
-
- /* Check locking */
+
+ /* Check locking */
if (($username= get_lock($ui->dn)) != ""){
$_SESSION['back_plugin']= $plug;
- gen_locked_message ($username, $ui->dn);
- exit ();
- }
+ $_SESSION['LOCK_VARS_TO_USE'] = array("/^edit$/","/^plug$/");
+ $lock_msg = gen_locked_message ($username, $ui->dn);
- /* Lock the current entry */
- add_lock ($ui->dn, $ui->dn);
- $_SESSION['dn']= $ui->dn;
- $_SESSION['edit']= TRUE;
+ }else{
+
+ /* Lock the current entry */
+ add_lock ($ui->dn, $ui->dn);
+ $_SESSION['dn']= $ui->dn;
+ $_SESSION['edit']= TRUE;
+ }
}
/* save changes to LDAP and disable edit mode */
/* No errors, save object */
if (count ($message) == 0){
$environment->save ();
- gosa_log ("User/environment object'".$ui->dn."' has been saved");
+ gosa_log ("User/environment object '".$ui->dn."' has been saved");
del_lock ($ui->dn);
sess_del ('edit');
}
/* Execute formular */
- $display= $environment->execute ();
+ if($lock_msg){
+ $display = $lock_msg;
+ }else{
+ $display = $environment->execute();
+ }
/* Store changes in session */
if (isset ($_SESSION['edit'])){
$info= "";
/* Show page footer depending on the mode */
- if (!$environment->in_dialog && $environment->is_account){
+ if (!$environment->in_dialog && $environment->is_account && empty($lock_msg)){
$display.= "<p class=\"plugbottom\">";
/* Are we in edit mode? */