From: hickert Date: Tue, 27 Apr 2010 06:21:39 +0000 (+0000) Subject: Updated baseSelector X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=c1afefdafd7148a79da1e9173c711839aa5be8ea;p=gosa.git 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 --- 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);