summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a221e82)
raw | patch | inline | side by side (parent: a221e82)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 12 Dec 2008 07:05:08 +0000 (07:05 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 12 Dec 2008 07:05:08 +0000 (07:05 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13266 594d385d-05f5-0310-b6e9-bd551577e9d8
index 6c2a5e7e41fe37c9d0f02454a6fa672d3ac59dbf..1d568288ba01de15e9d9b538f444429ed0deab3f 100644 (file)
--- a/gosa-core/html/main.php
+++ b/gosa-core/html/main.php
}
/* Check if we need to delete a lock */
+
+print_a(array($old_plugin_dir,$plugin_dir,$old_plugin_dir,getcwd()));
+
if ($old_plugin_dir != $plugin_dir && $old_plugin_dir != ""){
+
if (is_file("$old_plugin_dir/main.inc")){
$remove_lock= true;
+ echo "Jaa . "."$old_plugin_dir/main.inc";
require_once ("$old_plugin_dir/main.inc");
+ }else{
+ echo "No";
}
}
$remove_lock= false;
diff --git a/gosa-core/plugins/personal/generic/main.inc b/gosa-core/plugins/personal/generic/main.inc
index b0687b880cdc6f2043d16d5fba21d97ee6465b5f..6e3bfe7b0134cedb616fd0d07aad4d89ecdab843 100644 (file)
/* Preset display */
$display = "";
$lock_msg = "";
-if (!$remove_lock){
+
+if ( $remove_lock){
+ if(session::is_set('user') && session::is_set('edit')){
+ del_lock ($ui->dn);
+ }
+}else{
+
/* Reset requested? */
if (isset($_POST['edit_cancel']) || isset($_POST['password_cancel']) ||
(isset($_GET['reset']) && $_GET['reset'] == 1)){
session::global_set('back_plugin',$plug);
session::global_set('LOCK_VARS_TO_USE',array("/^edit$/","/^plug$/"));
$lock_msg = gen_locked_message ($username, $ui->dn);
-
+
}else{
/* Lock the current entry */
$display.= $smarty->fetch(get_template_path('password.tpl', TRUE));
return ($display);
} else {
- session::un_set ('user');
+ session::un_set ('user');
}
} else {
$display.= "<input type=submit name=\"edit_cancel\" value=\"".msgPool::cancelButton()."\">\n";
$info= "<img class=\"center\" alt=\"\" align=\"middle\" src=\"".get_template_path('images/lists/locked.png').
- "\"> ".$ui->dn." ";
+ "\"> ".$ui->dn." ";
} else {
/* 'viewid' may be set by i.e. the phonelist plugin. This
means that we want to go back... */
$str= msgPool::editButton();
$fn = "edit";
$info= "<img class=\"center\" alt=\"\" align=\"middle\" src=\"".get_template_path('images/lists/unlocked.png').
- "\"> ".$ui->dn." ";
+ "\"> ".$ui->dn." ";
}
/* Only display edit button if there is at least one attribute editable */
/* Page header*/
$display= print_header(get_template_path('plugins/generic/images/plugin.png'),
- _("Generic user information"), $info).$display;
+ _("Generic user information"), $info).$display;
}
index af4e0cabcd9784ba48b211e53d99ac7a81bd9698..8ef7774ad4f5ec69ac592866c3ef646ba0f0c36f 100644 (file)
/* Clear display */
$display = "";
$lock_msg = "";
-if (!$remove_lock){
+if ( $remove_lock){
+ if(session::is_set('posixAccount') && session::is_set('edit')){
+ del_lock ($ui->dn);
+ }
+
+}else{
/* Reset requested? */
if (isset($_POST['edit_cancel']) || (isset($_GET['reset']) && $_GET['reset'] == 1)){
/* Lock the current entry */
add_lock ($ui->dn, $ui->dn);
- session::set('dn',$ui->dn);
session::set('edit',TRUE);
}
}
diff --git a/gosa-plugins/connectivity/personal/connectivity/main.inc b/gosa-plugins/connectivity/personal/connectivity/main.inc
index da38f9d2da2d0d0bdae1b17c7199edbc42f9517a..b19aec38446fca28d57f37c6fcc3b5e9067cce83 100644 (file)
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-if (!$remove_lock){
+if ( $remove_lock){
+ if(session::is_set('connectivity') && session::is_set('edit')){
+ del_lock ($ui->dn);
+ }
+}else{
+
/* Reset requested? */
if (isset($_POST['edit_cancel']) ||
(isset($_GET['reset']) && $_GET['reset'] == 1)){
/* Only remove lock if object was opened
*/
- if(session::is_set('connectivity-') && session::is_set('edit')){
+ if(session::is_set('connectivity') && session::is_set('edit')){
del_lock ($ui->dn);
}
session::un_set ('edit');
/* Lock the current entry */
add_lock ($ui->dn, $ui->dn);
- session::set('dn',$ui->dn);
session::set('edit',TRUE);
}
}
diff --git a/gosa-plugins/goto/personal/environment/main.inc b/gosa-plugins/goto/personal/environment/main.inc
index 3b55b3285f79d3298e734621b612f93be08df7ff..4fb93711fa5d12ac246cc2318164d34f1bfc1e18 100644 (file)
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
$lock_msg = "";
-if (!$remove_lock){
+if ( $remove_lock){
+ if(session::is_set('environment') && session::is_set('edit')){
+ del_lock ($ui->dn);
+ }
+
+}else{
/* Reset requested? */
if (isset($_POST['edit_cancel']) ||
/* Lock the current entry */
add_lock ($ui->dn, $ui->dn);
- session::set('dn',$ui->dn);
session::set('edit',TRUE);
}
}
index df0e7495e491f2ffd9d2955d395ef768b5372d48..205083bcaf40e736170a6334ef60c0baa2dbcfc1 100644 (file)
$lock_msg ="";
$display ="";
-if (!$remove_lock){
+if ( $remove_lock){
+ if(session::is_set('mailAccount') && session::is_set('edit')){
+ del_lock ($ui->dn);
+ }
+
+}else{
+
/* Reset requested? */
if (isset($_POST['edit_cancel']) ||
(isset($_GET['reset']) && $_GET['reset'] == 1)){
/* Lock the current entry */
add_lock ($ui->dn, $ui->dn);
- session::set('dn',$ui->dn);
session::set('edit',TRUE);
}
}
diff --git a/gosa-plugins/nagios/personal/nagios/main.inc b/gosa-plugins/nagios/personal/nagios/main.inc
index de4dcfd452b40933d873aac456a639d783806f74..750e2ee046aa91864eae103f7deab96ce64946e3 100644 (file)
$display = "";
$lock_msg = "";
-if (!$remove_lock){
+if ( $remove_lock){
+ if(session::is_set('nagiosAccount') && session::is_set('edit')){
+ del_lock ($ui->dn);
+ }
+
+}else{
+
/* Reset requested? */
if (isset($_POST['edit_cancel']) ||
(isset($_GET['reset']) && $_GET['reset'] == 1)){
/* Lock the current entry */
add_lock ($ui->dn, $ui->dn);
- session::set('dn',$ui->dn);
session::set('edit',TRUE);
}
}
diff --git a/gosa-plugins/netatalk/personal/netatalk/main.inc b/gosa-plugins/netatalk/personal/netatalk/main.inc
index 65e02834d90607e2a4093f335c5401014bf349ab..83ecfbc29c70e08571045aacc9958f0c83c8c103 100644 (file)
*/
$lock_msg = "";
-if (!$remove_lock) {
+if ( $remove_lock){
+ if(session::is_set('netatalk') && session::is_set('edit')){
+ del_lock ($ui->dn);
+ }
+
+}else{
+
/* Reset requested? */
if (isset ($_POST['edit_cancel']) || (isset ($_GET['reset']) && $_GET['reset'] == 1)) {
/* Lock the current entry */
add_lock($ui->dn, $ui->dn);
- session::set('dn',$ui->dn);
session::set('edit',TRUE);
}
diff --git a/gosa-plugins/samba/personal/samba/main.inc b/gosa-plugins/samba/personal/samba/main.inc
index 856478df42932a3911bf9f0c6440775d6ace8fae..f1dc45a06ed298f2dc90018af06974fd87e0b3d8 100644 (file)
$display = "";
$lock_msg = "";
-if (!$remove_lock){
+if ( $remove_lock){
+ if(session::is_set('sambaAccount') && session::is_set('edit')){
+ del_lock ($ui->dn);
+ }
+
+}else{
+
/* Reset requested? */
if (isset($_POST['edit_cancel']) ||
(isset($_GET['reset']) && $_GET['reset'] == 1)){
/* Lock the current entry */
add_lock ($ui->dn, $ui->dn);
- session::set('dn',$ui->dn);
session::set('edit',TRUE);
}
}
diff --git a/gosa-plugins/scalix/personal/scalix/main.inc b/gosa-plugins/scalix/personal/scalix/main.inc
index 4a6463fa423e52a0728980a6e93664192edd42cc..ae033b0732baa826b2e7f8f0b182ebb63413c8e0 100644 (file)
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-if (!$remove_lock){
+if ( $remove_lock){
+ if(session::is_set('scalixAccount') && session::is_set('edit')){
+ del_lock ($ui->dn);
+ }
+
+}else{
+
/* Reset requested? */
if (isset($_POST['edit_cancel']) ||
(isset($_GET['reset']) && $_GET['reset'] == 1)){
/* Lock the current entry */
add_lock ($ui->dn, $ui->dn);
- session::set('dn',$ui->dn);
session::set('edit',TRUE);
}
}