@@ -92,7 +92,9 @@ discard block |
||
| 92 | 92 | */ |
| 93 | 93 | public function getQueryParam($paramName) |
| 94 | 94 | { |
| 95 | - if (!isset($this->queryParams[$paramName])) return null; |
|
| 95 | + if (!isset($this->queryParams[$paramName])) { |
|
| 96 | + return null; |
|
| 97 | + } |
|
| 96 | 98 | $val = filter_var($this->queryParams[$paramName], FILTER_SANITIZE_FULL_SPECIAL_CHARS); |
| 97 | 99 | return ($val !== null ? str_replace('\\', '', $val) : null); |
| 98 | 100 | } |
@@ -109,7 +111,9 @@ discard block |
||
| 109 | 111 | |
| 110 | 112 | public function getQueryParamPOST($paramName) |
| 111 | 113 | { |
| 112 | - if (!isset($this->queryParamsPOST[$paramName])) return null; |
|
| 114 | + if (!isset($this->queryParamsPOST[$paramName])) { |
|
| 115 | + return null; |
|
| 116 | + } |
|
| 113 | 117 | return filter_var($this->queryParamsPOST[$paramName], FILTER_SANITIZE_FULL_SPECIAL_CHARS); |
| 114 | 118 | } |
| 115 | 119 | |
@@ -124,13 +128,17 @@ discard block |
||
| 124 | 128 | |
| 125 | 129 | public function getServerConstant($paramName) |
| 126 | 130 | { |
| 127 | - if (!isset($this->serverConstants[$paramName])) return null; |
|
| 131 | + if (!isset($this->serverConstants[$paramName])) { |
|
| 132 | + return null; |
|
| 133 | + } |
|
| 128 | 134 | return filter_var($this->serverConstants[$paramName], FILTER_SANITIZE_FULL_SPECIAL_CHARS); |
| 129 | 135 | } |
| 130 | 136 | |
| 131 | 137 | public function getCookie($paramName) |
| 132 | 138 | { |
| 133 | - if (!isset($this->cookies[$paramName])) return null; |
|
| 139 | + if (!isset($this->cookies[$paramName])) { |
|
| 140 | + return null; |
|
| 141 | + } |
|
| 134 | 142 | return filter_var($this->cookies[$paramName], FILTER_SANITIZE_FULL_SPECIAL_CHARS); |
| 135 | 143 | } |
| 136 | 144 | |
@@ -271,9 +279,11 @@ discard block |
||
| 271 | 279 | */ |
| 272 | 280 | public function setVocab($vocabid) |
| 273 | 281 | { |
| 274 | - if (strpos($vocabid, ' ') !== false) // if there are multiple vocabularies just storing the string |
|
| 282 | + if (strpos($vocabid, ' ') !== false) { |
|
| 283 | + // if there are multiple vocabularies just storing the string |
|
| 275 | 284 | { |
| 276 | 285 | $this->setVocabids($vocabid); |
| 286 | + } |
|
| 277 | 287 | } else { |
| 278 | 288 | $this->vocab = $this->model->getVocabulary($vocabid); |
| 279 | 289 | } |