Code

Added cleanup variable to main.incs
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 12 Dec 2008 11:50:37 +0000 (11:50 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 12 Dec 2008 11:50:37 +0000 (11:50 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13281 594d385d-05f5-0310-b6e9-bd551577e9d8

36 files changed:
gosa-core/html/main.php
gosa-core/plugins/admin/acl/main.inc
gosa-core/plugins/admin/departments/main.inc
gosa-core/plugins/admin/groups/main.inc
gosa-core/plugins/admin/ogroups/main.inc
gosa-core/plugins/admin/users/main.inc
gosa-core/plugins/personal/generic/main.inc
gosa-core/plugins/personal/password/main.inc
gosa-core/plugins/personal/posix/main.inc
gosa-plugins/addressbook/addons/addressbook/main.inc
gosa-plugins/connectivity/personal/connectivity/main.inc
gosa-plugins/dak/addons/dak/main.inc
gosa-plugins/dfs/addons/godfs/main.inc
gosa-plugins/fai/admin/fai/main.inc
gosa-plugins/gofax/gofax/blocklists/main.inc
gosa-plugins/gofax/gofax/faxaccount/main.inc
gosa-plugins/gofax/gofax/faxreports/main.inc
gosa-plugins/gofon/gofon/conference/main.inc
gosa-plugins/gofon/gofon/fonreports/main.inc
gosa-plugins/gofon/gofon/macro/main.inc
gosa-plugins/gofon/gofon/phoneaccount/main.inc
gosa-plugins/goto/addons/goto/main.inc
gosa-plugins/goto/admin/applications/main.inc
gosa-plugins/goto/admin/devices/main.inc
gosa-plugins/goto/admin/mimetypes/main.inc
gosa-plugins/goto/personal/environment/main.inc
gosa-plugins/ldapmanager/addons/ldapmanager/main.inc
gosa-plugins/log/addons/logview/main.inc
gosa-plugins/mail/addons/mailqueue/main.inc
gosa-plugins/mail/personal/mail/main.inc
gosa-plugins/nagios/personal/nagios/main.inc
gosa-plugins/netatalk/personal/netatalk/main.inc
gosa-plugins/samba/personal/samba/main.inc
gosa-plugins/scalix/personal/scalix/main.inc
gosa-plugins/sudo/admin/sudo/main.inc
gosa-plugins/systems/admin/systems/main.inc

index 2cb0440db76923006b4e9164110c4fe4ac87af26..e358c41096e0a975fbab95ffedfc2e09f7b71c44 100644 (file)
@@ -199,12 +199,14 @@ if (isset($_GET['plug']) && $plist->plugin_access_allowed($_GET['plug'])){
 if ($old_plugin_dir != $plugin_dir && $old_plugin_dir != "" || isset($_POST['delete_lock'])){
   if (is_file("$old_plugin_dir/main.inc")){
     $remove_lock= true;
+    $cleanup= true;
     $display = "";
     require_once ("$old_plugin_dir/main.inc");
     $display = "";
   }
 }
 $remove_lock= false;
+$cleanup= false;
 
 /* Check for sizelimits */
 eval_sizelimit();
index 23461bb133ecd4c431503704e765cde434f9c864..edfd23da33783036af3e85b96ff006f1acb4d5e9 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');
+}
+
+
 if ($remove_lock){
         if(session::is_set('macl')){
                 $macl = session::get('macl');
index 8eecd8276015cdb0b69de9570c79c687be5a0448..35f4513545f0654d8f05901c544fa734c16c0294 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');
+}
+
+
 if ($remove_lock){
         if(session::is_set('department')){
                 $department = session::get('department');
index a57e08dfa83f115770e9c55201664023ac1bd66b..4f9aaf72f0e51e36b2cf1c2964ce3e9305129062 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');
+}
+
+
 if ($remove_lock){
   if(session::is_set('groupManagement')){
     $groupManagement = session::get('groupManagement');
index e571d7c2157f1348690d897e0c8f06228cba29f6..856adacffe6b9eb166a31bb32e8984b556c94255 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');
+}
 
 
 if ($remove_lock){
index 1ca3e6eb4ee11d206363a618244e137f18cfccac..05d3eddf9eaac7b18f83611b24d1c5b302f5dec1 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');
+}
+
+
 if ($remove_lock){
   if(session::is_set('userManagement')){
     $userManagement = session::get('userManagement');
index b3fc2e0f16485d73215729c30ce9d733fbce5056..6be96e24986110a2590fca1cd673de744412e417 100644 (file)
 $display  = "";
 $lock_msg = "";
 
+/* Remove classes and variables 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);
index 568aafa40be440a3fcb7925acfedc843bd075d0d..9b5c981cae83fbf465edc19b4fad29c35a0da241 100644 (file)
 /* Clear display */
 $display= "";
 
+if ( $cleanup ){
+  session::un_set('password');
+  session::un_set('edit');
+}
+
 if (!$remove_lock){
 
   /* Reset requested? */
index 8cb18d3047e239eb9a88344868fdff05623161a5..9af7d5edb10ab0bedb03f0a26c1d5b3cd44fc179 100644 (file)
 /* Clear display */
 $display  = "";
 $lock_msg = "";
+
+/* Remove classes and variables 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);
index 3535b05f902f59648df3f3d990007715a31bcb03..cffab3127d512187f52dbdda224eefb17059ce1d 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('addressbook');
+}
+
 if (!$remove_lock){
        /* Create phonelist object on demand */
        if (!session::is_set('addressbook') || (isset($_GET['reset']) && $_GET['reset'] == 1)){
index b19aec38446fca28d57f37c6fcc3b5e9067cce83..e284a611403d19b2cea88168d51e18886c24cd19 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('connectivity');
+  session::un_set('edit');
+}
+
+
 if ( $remove_lock){
   if(session::is_set('connectivity') && session::is_set('edit')){
     del_lock ($ui->dn);
index 3ffdd5f8a8f7a6743769d7867a8a91ce53ae09ae..9efe186851210d1d30c78bd0ae43e0a3b0d8a6fb 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
 */
+
+/* Remove classes and variables from session
+ */
+if ( $cleanup ){
+  session::un_set('dak_plug');
+}
+
+
 if (!$remove_lock){
        if (!session::is_set('dak_plug') || (isset($_GET['reset']) && $_GET['reset'] == 1)){
                session::set('dak_plug',new dakplug($config));
index 524d166cf2d732e7e19a79ac50a17f7143f49884..b4047a66294969de579dd78f77d10cf5f0a9f03f 100644 (file)
@@ -1,4 +1,15 @@
 <?php
+
+
+
+
+/* Remove classes and variables from session
+ */
+if ( $cleanup ){
+  session::un_set('dfsManagment');
+}
+
+
    if ($remove_lock) {
      if (session::is_set('dfsManagment')) {
        $dfsManagment  = session::get('dfsManagment');
index e58e59da5aae659ed5d7777d2e857b53d707508c..7b3ffddd6a7f0d128bceff3becc3f638d1cdff81 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');
+}
+
+
 if ($remove_lock){
         if(session::is_set('FAI')){
                 $FAI = session::get('FAI');
                 $FAI->remove_lock();
-                session::un_set ('FAI');
         }
 } else {
        /* Create usermanagement object on demand */
index 8cc5c6e6ef2d6e746892d57d8b05b5b71a00b935..bc3f555f290dbdebc87ee7a6840a31a6b8032671 100644 (file)
@@ -1,9 +1,16 @@
 <?php
+
+/* Remove classes and variables from session
+ */
+if ( $cleanup ){
+  session::un_set('blocklist');
+}
+
+
 if ($remove_lock){
         if(session::is_set('blocklist')){
                 $blocklist = session::get('blocklist');
                 $blocklist->remove_lock ($ui->dn);
-                session::un_set ('blocklist');
         }
 } else {
        /* Create blocklist object on demand */
index 2bfe4a510fec293a62623b07ba671cf806c2dccc..8d4d3966d2d9f0a36205350e7213c888de03ec7d 100644 (file)
@@ -3,6 +3,14 @@
 $display  ="";
 $lock_msg = "";
 
+/* Remove classes and variables from session
+ */
+if ( $cleanup ){
+  session::un_set('gofaxAccount');
+  session::un_set ('edit');
+}
+
+
 if (!$remove_lock){
 
        /* Reset requested? */
index 0f1b4d7bffbb1ff69c3496dfb7e06d00f383fb48..89a2571caf5cb909b96fea6397e1842b503791b5 100644 (file)
@@ -1,5 +1,12 @@
 <?php
 
+/* Remove classes and variables from session
+ */
+if ( $cleanup ){
+  session::un_set('faxreport');
+}
+
+
 if (!$remove_lock){
        /* Create faxreport object on demand */
        if (!session::is_set('faxreport') || (isset($_GET['reset']) && $_GET['reset'] == 1)){
index 1874c2cec6b7b4435a1a4b346f5c5bc4071df4e1..59a61319e92727357ab16cd98ef05229af969a81 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('conference');
+}
+
+
 if ($remove_lock){
         if(session::is_set('conference')){
                 $conference = session::get('conference');
                 $conference->remove_lock();
-                session::un_set ('conference');
         }
 } else {
        /* Create usermanagement object on demand */
index 4f85de2de9d3a29995454e7632516d78e2704a09..eaf2d0c8aa9b9107bcec2b61a29bce0cd3a58020 100644 (file)
@@ -1,5 +1,12 @@
 <?php
 
+/* Remove classes and variables from session
+ */
+if ( $cleanup ){
+  session::un_set('fonreport');
+}
+
+
 if (!$remove_lock){
        /* Create fonreport object on demand */
        if (!session::is_set('fonreport') || (isset($_GET['reset']) && $_GET['reset'] == 1)){
index 474e032dc19948f4cfede3c5bf3bfb0deff549b0..8c7b128fcc25b741513383238a7bc15f0f978c0b 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');
+}
+
+
 if ($remove_lock){
   if(session::is_set('macroManagement')){
     $macroManagement = session::get('macroManagement');
     $macroManagement->remove_lock();
-    session::un_set ('macroManagement');
   }
 } else {
 
index 957e31c79bca0c18d68d90ff587dd62d9ec8c39f..3c52005be442833add3dd6275e41df956ba5b476 100644 (file)
 
 $display       = "";
 $lock_msg      = "";
+
+/* Remove classes and variables from session
+ */
+if ( $cleanup ){
+  session::un_set('phoneAccount');
+}
+
+
 if (!$remove_lock){
        /* Reset requested? */
        if (isset($_POST['edit_cancel']) ||
index ade2ef7a434b5021997bb3f8b4ca1c3a3a6b7cbc..e61909a9761ae8f931eb87f98b8edf6622d79f3c 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');
+}
+
+
 if (!$remove_lock){
 
        /* Create gotomasses object on demand */
index e65aac7fd91f690ef6769fe3c831e2091d031eea..81e3abc5ce5cf8c177bc39e6b41528078ac053c2 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('applicationManagement');
+}
+
 if ($remove_lock){
         if(session::is_set('applicationManagement')){
                 $applicationManagement = session::get('applicationManagement');
                 $applicationManagement->remove_lock();
-                session::un_set ('applicationManagement');
         }
 } else {
        /* Create applicationManagement object on demand */
index 432ee16439b929885f5feb080c89b38ef68d4f68..348808529c2e2d5614c9993f119b5f718afb1f07 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');
+}
+
+
 if ($remove_lock){
   if(session::is_set('DeviceManagement')){
     $DeviceManagement = session::get('DeviceManagement');
     $DeviceManagement->remove_lock();
-    session::un_set ('DeviceManagement');
   }
 } else {
 
index 24268e02762937690e929f5404e9c833b22894fc..cb55e1fa4405691daa140929a614cc8b75454cdd 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');
+}
+
+
 if ($remove_lock){
   if(session::is_set('MimeTypeManagement')){
     $MimeTypeManagement = session::get('MimeTypeManagement');
     $MimeTypeManagement->remove_lock();
-    session::un_set ('MimeTypeManagement');
   }
 } else {
 
index 4fb93711fa5d12ac246cc2318164d34f1bfc1e18..094ffd70f5235a3a2a86a270d98cfeeb768d9230 100644 (file)
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 $lock_msg = "";
+
+/* Remove classes and variables 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);
index a93cb0c69e14da7b46c97881cc5be340ad1cc1f4..0c7904b399ecdb1a50773fd3584e754577833bf9 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('ldif');
+}
+
 if (!$remove_lock){
        /* Create phonelist object on demand */
        if (!session::is_set('ldif') || (isset($_GET['reset']) && $_GET['reset'] == 1)){
index 88769d0c24607e6693f547bdd3947d6bc1a48873..b42b0f6c7aba2b2ffcf8848fc61a017e06329f21 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
 */
+
+
+/* Remove classes and variables from session
+ */
+if ( $cleanup ){
+  session::un_set('log_tabs');
+}
+
+
 if (!$remove_lock){
 
        /* Create logview object on demand */
index 1fcfe425c58c19eb01ba9f96d70a81ab50b3f7c5..c3cd34ca8a7d8f875e7c6f04cc07685d71d6eee4 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('mailqueue');
+}
+
 if (!$remove_lock){
        /* Create mailqueue object on demand */
        if (!session::is_set('mailqueue') || (isset($_GET['reset']) && $_GET['reset'] == 1)){
index 205083bcaf40e736170a6334ef60c0baa2dbcfc1..80957462b683a1dedd15c8f7ebb3ec828163c31f 100644 (file)
 
 $lock_msg ="";
 $display  =""; 
+
+/* Remove classes and variables 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);
index 750e2ee046aa91864eae103f7deab96ce64946e3..bcb8fccc7fae5ee5f408e891859750c70ab615d2 100644 (file)
 $display    = "";
 $lock_msg   = "";
 
+/* Remove classes and variables 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);
index 83ecfbc29c70e08571045aacc9958f0c83c8c103..ec39896888d3485dd7fa0c7eed0850b0664fd2dc 100644 (file)
  */
 
 $lock_msg = "";
+
+/* Remove classes and variables 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);
@@ -89,7 +97,7 @@ if ( $remove_lock){
   }
 
   /* Execute formular */
-  if(!empty($lock_msg(){
+  if(!empty($lock_msg)){
     $display = $lock_msg;
   }else{
     $display.= $netatalk->execute ();
index f1dc45a06ed298f2dc90018af06974fd87e0b3d8..9067f2107856925257cefd9dd31b1c6dd441aafc 100644 (file)
 
 $display  = "";
 $lock_msg = "";
+
+/* Remove classes and variables 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);
index ae033b0732baa826b2e7f8f0b182ebb63413c8e0..d0ee2b973922763e407d65eec92935450f4106d3 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('scalixAccount');
+  session::un_set('edit');
+}
+
 if ( $remove_lock){
   if(session::is_set('scalixAccount') && session::is_set('edit')){
     del_lock ($ui->dn);
index bfb7e2596068dcf77c40d5a5277410edd2849e68..11096e0ea8f49f442e65234022cd8f5391f1328c 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');
+}
+
+
 if ($remove_lock){
   if(session::is_set('sudoManagement')){
     $sudoManagement = session::get('sudoManagement');
     $sudoManagement->remove_lock();
-    session::un_set ('sudoManagement');
   }
 } else {
   /* Create sudoManagement object on demand */
index c33f6ba3c2437556793949d09d95c2c012947db9..90bc586dcf42a7a1c070a6bd24d5b94ebe1d7e75 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('systems');
+}
+
+
 if ($remove_lock){
         if(session::is_set('systems')){
                 $systems = session::get('systems');
                 $systems->remove_lock();
-                session::un_set ('systems');
         }
 } else {
        /* Create usermanagement object on demand */