dn); sess_del ('edit'); sess_del ('connectivity'); } /* Create connectivity object on demand */ if (!isset($_SESSION['connectivity']) || (isset($_GET['reset']) && $_GET['reset'] == 1)){ $_SESSION['connectivity']= new connectivity ($config, $ui->dn); $_SESSION['connectivity']->set_acl_base($ui->dn); $_SESSION['connectivity']->set_acl_category("users"); /* Adjust acl's to mode */ foreach ($_SESSION['connectivity']->plugin_name as $name){ $_SESSION['connectivity']->plugin[$name]->set_acl_category( "users"); $_SESSION['connectivity']->plugin[$name]->set_acl_base($ui->dn); } } $connectivity= $_SESSION['connectivity']; /* save changes back to object */ if (isset ($_SESSION['edit'])){ $connectivity->save_object (); } /* Enter edit mode? */ if (isset($_POST['edit'])){ /* Check locking */ if ((($username= get_lock($ui->dn)) != "") && (!isset($_SESSION['edit']))){ $_SESSION['back_plugin']= $plug; gen_locked_message ($username, $ui->dn); exit (); } /* 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 */ if (isset($_POST['edit_finish'])){ /* Perform checks */ $message= $connectivity->check (); /* No errors, save object */ if (count ($message) == 0){ $connectivity->save (); gosa_log ("User/connectivity object'".$ui->dn."' has been saved"); del_lock ($ui->dn); sess_del ('edit'); /* Write back to session */ $_SESSION['connectivity']= $connectivity; } else { /* Errors found, show message */ show_errors ($message); } } /* Execute formular */ $display= $connectivity->execute (); /* Store changes in session */ if (isset ($_SESSION['edit'])){ $_SESSION['connectivity']= $connectivity; } $info= ""; $display.="