@@ -86,8 +86,7 @@ discard block |
||
| 86 | 86 | if (!is_array($mItemno)) { |
| 87 | 87 | $hResult->bindValue(':itemno', $mItemno, \PDO::PARAM_STR); |
| 88 | 88 | } |
| 89 | - } |
|
| 90 | - elseif (isset($_REQUEST["searchtext"]) && strlen($_REQUEST["searchtext"]) > 2) { |
|
| 89 | + } elseif (isset($_REQUEST["searchtext"]) && strlen($_REQUEST["searchtext"]) > 2) { |
|
| 91 | 90 | $sSearchtext = filter_var(trim($_REQUEST["searchtext"]), FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW); |
| 92 | 91 | if (isset($_REQUEST["artnoexact"])) { |
| 93 | 92 | $hResult->bindValue(':searchtext', $sSearchtext, \PDO::PARAM_STR); |
@@ -114,8 +113,9 @@ discard block |
||
| 114 | 113 | $sql .= 'item_base.itm_no = :itemno'; |
| 115 | 114 | } |
| 116 | 115 | } elseif (isset($_REQUEST["searchtext"]) && \strlen($_REQUEST["searchtext"]) > 2) { |
| 117 | - if (isset($_REQUEST["artnoexact"])) $sql .= 'item_base.itm_no = :searchtext'; |
|
| 118 | - else { |
|
| 116 | + if (isset($_REQUEST["artnoexact"])) { |
|
| 117 | + $sql .= 'item_base.itm_no = :searchtext'; |
|
| 118 | + } else { |
|
| 119 | 119 | $sql .= '(item_base.itm_no LIKE :searchtextwild1 OR itm_name LIKE :searchtextwild2'; |
| 120 | 120 | $sql .= ' OR itml_name_override LIKE :searchtextwild3 OR itml_text1 LIKE :searchtextwild4'; |
| 121 | 121 | $sql .= ' OR itml_text2 LIKE :searchtextwild5)'; |
@@ -123,7 +123,9 @@ discard block |
||
| 123 | 123 | } else { |
| 124 | 124 | if (is_array($mItemIndex)) { |
| 125 | 125 | $sql .= "("; |
| 126 | - foreach ($mItemIndex as $sAIndex) $sql .= "itm_index LIKE '%".filter_var($sAIndex, FILTER_SANITIZE_SPECIAL_CHARS)."%' OR "; |
|
| 126 | + foreach ($mItemIndex as $sAIndex) { |
|
| 127 | + $sql .= "itm_index LIKE '%".filter_var($sAIndex, FILTER_SANITIZE_SPECIAL_CHARS)."%' OR "; |
|
| 128 | + } |
|
| 127 | 129 | $sql = \HaaseIT\Toolbox\Tools::cutStringend($sql, 4); |
| 128 | 130 | $sql .= ")"; |
| 129 | 131 | } else { |
@@ -116,9 +116,13 @@ |
||
| 116 | 116 | If the last part of the path doesn't include a dot (.) and is not empty, apend a slash. |
| 117 | 117 | If there is already a slash at the end, the last part of the path array will be empty. |
| 118 | 118 | */ |
| 119 | - if (mb_strpos($aPath[count($aPath) - 1], '.') === false && $aPath[count($aPath) - 1] != '') $this->sPath .= '/'; |
|
| 119 | + if (mb_strpos($aPath[count($aPath) - 1], '.') === false && $aPath[count($aPath) - 1] != '') { |
|
| 120 | + $this->sPath .= '/'; |
|
| 121 | + } |
|
| 120 | 122 | |
| 121 | - if ($this->sPath[strlen($this->sPath) - 1] == '/') $this->sPath .= 'index.html'; |
|
| 123 | + if ($this->sPath[strlen($this->sPath) - 1] == '/') { |
|
| 124 | + $this->sPath .= 'index.html'; |
|
| 125 | + } |
|
| 122 | 126 | |
| 123 | 127 | $this->P = new UserPage($this->serviceManager, $this->sPath); |
| 124 | 128 | } |
@@ -56,7 +56,9 @@ |
||
| 56 | 56 | $hResult->fetch(); |
| 57 | 57 | |
| 58 | 58 | if ($this->cb_pagetype !== 'shorturl') { |
| 59 | - if (!$bReturnRaw) $this->cb_pageconfig = json_decode($this->cb_pageconfig); |
|
| 59 | + if (!$bReturnRaw) { |
|
| 60 | + $this->cb_pageconfig = json_decode($this->cb_pageconfig); |
|
| 61 | + } |
|
| 60 | 62 | $this->oPayload = $this->getPayload(); |
| 61 | 63 | } |
| 62 | 64 | } |