Code

Removed plugin stuff from the Snapshot handler
[gosa.git] / gosa-core / include / class_baseSelector.inc
index 68dd3ca036630620cb822c31ef425b06a08aa96c..c6ac8d2b70c391cd79e0b85ad5db83010dc4d0e0 100644 (file)
@@ -92,6 +92,7 @@ class baseSelector {
       $elements= array_reverse($elements, true);
 
       $this->pathMapping[$base]= $base == $config->current['BASE']? '/' : ldap::fix(preg_replace('/(^|,)[a-z0-9]+=/i', '/', implode(',', $elements)));
+      $this->pathMapping[$base]= stripslashes(  $this->pathMapping[$base]);
     }
 
     // Save bases to session for autocompletion
@@ -110,6 +111,7 @@ class baseSelector {
     if(isset($_REQUEST['BPID']) && $_REQUEST['BPID'] == $this->pid) {
       if (isset($_POST['bs_rebase_'.$this->pid]) && !empty($_POST['bs_rebase_'.$this->pid])) {
         $new_base= base64_decode($_POST['bs_rebase_'.$this->pid]);
+
         if (isset($this->pathMapping[$new_base])) {
           $this->base= $new_base;
           $this->action= 'rebase';
@@ -118,6 +120,7 @@ class baseSelector {
           return false;
         }
       }else{
+
         // Input field set?
         if (isset($_POST['bs_input_'.$this->pid])) {
 
@@ -127,7 +130,7 @@ class baseSelector {
             // Check if base is available
             $this->lastState= false;
             foreach ($this->pathMapping as $key => $path) {
-              if (mb_strtolower($path) == mb_strtolower($_POST['bs_input_'.$this->pid])) {
+              if (mb_strtolower($path) == mb_strtolower(get_post('bs_input_'.$this->pid))) {
                 $this->base= $key;
                 $this->lastState= true;
                 break;