Code

Fixed back button, only allowed switching to valid deps
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 15 Dec 2006 06:53:14 +0000 (06:53 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 15 Dec 2006 06:53:14 +0000 (06:53 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5401 594d385d-05f5-0310-b6e9-bd551577e9d8

include/class_MultiSelectWindow.inc
plugins/gofax/faxreports/class_faxreport.inc

index 6df9f225708a5be8bab63475ca91290f810701a0..fee7d60acab6d7f8873f1729ecf0a30ab45d4e30 100644 (file)
@@ -411,22 +411,25 @@ class MultiSelectWindow{
       }
 
 
-                       /* If Back-button is pressed, move back one step in DN */
-                       if($s_action=="back"){
-                               //FIXME: This is not 100% correct. We'll only display ou's, but there may be
-                               //       a step between. You'll stumble in a "hidden" department in this case.
-                               $base_back= preg_replace("/^[^,]+,/", "", $_SESSION['CurrentMainBase']);
-
-                               /* The department array keeps non DN entries as index. We need to convert
-                                  it before checking the existance. */
-                               $base_back= trim(convert_department_dn($base_back));
-
-                               /* Check if the department exists, otherwise revert to the configure base DN */
-                               if(isset($this->config->departments[$base_back])){
-                                       $this->selectedBase= $this->config->departments[$base_back];
-                               }else{
-                                       $this->selectedBase= $this->config->departments['/'];
-                               }
+      /* If Back-button is pressed, move back one step in DN */
+      if($s_action=="back"){
+
+        /* Get parent deprtment and check if we are allowed to step in it */
+        $base_back= preg_replace("/^[^,]+,/", "", $_SESSION['CurrentMainBase']);
+        $dep_id = $this->ui->get_module_departments($this->module);
+        if(in_array_ics($base_back,$dep_id)){
+
+          /* The department array keeps non DN entries as index. We need to convert
+             it before checking the existance. */
+          $base_back= trim(convert_department_dn($base_back));
+
+          /* Check if the department exists, otherwise revert to the configure base DN */
+          if(isset($this->config->departments[$base_back])){
+            $this->selectedBase= $this->config->departments[$base_back];
+          }else{
+            $this->selectedBase= $this->config->departments['/'];
+          }
+        }
                        }
       $_SESSION['CurrentMainBase'] = $this->selectedBase;
                }
index 4b892b5d5fcb5507a2da161115eedcde7e761d80..d9b0c3d949ee8d47e68ed93519052a7fd7c3ca95 100644 (file)
@@ -190,6 +190,9 @@ class faxreport extends plugin
       }
       $queuing_time= $line['queuing_time'];
 
+      /* The user is allowed to download all fax images from those users 
+          that are listed in $_SESSION['fuserfilter'] 
+         Don't forget to check getfax.php if you change somthing here */
       $_SESSION['fuserfilter']= $this->userfilter;
       $smarty->assign("plug", "?plug=".validate($_GET['plug']));
       $smarty->assign("detail", validate($_GET['detail']));