summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 93c6b58)
raw | patch | inline | side by side (parent: 93c6b58)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 12 Dec 2008 14:36:42 +0000 (14:36 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 12 Dec 2008 14:36:42 +0000 (14:36 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13287 594d385d-05f5-0310-b6e9-bd551577e9d8
37 files changed:
index f79abdad78f17771dc96a4533e967f9b21aa9494..ed2b4ffa333a8d4f00d7ec40262f22ccde52324b 100644 (file)
--- a/gosa-core/html/main.php
+++ b/gosa-core/html/main.php
$plugin_dir= "$BASE_DIR/plugins/generic/welcome";
}
-/* Check if we need to delete a lock */
-$cleanup = FALSE;
+/* Handle plugin locks.
+ - Remove the plugin from session if we switched to another. (cleanup)
+ - Remove all created locks if "reset" was posted.
+ - Remove all created locks if we switched to another plugin.
+*/
+$cleanup = FALSE;
$remove_lock= FALSE;
-if ($old_plugin_dir != $plugin_dir && $old_plugin_dir != "" || isset($_POST['delete_lock'])){
+
+/* Check if we have changed the selected plugin
+*/
+if($old_plugin_dir != $plugin_dir && $old_plugin_dir != ""){
if (is_file("$old_plugin_dir/main.inc")){
- if(isset($_POST['delete_lock'])){
- $remove_lock= TRUE;
- }
- if($old_plugin_dir != $plugin_dir && $old_plugin_dir != ""){
- $cleanup= TRUE;
- }
- $display = "";
- require_once ("$old_plugin_dir/main.inc");
- $display = "";
+ $cleanup = $remove_lock = TRUE;
+ require ("$old_plugin_dir/main.inc");
+ $cleanup = $remove_lock = FALSE;
}
+}else // elseif
+
+/* Reset was posted, remove all created locks for the current plugin
+*/
+if((isset($_GET['reset']) && $_GET['reset'] == 1) || isset($_POST['delete_lock'])){
+ $remove_lock = TRUE;
}
-$remove_lock= FALSE;
-$cleanup= FALSE;
/* Check for sizelimits */
eval_sizelimit();
/* Load plugin */
if (is_file("$plugin_dir/main.inc")){
+ $display ="";
require ("$plugin_dir/main.inc");
} else {
msg_dialog::display(
- _("Plugin"),
- sprintf(_("FATAL: Cannot find any plugin definitions for plugin '%s'!"), $plug),
- FATAL_ERROR_DIALOG);
+ _("Plugin"),
+ sprintf(_("FATAL: Cannot find any plugin definitions for plugin '%s'!"), $plug),
+ FATAL_ERROR_DIALOG);
exit();
}
index edfd23da33783036af3e85b96ff006f1acb4d5e9..8f55ab8400c5c1796571450d577e5842e578097e 100644 (file)
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-/* Remove classes and variables from session
- */
-if ( $cleanup ){
- session::un_set('macl');
+/* Remove locks created by this plugin
+*/
+if ($remove_lock){
+ if(session::is_set('macl')){
+ $macl = session::get('macl');
+ $macl->remove_lock();
+ }
}
+/* Remove this plugin from session
+*/
+if ( $cleanup ){
+ session::un_set('macl');
+}else{
-if ($remove_lock){
- if(session::is_set('macl')){
- $macl = session::get('macl');
- $macl->remove_lock();
- }
-} else {
$display= "No headpage yet for this module";
/* Create usermanagement object on demand */
-if (!session::is_set('macl') || (isset($_GET['reset']) && $_GET['reset'] == 1)){
+ if (!session::is_set('macl') || (isset($_GET['reset']) && $_GET['reset'] == 1)){
session::set('macl',new aclManagement($config, $ui));
}
$macl = session::get('macl');
diff --git a/gosa-core/plugins/admin/departments/main.inc b/gosa-core/plugins/admin/departments/main.inc
index 35f4513545f0654d8f05901c544fa734c16c0294..bd114694ae295c8b452bad82a88ff4b18a6f3dc7 100644 (file)
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-/* Remove classes and variables from session
- */
-if ( $cleanup ){
- session::un_set('department');
+/* Remove locks created by this plugin
+*/
+if ($remove_lock){
+ if(session::is_set('department')){
+ $macl = session::get('department');
+ $macl->remove_lock();
+ }
}
+/* Remove this plugin from session
+*/
+if ( $cleanup ){
+ session::un_set('department');
+}else{
-if ($remove_lock){
- if(session::is_set('department')){
- $department = session::get('department');
- $department->remove_lock();
- }
-} else {
/* Create usermanagement object on demand */
if (!session::is_set('department') || (isset($_GET['reset']) && $_GET['reset'] == 1)){
session::set('department',new departmentManagement($config, $ui));
index 4f9aaf72f0e51e36b2cf1c2964ce3e9305129062..58af63689a14586e057cacbb2c85e5210df212ce 100644 (file)
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-/* Remove classes and variables from session
- */
-if ( $cleanup ){
- session::un_set('groupManagement');
-}
-
-
+/* Remove locks created by this plugin
+*/
if ($remove_lock){
if(session::is_set('groupManagement')){
- $groupManagement = session::get('groupManagement');
- $groupManagement->remove_lock();
+ $macl = session::get('groupManagement');
+ $macl->remove_lock();
}
-} else {
+}
+
+/* Remove this plugin from session
+*/
+if ( $cleanup ){
+ session::un_set('groupManagement');
+}else{
+
/* Create groupManagement object on demand */
if (!session::is_set('groupManagement') || (isset($_GET['reset']) && $_GET['reset'] == 1)){
session::set('groupManagement',new groupManagement ($config, $ui));
index 856adacffe6b9eb166a31bb32e8984b556c94255..ee523719c42ffa2166e29e6fe8e06c9671ec2494 100644 (file)
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-/* Remove classes and variables from session
- */
-if ( $cleanup ){
- session::un_set('ogroup');
-}
-
+/* Remove locks created by this plugin
+*/
if ($remove_lock){
if(session::is_set('ogroup')){
- $ogroup = session::get('ogroup');
- $ogroup->remove_lock();
+ $macl = session::get('ogroup');
+ $macl->remove_lock();
}
-} else {
+}
+
+/* Remove this plugin from session
+*/
+if ( $cleanup ){
+ session::un_set('ogroup');
+}else{
/* Create object object on demand */
if (!session::is_set('ogroup') || (isset($_GET['reset']) && $_GET['reset'] == 1)){
session::set('ogroup',new ogroupManagement ($config));
+
}
$ogroup = session::get('ogroup');
index 05d3eddf9eaac7b18f83611b24d1c5b302f5dec1..94a5747c6c8dc30108d679064d4369e1298a0bef 100644 (file)
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-/* Remove classes and variables from session
- */
-if ( $cleanup ){
- session::un_set('userManagement');
-}
-
-
+/* Remove locks created by this plugin
+*/
if ($remove_lock){
if(session::is_set('userManagement')){
- $userManagement = session::get('userManagement');
- $userManagement->remove_lock();
+ $macl = session::get('userManagement');
+ $macl->remove_lock();
}
-} else {
+}
+
+/* Remove this plugin from session
+*/
+if ( $cleanup ){
+ session::un_set('userManagement');
+}else{
+
/* Create usermanagement object on demand */
if (!session::is_set('userManagement') ||
(isset($_GET['reset']) && $_GET['reset'] == 1)){
diff --git a/gosa-core/plugins/generic/welcome/main.inc b/gosa-core/plugins/generic/welcome/main.inc
index c3652050387855f214bc5dce0092b296a8df8858..e501f71aedbd6629123dbf9927df6477915dae28 100644 (file)
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-if (!$remove_lock){
+if (!$cleanup){
session::set('plugin_dir',dirname(__FILE__));
$smarty->assign("iconmenu", $plist->show_iconmenu());
$smarty->assign("header", print_header(get_template_path('images/welcome.png'), sprintf(_("Welcome %s!"), $ui->cn)));
diff --git a/gosa-core/plugins/personal/generic/main.inc b/gosa-core/plugins/personal/generic/main.inc
index 2f1376e615005b226efe0c8e2a22eeced271852d..c24dfa96c3f31da83db592f5dead36fb56d605ef 100644 (file)
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-/* Preset display */
-$display = "";
-$lock_msg = "";
+/* Remove locks created by this plugin
+*/
+$lock_msg="";
+if ($remove_lock){
+ if(session::is_set('user') && session::is_set('edit')){
+ del_lock($ui->dn);
+ }
+}
-/* Remove classes and variables from session
- */
+/* Remove this plugin from session
+*/
if ( $cleanup ){
session::un_set('user');
session::un_set('edit');
-}
-if ( $remove_lock){
- if(session::is_set('user') && session::is_set('edit')){
- del_lock ($ui->dn);
- }
}else{
/* Reset requested? */
diff --git a/gosa-core/plugins/personal/password/main.inc b/gosa-core/plugins/personal/password/main.inc
index 9b5c981cae83fbf465edc19b4fad29c35a0da241..b039a10f8d50d4d4148b09b3d93df4ab92e1fa51 100644 (file)
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-/* Clear display */
-$display= "";
+/* Remove locks created by this plugin
+*/
+$lock_msg="";
+if ($remove_lock){
+ if(session::is_set('password')){
+ //Nothing to do here
+ }
+}
+
+/* Remove this plugin from session
+*/
if ( $cleanup ){
session::un_set('password');
session::un_set('edit');
-}
-
-if (!$remove_lock){
+}else{
/* Reset requested? */
if (isset($_POST['edit_cancel']) ||
(isset($_GET['reset']) && $_GET['reset'] == 1)){
-
session::un_set ('edit');
session::un_set ('password');
}
index 710d33a6c23493406aa95673857045188bba90d0..7728f73176f6f5b0db4e294fe2b5baef54a5fb40 100644 (file)
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-/* Clear display */
-$display = "";
-$lock_msg = "";
-/* Remove classes and variables from session
- */
+/* Remove locks created by this plugin
+*/
+$lock_msg="";
+if ($remove_lock){
+ if(session::is_set('posixAccount') && session::is_set('edit')){
+ del_lock($ui->dn);
+ }
+}
+
+/* Remove this plugin from session
+*/
if ( $cleanup ){
session::un_set('posixAccount');
session::un_set('edit');
-}
-
-if ( $remove_lock){
- if(session::is_set('posixAccount') && session::is_set('edit')){
- del_lock ($ui->dn);
- }
}else{
diff --git a/gosa-plugins/addressbook/addons/addressbook/main.inc b/gosa-plugins/addressbook/addons/addressbook/main.inc
index cffab3127d512187f52dbdda224eefb17059ce1d..bf55ff3b9b31e14ea181d19e2641a972cd9fcaa6 100644 (file)
*/
if ( $cleanup ){
session::un_set('addressbook');
-}
-if (!$remove_lock){
+}else{
+
/* Create phonelist object on demand */
if (!session::is_set('addressbook') || (isset($_GET['reset']) && $_GET['reset'] == 1)){
$addressbook = new addressbook ($config);
diff --git a/gosa-plugins/connectivity/personal/connectivity/main.inc b/gosa-plugins/connectivity/personal/connectivity/main.inc
index e284a611403d19b2cea88168d51e18886c24cd19..f24d14a967ccc1d0d45b8d5efeb0dd40b564f514 100644 (file)
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-/* Remove classes and variables from session
- */
+/* Remove locks created by this plugin
+*/
+$lock_msg="";
+if ($remove_lock){
+ if(session::is_set('connectivity') && session::is_set('edit')){
+ del_lock($ui->dn);
+ }
+}
+
+/* Remove this plugin from session
+*/
if ( $cleanup ){
session::un_set('connectivity');
session::un_set('edit');
-}
-
-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)){
/* Create connectivity object on demand */
if (!session::is_set('connectivity') || (isset($_GET['reset']) &&
- $_GET['reset'] == 1)){
+ $_GET['reset'] == 1)){
$connectivity= new connectivity ($config, $ui->dn);
$connectivity->enable_CSN_check();
$connectivity->set_acl_base($ui->dn);
/* Execute formular */
$info= "";
- if(!isset($display)){
- $display= $connectivity->execute ();
-
- /* Store changes in session */
- if (session::is_set('edit')){
- session::set('connectivity',$connectivity);
- }
+ $display= $connectivity->execute ();
+ /* Store changes in session */
+ if (session::is_set('edit')){
+ session::set('connectivity',$connectivity);
+ }
- $display.="<div align='right'>";
- if (session::is_set('edit')){
- $display.= "<input type=submit name=\"edit_finish\" style=\"width:80px\" value=\"".msgPool::okButton()."\">\n";
- $display.= " ";
- $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." ";
- } else {
- $info= "<img class=\"center\" alt=\"\" align=\"middle\" src=\"".get_template_path('images/lists/unlocked.png').
- "\"> ".$ui->dn." ";
- $info.= "<img class=\"center\" alt=\"\" align=\"middle\" src=\"".get_template_path('images/lists/on.png').
- "\">".msgPool::clickEditToChange();
- $display.= "<input type=submit name=\"edit\" value=\"".msgPool::editButton()."\">\n";
- $display.= "<input type=\"hidden\" name=\"ignore\">\n";
- }
- $display.="</div>";
+ $display.="<div align='right'>";
+ if (session::is_set('edit')){
+ $display.= "<input type=submit name=\"edit_finish\" style=\"width:80px\" value=\"".msgPool::okButton()."\">\n";
+ $display.= " ";
+ $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." ";
+ } else {
+ $info= "<img class=\"center\" alt=\"\" align=\"middle\" src=\"".get_template_path('images/lists/unlocked.png').
+ "\"> ".$ui->dn." ";
+
+ $info.= "<img class=\"center\" alt=\"\" align=\"middle\" src=\"".get_template_path('images/lists/on.png').
+ "\">".msgPool::clickEditToChange();
+ $display.= "<input type=submit name=\"edit\" value=\"".msgPool::editButton()."\">\n";
+ $display.= "<input type=\"hidden\" name=\"ignore\">\n";
}
+ $display.="</div>";
/* Page header*/
$display= print_header(get_template_path($connectivity->plIcon),
index 9efe186851210d1d30c78bd0ae43e0a3b0d8a6fb..6be41ecc0f18b649f8e9ba0f92c8c86d778f007d 100644 (file)
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-/* Remove classes and variables from session
- */
-if ( $cleanup ){
- session::un_set('dak_plug');
+/* Remove locks created by this plugin
+*/
+if ($remove_lock){
+ if(session::is_set('dak_plug')){
+ // Nothing to unlock here
+ }
}
+/* Remove this plugin from session
+*/
+if ( $cleanup ){
+ session::un_set('dak_plug');
+}else{
-if (!$remove_lock){
if (!session::is_set('dak_plug') || (isset($_GET['reset']) && $_GET['reset'] == 1)){
session::set('dak_plug',new dakplug($config));
}
index b4047a66294969de579dd78f77d10cf5f0a9f03f..5a38bc8daa469c07c18cf0e33f19f1218f49d9b8 100644 (file)
<?php
+/* Remove locks created by this plugin
+*/
+if ($remove_lock){
+ if(session::is_set('dfsManagment') && session::is_set('edit')){
+ $dfsManagment = session::get('dfsManagment');
+ $dfsManagment->remove_lock();
+ }
+}
-
-/* Remove classes and variables from session
- */
+/* Remove this plugin from session
+*/
if ( $cleanup ){
session::un_set('dfsManagment');
-}
+}else{
-
- if ($remove_lock) {
- if (session::is_set('dfsManagment')) {
- $dfsManagment = session::get('dfsManagment');
- $dfsManagment->remove_lock();
- del_lock($ui->dn);
- session::un_set('dfsManagment');
- }
- } else {
# create dfsManagment object
if (!session::is_set('dfsManagment') ||
(isset($_GET['reset']) && $_GET['reset'] == 1)) {
index 7b3ffddd6a7f0d128bceff3becc3f638d1cdff81..2b5128f9430c3dcd1010b3febe116cb1ecc94d01 100644 (file)
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-/* Remove classes and variables from session
- */
-if ( $cleanup ){
- session::un_set('FAI');
+
+/* Remove locks created by this plugin
+*/
+if ($remove_lock){
+ if(session::is_set('FAI')){
+ $macl = session::get('FAI');
+ $macl->remove_lock();
+ }
}
+/* Remove this plugin from session
+*/
+if ( $cleanup ){
+ session::un_set('FAI');
+}else{
-if ($remove_lock){
- if(session::is_set('FAI')){
- $FAI = session::get('FAI');
- $FAI->remove_lock();
- }
-} else {
/* Create usermanagement object on demand */
if (!session::is_set('FAI') || (isset($_GET['reset']) && $_GET['reset'] == 1)){
$FAI= new faiManagement($config, $ui);
diff --git a/gosa-plugins/gofax/gofax/blocklists/main.inc b/gosa-plugins/gofax/gofax/blocklists/main.inc
index bc3f555f290dbdebc87ee7a6840a31a6b8032671..ebd93825f64dcb2c3fbeee43c7354a5763b5d87c 100644 (file)
<?php
-/* Remove classes and variables from session
- */
-if ( $cleanup ){
- session::un_set('blocklist');
+/* Remove locks created by this plugin
+*/
+if ($remove_lock){
+ if(session::is_set('blocklist')){
+ $macl = session::get('blocklist');
+ $macl->remove_lock();
+ }
}
+/* Remove this plugin from session
+*/
+if ( $cleanup ){
+ session::un_set('blocklist');
+}else{
-if ($remove_lock){
- if(session::is_set('blocklist')){
- $blocklist = session::get('blocklist');
- $blocklist->remove_lock ($ui->dn);
- }
-} else {
/* Create blocklist object on demand */
if (!session::is_set('blocklist') || (isset($_GET['reset']) && $_GET['reset'] == 1)){
$blocklist= new blocklist($config, $ui);
diff --git a/gosa-plugins/gofax/gofax/faxaccount/main.inc b/gosa-plugins/gofax/gofax/faxaccount/main.inc
index 8d4d3966d2d9f0a36205350e7213c888de03ec7d..2768a8b6867d48b2c4f6ddf7d6d0b490c11b4d36 100644 (file)
<?php
-$display ="";
-$lock_msg = "";
+/* Remove locks created by this plugin
+*/
+if ($remove_lock){
+ if(session::is_set('gofaxAccount') && session::is_set('edit')){
+ del_lock($ui->dn);
+ }
+}
-/* Remove classes and variables from session
- */
+/* Remove this plugin from session
+*/
if ( $cleanup ){
session::un_set('gofaxAccount');
- session::un_set ('edit');
-}
-
-
-if (!$remove_lock){
+ session::un_set('edit');
+}else{
/* Reset requested? */
if (isset($_POST['edit_cancel']) ||
diff --git a/gosa-plugins/gofax/gofax/faxreports/main.inc b/gosa-plugins/gofax/gofax/faxreports/main.inc
index 89a2571caf5cb909b96fea6397e1842b503791b5..326ca61ee8b26a4f9e3ad890dd724901036821eb 100644 (file)
*/
if ( $cleanup ){
session::un_set('faxreport');
-}
-
+}else{
-if (!$remove_lock){
/* Create faxreport object on demand */
if (!session::is_set('faxreport') || (isset($_GET['reset']) && $_GET['reset'] == 1)){
session::set('faxreport',new faxreport ($config, $ui));
diff --git a/gosa-plugins/gofon/gofon/conference/main.inc b/gosa-plugins/gofon/gofon/conference/main.inc
index 59a61319e92727357ab16cd98ef05229af969a81..1c313646cd477ec1a78d5c8ca976efa9dbedeea4 100644 (file)
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-/* Remove classes and variables from session
- */
+/* Remove locks created by this plugin
+*/
+$lock_msg ="";
+if ($remove_lock){
+ if(session::is_set('conference')){
+ $macl = session::get('conference');
+ $macl->remove_lock();
+ }
+}
+
+/* Remove this plugin from session
+*/
if ( $cleanup ){
session::un_set('conference');
-}
+}else{
-if ($remove_lock){
- if(session::is_set('conference')){
- $conference = session::get('conference');
- $conference->remove_lock();
- }
-} else {
/* Create usermanagement object on demand */
if (!session::is_set('conference') || (isset($_GET['reset']) && $_GET['reset'] == 1)){
session::set("conference",new phoneConferenceManagment($config, $ui));
diff --git a/gosa-plugins/gofon/gofon/fonreports/main.inc b/gosa-plugins/gofon/gofon/fonreports/main.inc
index eaf2d0c8aa9b9107bcec2b61a29bce0cd3a58020..150e7b592ecbd89a26559a93571fcf7364fff3d6 100644 (file)
/* Remove classes and variables from session
*/
+$lock_msg ="";
if ( $cleanup ){
session::un_set('fonreport');
-}
-
+}else{
-if (!$remove_lock){
/* Create fonreport object on demand */
if (!session::is_set('fonreport') || (isset($_GET['reset']) && $_GET['reset'] == 1)){
session::set('fonreport',new fonreport ($config, $ui));
index 8c7b128fcc25b741513383238a7bc15f0f978c0b..75ef984cda0c6d6caef30116ac90d27d56d59292 100644 (file)
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-/* Remove classes and variables from session
- */
-if ( $cleanup ){
- session::un_set('macroManagement');
-}
-
-
+/* Remove locks created by this plugin
+*/
+$lock_msg ="";
if ($remove_lock){
if(session::is_set('macroManagement')){
- $macroManagement = session::get('macroManagement');
- $macroManagement->remove_lock();
+ $macl = session::get('macroManagement');
+ $macl->remove_lock();
}
-} else {
+}
+
+/* Remove this plugin from session
+*/
+if ( $cleanup ){
+ session::un_set('macroManagement');
+}else{
+
/* Create macroManagement object on demand */
if (!session::is_set('macroManagement') || (isset($_GET['reset']) && $_GET['reset'] == 1)){
diff --git a/gosa-plugins/gofon/gofon/phoneaccount/main.inc b/gosa-plugins/gofon/gofon/phoneaccount/main.inc
index 3c52005be442833add3dd6275e41df956ba5b476..c7d750814039501ac3853af35a3c1982891183a0 100644 (file)
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-$display = "";
-$lock_msg = "";
+/* Remove locks created by this plugin
+*/
+$lock_msg ="";
+if ($remove_lock){
+ if(session::is_set('phoneAccount') && session::is_set('edit')){
+ del_lock($ui->dn);
+ }
+}
-/* Remove classes and variables from session
- */
+/* Remove this plugin from session
+*/
if ( $cleanup ){
session::un_set('phoneAccount');
-}
+ session::un_set('edit');
+}else{
-if (!$remove_lock){
/* Reset requested? */
if (isset($_POST['edit_cancel']) ||
(isset($_GET['reset']) && $_GET['reset'] == 1)){
index e61909a9761ae8f931eb87f98b8edf6622d79f3c..106a8abe8fa4a1926cde97ae1530a760b5e6d8c4 100644 (file)
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-/* Remove classes and variables from session
- */
-if ( $cleanup ){
- session::un_set('gotomasses');
+
+/* Remove locks created by this plugin
+*/
+if ($remove_lock){
+ if(session::is_set('gotomasses')){
+ // Nothing to unlock here
+ }
}
+/* Remove this plugin from session
+*/
+if ( $cleanup ){
+ session::un_set('gotomasses');
+}else{
-if (!$remove_lock){
/* Create gotomasses object on demand */
- if (!session::is_set('gotomasses') || (isset($_GET['reset']) && $_GET['reset'] == 1) || isset($_POST['reload_gotomass_data'])){
+ if (!session::is_set('gotomasses')
+ || (isset($_GET['reset']) && $_GET['reset'] == 1)
+ || isset($_POST['reload_gotomass_data'])){
$gotomasses= new gotomasses ($config);
$gotomasses->set_acl_category("gotomasses");
diff --git a/gosa-plugins/goto/admin/applications/main.inc b/gosa-plugins/goto/admin/applications/main.inc
index 81e3abc5ce5cf8c177bc39e6b41528078ac053c2..d61f42c63cb614497e89e82ee6290f3ec42a9dfb 100644 (file)
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-/* Remove classes and variables from session
- */
+
+/* Remove locks created by this plugin
+*/
+if ($remove_lock){
+ if(session::is_set('applicationManagement')){
+ $macl = session::get('applicationManagement');
+ $macl->remove_lock();
+ }
+}
+
+/* Remove this plugin from session
+*/
if ( $cleanup ){
session::un_set('applicationManagement');
-}
+}else{
+
-if ($remove_lock){
- if(session::is_set('applicationManagement')){
- $applicationManagement = session::get('applicationManagement');
- $applicationManagement->remove_lock();
- }
-} else {
/* Create applicationManagement object on demand */
if (!session::is_set('applicationManagement') || (isset($_GET['reset']) && $_GET['reset'] == 1)){
session::set('applicationManagement',new applicationManagement ($config, $ui));
index 348808529c2e2d5614c9993f119b5f718afb1f07..88f0c2138ce01b130577fcf3e68ec7a35351d99c 100644 (file)
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-/* Remove classes and variables from session
- */
-if ( $cleanup ){
- session::un_set('DeviceManagement');
-}
-
+/* Remove locks created by this plugin
+*/
if ($remove_lock){
if(session::is_set('DeviceManagement')){
- $DeviceManagement = session::get('DeviceManagement');
- $DeviceManagement->remove_lock();
+ $macl = session::get('DeviceManagement');
+ $macl->remove_lock();
}
-} else {
+}
+
+/* Remove this plugin from session
+*/
+if ( $cleanup ){
+ session::un_set('DeviceManagement');
+}else{
/* Create DeviceManagement object on demand */
if (!session::is_set('DeviceManagement') || (isset($_GET['reset']) && $_GET['reset'] == 1)){
diff --git a/gosa-plugins/goto/admin/mimetypes/main.inc b/gosa-plugins/goto/admin/mimetypes/main.inc
index cb55e1fa4405691daa140929a614cc8b75454cdd..81e04da3b87df262bdd84e62358530c382a0f3f6 100644 (file)
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-/* Remove classes and variables from session
- */
-if ( $cleanup ){
- session::un_set('MimeTypeManagement');
-}
-
-
+/* Remove locks created by this plugin
+*/
if ($remove_lock){
if(session::is_set('MimeTypeManagement')){
- $MimeTypeManagement = session::get('MimeTypeManagement');
- $MimeTypeManagement->remove_lock();
+ $macl = session::get('MimeTypeManagement');
+ $macl->remove_lock();
}
-} else {
+}
+
+/* Remove this plugin from session
+*/
+if ( $cleanup ){
+ session::un_set('MimeTypeManagement');
+}else{
/* Create MimeTypeManagement object on demand */
if (!session::is_set('MimeTypeManagement') || (isset($_GET['reset']) && $_GET['reset'] == 1)){
diff --git a/gosa-plugins/goto/personal/environment/main.inc b/gosa-plugins/goto/personal/environment/main.inc
index 094ffd70f5235a3a2a86a270d98cfeeb768d9230..0b0e24f3f1860c15fb83046332771c2527cf5e0c 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 = "";
-/* Remove classes and variables from session
- */
+/* Remove locks created by this plugin
+*/
+$lock_msg="";
+if ($remove_lock){
+ if(session::is_set('environment') && session::is_set('edit')){
+ del_lock($ui->dn);
+ }
+}
+
+/* Remove this plugin from session
+*/
if ( $cleanup ){
session::un_set('environment');
session::un_set('edit');
-}
-
-if ( $remove_lock){
- if(session::is_set('environment') && session::is_set('edit')){
- del_lock ($ui->dn);
- }
}else{
diff --git a/gosa-plugins/ldapmanager/addons/ldapmanager/main.inc b/gosa-plugins/ldapmanager/addons/ldapmanager/main.inc
index 0c7904b399ecdb1a50773fd3584e754577833bf9..3a8f4a26e9f315e2331fc880ff5f134fd33b1989 100644 (file)
*/
-/* Remove classes and variables from session
- */
+/* Remove locks created by this plugin
+*/
+if ($remove_lock){
+ if(session::is_set('ldif')){
+ // Nothing to unlock here
+ }
+}
+
+/* Remove this plugin from session
+*/
if ( $cleanup ){
session::un_set('ldif');
-}
+}else{
+
-if (!$remove_lock){
/* Create phonelist object on demand */
if (!session::is_set('ldif') || (isset($_GET['reset']) && $_GET['reset'] == 1)){
$ldif= new ldif ($config);
index b42b0f6c7aba2b2ffcf8848fc61a017e06329f21..47bd096325bfd16c1cdf7d5b99bf4eab2975623b 100644 (file)
*/
-/* Remove classes and variables from session
- */
-if ( $cleanup ){
- session::un_set('log_tabs');
+/* Remove locks created by this plugin
+*/
+if ($remove_lock){
+ if(session::is_set('log_tabs')){
+ // Nothing to unlock here
+ }
}
+/* Remove this plugin from session
+*/
+if ( $cleanup ){
+ session::un_set('log_tabs');
+}else{
-if (!$remove_lock){
/* Create logview object on demand */
if (!session::is_set('log_tabs') || (isset($_GET['reset']) && $_GET['reset'] == 1)){
diff --git a/gosa-plugins/mail/addons/mailqueue/main.inc b/gosa-plugins/mail/addons/mailqueue/main.inc
index c3cd34ca8a7d8f875e7c6f04cc07685d71d6eee4..df6784d385ae198f16d906c47f25102697778f4c 100644 (file)
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-/* Remove classes and variables from session
- */
+/* Remove locks created by this plugin
+*/
+if ($remove_lock){
+ if(session::is_set('mailqueue')){
+ // Nothing to unlock here
+ }
+}
+
+/* Remove this plugin from session
+*/
if ( $cleanup ){
session::un_set('mailqueue');
-}
+}else{
-if (!$remove_lock){
/* Create mailqueue object on demand */
if (!session::is_set('mailqueue') || (isset($_GET['reset']) && $_GET['reset'] == 1)){
$ui = get_userinfo();
index 80957462b683a1dedd15c8f7ebb3ec828163c31f..b8fe96a5d055f4d022e1f619236c9b65015bcdb0 100644 (file)
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-$lock_msg ="";
-$display ="";
-/* Remove classes and variables from session
- */
+/* Remove locks created by this plugin
+*/
+$lock_msg="";
+if ($remove_lock){
+ if(session::is_set('mailAccount') && session::is_set('edit')){
+ del_lock($ui->dn);
+ }
+}
+
+/* Remove this plugin from session
+*/
if ( $cleanup ){
session::un_set('mailAccount');
session::un_set('edit');
-}
-
-
-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)){
diff --git a/gosa-plugins/nagios/personal/nagios/main.inc b/gosa-plugins/nagios/personal/nagios/main.inc
index bcb8fccc7fae5ee5f408e891859750c70ab615d2..49cc58396ed43cdba0e8f4a0f940bab7d179b6d7 100644 (file)
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-$display = "";
-$lock_msg = "";
-/* Remove classes and variables from session
- */
+/* Remove locks created by this plugin
+*/
+$lock_msg="";
+if ($remove_lock){
+ if(session::is_set('nagiosAccount') && session::is_set('edit')){
+ del_lock($ui->dn);
+ }
+}
+
+/* Remove this plugin from session
+*/
if ( $cleanup ){
session::un_set('nagiosAccount');
session::un_set('edit');
-}
-
-
-if ( $remove_lock){
- if(session::is_set('nagiosAccount') && session::is_set('edit')){
- del_lock ($ui->dn);
- }
}else{
diff --git a/gosa-plugins/netatalk/personal/netatalk/main.inc b/gosa-plugins/netatalk/personal/netatalk/main.inc
index ec39896888d3485dd7fa0c7eed0850b0664fd2dc..c1f06c88db67944ca6c73a1558329a533d86df77 100644 (file)
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-$lock_msg = "";
+/* Remove locks created by this plugin
+*/
+$lock_msg="";
+if ($remove_lock){
+ if(session::is_set('netatalk') && session::is_set('edit')){
+ del_lock($ui->dn);
+ }
+}
-/* Remove classes and variables from session
- */
+/* Remove this plugin from session
+*/
if ( $cleanup ){
session::un_set('netatalk');
session::un_set('edit');
-}
-
-if ( $remove_lock){
- if(session::is_set('netatalk') && session::is_set('edit')){
- del_lock ($ui->dn);
- }
}else{
diff --git a/gosa-plugins/samba/personal/samba/main.inc b/gosa-plugins/samba/personal/samba/main.inc
index 9067f2107856925257cefd9dd31b1c6dd441aafc..e4e211304fba258f36381cfcbdc999e50716edfa 100644 (file)
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-$display = "";
-$lock_msg = "";
-/* Remove classes and variables from session
- */
+/* Remove locks created by this plugin
+*/
+$lock_msg="";
+if ($remove_lock){
+ if(session::is_set('sambaAccount') && session::is_set('edit')){
+ del_lock($ui->dn);
+ }
+}
+
+/* Remove this plugin from session
+*/
if ( $cleanup ){
session::un_set('sambaAccount');
session::un_set('edit');
-}
-
-if ( $remove_lock){
- if(session::is_set('sambaAccount') && session::is_set('edit')){
- del_lock ($ui->dn);
- }
}else{
diff --git a/gosa-plugins/scalix/personal/scalix/main.inc b/gosa-plugins/scalix/personal/scalix/main.inc
index d0ee2b973922763e407d65eec92935450f4106d3..03a92ec208d78076dd6dc6d07c407b06b6cba347 100644 (file)
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-/* Remove classes and variables from session
- */
+/* Remove locks created by this plugin
+*/
+$lock_msg="";
+if ($remove_lock){
+ if(session::is_set('scalixAccount') && session::is_set('edit')){
+ del_lock($ui->dn);
+ }
+}
+
+/* Remove this plugin from session
+*/
if ( $cleanup ){
session::un_set('scalixAccount');
session::un_set('edit');
-}
-
-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)){
index 11096e0ea8f49f442e65234022cd8f5391f1328c..d5177179f65b0342a68ae0d5c4d387795b5cf4fc 100644 (file)
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-/* Remove classes and variables from session
- */
-if ( $cleanup ){
- session::un_set('sudoManagement');
-}
-
+/* Remove locks created by this plugin
+*/
if ($remove_lock){
if(session::is_set('sudoManagement')){
- $sudoManagement = session::get('sudoManagement');
- $sudoManagement->remove_lock();
+ $macl = session::get('sudoManagement');
+ $macl->remove_lock();
}
-} else {
+}
+
+/* Remove this plugin from session
+*/
+if ( $cleanup ){
+ session::un_set('sudoManagement');
+}else{
+
/* Create sudoManagement object on demand */
if (!session::is_set('sudoManagement') || (isset($_GET['reset']) && $_GET['reset'] == 1)){
session::set('sudoManagement',new sudoManagement ($config, $ui));
diff --git a/gosa-plugins/systems/admin/systems/main.inc b/gosa-plugins/systems/admin/systems/main.inc
index 90bc586dcf42a7a1c070a6bd24d5b94ebe1d7e75..2e771f5a02c9f7cf9065bc02f677a27985033b18 100644 (file)
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-/* Remove classes and variables from session
- */
+/* Remove locks created by this plugin
+*/
+if ($remove_lock){
+ if(session::is_set('systems')){
+ $macl = session::get('systems');
+ $macl->remove_lock();
+ }
+}
+
+/* Remove this plugin from session
+*/
if ( $cleanup ){
session::un_set('systems');
-}
+}else{
-if ($remove_lock){
- if(session::is_set('systems')){
- $systems = session::get('systems');
- $systems->remove_lock();
- }
-} else {
/* Create usermanagement object on demand */
if (!session::is_set('systems') || (isset($_GET['reset']) && $_GET['reset'] == 1)){
session::set('systems',new systems($config, $ui));