Code

Updated baseSelector
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 27 Apr 2010 06:21:39 +0000 (06:21 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 27 Apr 2010 06:21:39 +0000 (06:21 +0000)
- Fixed problem with manual input of bases with ' or " in their name.

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@17865 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/include/class_baseSelector.inc
gosa-core/include/class_listing.inc

index 68dd3ca036630620cb822c31ef425b06a08aa96c..ce38b2ac23d9adeaa85a143c4212ce3429ffbfc7 100644 (file)
@@ -110,6 +110,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 +119,7 @@ class baseSelector {
           return false;
         }
       }else{
+
         // Input field set?
         if (isset($_POST['bs_input_'.$this->pid])) {
 
@@ -127,7 +129,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;
index bfc9c0735a2f92d51c02d637568023cd84faa39c..c49320984f65053bd1346afb14141bb25bd7ecba 100644 (file)
@@ -502,6 +502,7 @@ class listing {
     // Take care of base selector
     if ($this->baseMode) {
       $this->baseSelector->update();
+
       // Check if a wrong base was supplied
       if(!$this->baseSelector->checkLastBaseUpdate()){
          msg_dialog::display(_("Error"), msgPool::check_base(), ERROR_DIALOG);