From c1afefdafd7148a79da1e9173c711839aa5be8ea Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 27 Apr 2010 06:21:39 +0000 Subject: [PATCH] Updated baseSelector - 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 | 4 +++- gosa-core/include/class_listing.inc | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/gosa-core/include/class_baseSelector.inc b/gosa-core/include/class_baseSelector.inc index 68dd3ca03..ce38b2ac2 100644 --- a/gosa-core/include/class_baseSelector.inc +++ b/gosa-core/include/class_baseSelector.inc @@ -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; diff --git a/gosa-core/include/class_listing.inc b/gosa-core/include/class_listing.inc index bfc9c0735..c49320984 100644 --- a/gosa-core/include/class_listing.inc +++ b/gosa-core/include/class_listing.inc @@ -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); -- 2.30.2