Fixed bug #15535: Error: No pages are found on the rootlevel! in Frontend when using...
[Packages/TYPO3.CMS.git] / typo3 / sysext / dbal / class.ux_t3lib_sqlparser.php
index bbb861d..aabd173 100644 (file)
@@ -491,7 +491,7 @@ class ux_t3lib_sqlparser extends t3lib_sqlparser {
                                                                $output .= ', ' . $v['func']['default'][1] . $this->compileAddslashes($v['func']['default'][0]) . $v['func']['default'][1];
                                                                $output .= ')';
                                                        } elseif (isset($v['func']) && $v['func']['type'] === 'FIND_IN_SET') {
-                                                               $output = ' ' . trim($v['modifier']) . ' ';
+                                                               $output .= ' ' . trim($v['modifier']) . ' ';
                                                                if ($functionMapping) {
                                                                        switch (TRUE) {
                                                                                case ($GLOBALS['TYPO3_DB']->runningADOdbDriver('mssql')):
@@ -643,7 +643,7 @@ class ux_t3lib_sqlparser extends t3lib_sqlparser {
                                                                                $output .= ' ' . $v['comparator'];
 
                                                                                        // Detecting value type; list or plain:
-                                                                               if (t3lib_div::inList('NOTIN,IN', strtoupper(str_replace(array(' ', "\t", "\r", "\n"), '', $v['comparator'])))) {
+                                                                               if (t3lib_div::inList('NOTIN,IN', strtoupper(str_replace(array(' ', TAB, CR, LF), '', $v['comparator'])))) {
                                                                                        if (isset($v['subquery'])) {
                                                                                                $output .= ' (' . $this->compileSELECT($v['subquery']) . ')';
                                                                                        } else {
@@ -653,6 +653,12 @@ class ux_t3lib_sqlparser extends t3lib_sqlparser {
                                                                                                }
                                                                                                $output .= ' (' . trim(implode(',', $valueBuffer)) . ')';
                                                                                        }
+                                                                               } else if (t3lib_div::inList('BETWEEN,NOT BETWEEN', $v['comparator'])) {
+                                                                                       $lbound = $v['values'][0];
+                                                                                       $ubound = $v['values'][1];
+                                                                                       $output .= ' ' . $lbound[1] . $this->compileAddslashes($lbound[0]) . $lbound[1];
+                                                                                       $output .= ' AND ';
+                                                                                       $output .= $ubound[1] . $this->compileAddslashes($ubound[0]) . $ubound[1];
                                                                                } else if (isset($v['value']['operator'])) {
                                                                                        $values = array();
                                                                                        foreach ($v['value']['args'] as $fieldDef) {