@@ -17,7 +17,6 @@ |
||
17 | 17 | |
18 | 18 | use phpMyFAQ\Filter; |
19 | 19 | use phpMyFAQ\Permission\LargePermission; |
20 | -use phpMyFAQ\User; |
|
21 | 20 | |
22 | 21 | if (!defined('IS_VALID_PHPMYFAQ')) { |
23 | 22 | $protocol = 'http'; |
@@ -62,7 +62,7 @@ |
||
62 | 62 | foreach ($memberList as $single_member) { |
63 | 63 | $group = $user->perm->getGroupData($single_member); |
64 | 64 | $members[] = array('group_id' => $group['group_id'], |
65 | - 'name' => $group['name'] ); |
|
65 | + 'name' => $group['name'] ); |
|
66 | 66 | } |
67 | 67 | echo json_encode($members); |
68 | 68 | } |
@@ -62,7 +62,7 @@ |
||
62 | 62 | foreach ($memberList as $single_member) { |
63 | 63 | $group = $user->perm->getGroupData($single_member); |
64 | 64 | $members[] = array('group_id' => $group['group_id'], |
65 | - 'name' => $group['name'] ); |
|
65 | + 'name' => $group['name']); |
|
66 | 66 | } |
67 | 67 | echo json_encode($members); |
68 | 68 | } |
@@ -19,8 +19,8 @@ |
||
19 | 19 | |
20 | 20 | use phpMyFAQ\Captcha; |
21 | 21 | use phpMyFAQ\Filter; |
22 | -USE phpMyFAQ\Helper\CategoryHelper as HelperCategory; |
|
23 | -USE phpMyFAQ\Helper\CaptchaHelper; |
|
22 | +use phpMyFAQ\Helper\CategoryHelper as HelperCategory; |
|
23 | +use phpMyFAQ\Helper\CaptchaHelper; |
|
24 | 24 | |
25 | 25 | if (!defined('IS_VALID_PHPMYFAQ')) { |
26 | 26 | $protocol = 'http'; |
@@ -32,7 +32,6 @@ |
||
32 | 32 | use phpMyFAQ\Linkverifier; |
33 | 33 | use phpMyFAQ\Rating; |
34 | 34 | use phpMyFAQ\Relation; |
35 | -use phpMyFAQ\Search\Resultset as SearchResultSet; |
|
36 | 35 | use phpMyFAQ\Strings; |
37 | 36 | use phpMyFAQ\Tags; |
38 | 37 | use phpMyFAQ\User\CurrentUser; |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | if (isset($_SERVER['HTTPS']) && strtoupper($_SERVER['HTTPS']) === 'ON') { |
45 | 45 | $protocol = 'https'; |
46 | 46 | } |
47 | - header('Location: ' . $protocol . '://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['SCRIPT_NAME'])); |
|
47 | + header('Location: '.$protocol.'://'.$_SERVER['HTTP_HOST'].dirname($_SERVER['SCRIPT_NAME'])); |
|
48 | 48 | exit(); |
49 | 49 | } |
50 | 50 | |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | if (strpos($_url, '&') === false) { |
134 | 134 | $_link = str_replace('&', '&', $_link); |
135 | 135 | } |
136 | - $oLink = new Link(Link::getSystemRelativeUri() . $_link, $faqConfig); |
|
136 | + $oLink = new Link(Link::getSystemRelativeUri().$_link, $faqConfig); |
|
137 | 137 | $oLink->itemTitle = $oLink->tooltip = $_title; |
138 | 138 | $newFaqPath = $oLink->toString(); |
139 | 139 | $answer = str_replace($_url, $newFaqPath, $answer); |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | $att->getFilename()); |
153 | 153 | } |
154 | 154 | if (count($attList) > 0) { |
155 | - $answer .= '<p>' . $PMF_LANG['msgAttachedFiles'] . ' ' . Strings::substr($outstr, 0, -2) . '</p>'; |
|
155 | + $answer .= '<p>'.$PMF_LANG['msgAttachedFiles'].' '.Strings::substr($outstr, 0, -2).'</p>'; |
|
156 | 156 | } |
157 | 157 | } |
158 | 158 | |
@@ -189,7 +189,7 @@ discard block |
||
189 | 189 | Link::getSystemRelativeUri('index.php'), |
190 | 190 | $recordId, |
191 | 191 | $lang, |
192 | - $PMF_LANG['ad_entry_edit_1'] . ' ' . $PMF_LANG['ad_entry_edit_2'] |
|
192 | + $PMF_LANG['ad_entry_edit_1'].' '.$PMF_LANG['ad_entry_edit_2'] |
|
193 | 193 | ); |
194 | 194 | } |
195 | 195 | |
@@ -213,7 +213,7 @@ discard block |
||
213 | 213 | '%', |
214 | 214 | '%%', |
215 | 215 | Link::getSystemRelativeUri('index.php') |
216 | - ) . 'index.php?%saction=translate&cat=%s&id=%d&srclang=%s', |
|
216 | + ).'index.php?%saction=translate&cat=%s&id=%d&srclang=%s', |
|
217 | 217 | $sids, |
218 | 218 | $currentCategory, |
219 | 219 | $recordId, |
@@ -259,7 +259,7 @@ discard block |
||
259 | 259 | 'writeContent', |
260 | 260 | 'tagsAvailable', |
261 | 261 | [ |
262 | - 'renderTags' => $PMF_LANG['msg_tags'] . ': ' . $faqTagging->getAllLinkTagsById($recordId), |
|
262 | + 'renderTags' => $PMF_LANG['msg_tags'].': '.$faqTagging->getAllLinkTagsById($recordId), |
|
263 | 263 | ] |
264 | 264 | ); |
265 | 265 | } |
@@ -303,7 +303,7 @@ discard block |
||
303 | 303 | 'baseHref' => $faqSystem->getSystemUri($faqConfig), |
304 | 304 | 'writeRubrik' => $categoryName, |
305 | 305 | 'solution_id' => $faq->faqRecord['solution_id'], |
306 | - 'solution_id_link' => Link::getSystemRelativeUri() . '?solution_id=' . $faq->faqRecord['solution_id'], |
|
306 | + 'solution_id_link' => Link::getSystemRelativeUri().'?solution_id='.$faq->faqRecord['solution_id'], |
|
307 | 307 | 'writeThema' => $question, |
308 | 308 | 'writeContent' => $answer, |
309 | 309 | 'writeDateMsg' => $date->format($faq->faqRecord['date']), |
@@ -322,7 +322,7 @@ discard block |
||
322 | 322 | '%', |
323 | 323 | '%%', |
324 | 324 | Link::getSystemRelativeUri('index.php') |
325 | - ) . 'index.php?%saction=savevoting', |
|
325 | + ).'index.php?%saction=savevoting', |
|
326 | 326 | $sids |
327 | 327 | ), |
328 | 328 | 'saveVotingID' => $recordId, |
@@ -105,7 +105,7 @@ |
||
105 | 105 | * |
106 | 106 | * @throws Exception |
107 | 107 | * |
108 | - * @return array |
|
108 | + * @return integer|null |
|
109 | 109 | */ |
110 | 110 | public static function fetchByRecordId(Configuration $config, $recordId): array |
111 | 111 | { |
@@ -95,7 +95,6 @@ |
||
95 | 95 | * Removes the news $newsId from all categories. |
96 | 96 | * Returns true on success, otherwise false. |
97 | 97 | * |
98 | - * @param int $categoryId |
|
99 | 98 | * @return bool |
100 | 99 | */ |
101 | 100 | public function removeNewsFromAllCategories($newsId) |
@@ -236,7 +236,7 @@ discard block |
||
236 | 236 | } |
237 | 237 | |
238 | 238 | /** |
239 | - * @return string |
|
239 | + * @return integer |
|
240 | 240 | */ |
241 | 241 | public function getUserId() |
242 | 242 | { |
@@ -264,7 +264,6 @@ discard block |
||
264 | 264 | } |
265 | 265 | |
266 | 266 | /** |
267 | - * @param $showHome $active |
|
268 | 267 | * |
269 | 268 | * @return Entity |
270 | 269 | */ |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | */ |
161 | 161 | public function getId() |
162 | 162 | { |
163 | - return (int) $this->id; |
|
163 | + return (int)$this->id; |
|
164 | 164 | } |
165 | 165 | |
166 | 166 | /** |
@@ -220,7 +220,7 @@ discard block |
||
220 | 220 | */ |
221 | 221 | public function getParentId() |
222 | 222 | { |
223 | - return (int) $this->parentId; |
|
223 | + return (int)$this->parentId; |
|
224 | 224 | } |
225 | 225 | |
226 | 226 | /** |
@@ -240,7 +240,7 @@ discard block |
||
240 | 240 | */ |
241 | 241 | public function getUserId() |
242 | 242 | { |
243 | - return (int) $this->userId; |
|
243 | + return (int)$this->userId; |
|
244 | 244 | } |
245 | 245 | |
246 | 246 | /** |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | * @param string $password Password |
67 | 67 | * @param string $database Database name |
68 | 68 | * |
69 | - * @return bool true, if connected, otherwise false |
|
69 | + * @return null|boolean true, if connected, otherwise false |
|
70 | 70 | */ |
71 | 71 | public function connect($host, $user, $password, $database = '') |
72 | 72 | { |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | /** |
134 | 134 | * Fetch a result row as an object. |
135 | 135 | * |
136 | - * @param mixed $result |
|
136 | + * @param resource $result |
|
137 | 137 | * |
138 | 138 | * @return mixed |
139 | 139 | */ |
@@ -192,7 +192,7 @@ discard block |
||
192 | 192 | /** |
193 | 193 | * Logs the queries. |
194 | 194 | * |
195 | - * @return int |
|
195 | + * @return string |
|
196 | 196 | */ |
197 | 197 | public function log() |
198 | 198 | { |
@@ -203,6 +203,7 @@ discard block |
||
203 | 203 | * Returns just one row. |
204 | 204 | * |
205 | 205 | * @param string |
206 | + * @param string $query |
|
206 | 207 | * |
207 | 208 | * @return string |
208 | 209 | */ |
@@ -294,7 +295,7 @@ discard block |
||
294 | 295 | * |
295 | 296 | * @param string $prefix Table prefix |
296 | 297 | * |
297 | - * @return array |
|
298 | + * @return string[] |
|
298 | 299 | */ |
299 | 300 | public function getTableNames($prefix = '') |
300 | 301 | { |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | * @param string |
70 | 70 | * @param string |
71 | 71 | * |
72 | - * @return bool |
|
72 | + * @return null|boolean |
|
73 | 73 | */ |
74 | 74 | public function connect($host, $user, $passwd, $db = '') |
75 | 75 | { |
@@ -214,7 +214,7 @@ discard block |
||
214 | 214 | /** |
215 | 215 | * Logs the queries. |
216 | 216 | * |
217 | - * @return int |
|
217 | + * @return string |
|
218 | 218 | */ |
219 | 219 | public function log() |
220 | 220 | { |
@@ -248,7 +248,7 @@ discard block |
||
248 | 248 | * |
249 | 249 | * @param string $prefix Table prefix |
250 | 250 | * |
251 | - * @return array |
|
251 | + * @return string[] |
|
252 | 252 | */ |
253 | 253 | public function getTableNames($prefix = '') |
254 | 254 | { |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | $return = $result->fetchArray(SQLITE3_ASSOC); |
135 | 135 | |
136 | 136 | return $return |
137 | - ? (object) $return |
|
137 | + ? (object)$return |
|
138 | 138 | : null; |
139 | 139 | } |
140 | 140 | |
@@ -184,7 +184,7 @@ discard block |
||
184 | 184 | |
185 | 185 | $result->fetchedByPMF = true; |
186 | 186 | while ($row = $result->fetchArray(SQLITE3_ASSOC)) { |
187 | - $ret[] = (object) $row; |
|
187 | + $ret[] = (object)$row; |
|
188 | 188 | } |
189 | 189 | |
190 | 190 | return $ret; |
@@ -297,7 +297,7 @@ discard block |
||
297 | 297 | */ |
298 | 298 | public function nextId($table, $id) |
299 | 299 | { |
300 | - $result = (int) $this->conn->querySingle( |
|
300 | + $result = (int)$this->conn->querySingle( |
|
301 | 301 | sprintf( |
302 | 302 | 'SELECT max(%s) AS current_id FROM %s', |
303 | 303 | $id, |
@@ -1279,7 +1279,7 @@ discard block |
||
1279 | 1279 | * @param int $recordId Record id |
1280 | 1280 | * @param string $language Language |
1281 | 1281 | * |
1282 | - * @return int |
|
1282 | + * @return boolean |
|
1283 | 1283 | */ |
1284 | 1284 | public function addCategoryRelations(Array $categories, $recordId, $language) |
1285 | 1285 | { |
@@ -2575,11 +2575,11 @@ discard block |
||
2575 | 2575 | /** |
2576 | 2576 | * Build the SQL query for retrieving faq records according to the constraints provided. |
2577 | 2577 | * |
2578 | - * @param $queryType |
|
2579 | - * @param $categoryId |
|
2580 | - * @param $bDownwards |
|
2581 | - * @param $lang |
|
2582 | - * @param $date |
|
2578 | + * @param string $queryType |
|
2579 | + * @param integer $categoryId |
|
2580 | + * @param boolean $bDownwards |
|
2581 | + * @param string $lang |
|
2582 | + * @param string $date |
|
2583 | 2583 | * @param $faqId |
2584 | 2584 | * |
2585 | 2585 | * @return string |
@@ -2703,7 +2703,7 @@ discard block |
||
2703 | 2703 | * Build a logic sequence, for a WHERE statement, of those category IDs |
2704 | 2704 | * children of the provided category ID, if any. |
2705 | 2705 | * |
2706 | - * @param $nCatid |
|
2706 | + * @param integer $nCatid |
|
2707 | 2707 | * @param $logicOp |
2708 | 2708 | * @param $oCat |
2709 | 2709 | * |
@@ -408,20 +408,20 @@ discard block |
||
408 | 408 | |
409 | 409 | $result = $this->config->getDb()->query($query); |
410 | 410 | $num = $this->config->getDb()->numRows($result); |
411 | - $pages = (int)ceil($num / $numPerPage); |
|
411 | + $pages = (int)ceil($num/$numPerPage); |
|
412 | 412 | |
413 | 413 | if ($page == 1) { |
414 | 414 | $first = 0; |
415 | 415 | } else { |
416 | - $first = $page * $numPerPage - $numPerPage; |
|
416 | + $first = $page*$numPerPage - $numPerPage; |
|
417 | 417 | } |
418 | 418 | |
419 | 419 | if ($num > 0) { |
420 | 420 | if ($pages > 1) { |
421 | 421 | $output .= sprintf('<p><strong>%s %s %s</strong></p>', |
422 | - $this->translation['msgPage'] . $page, |
|
422 | + $this->translation['msgPage'].$page, |
|
423 | 423 | $this->translation['msgVoteFrom'], |
424 | - $pages . $this->translation['msgPages']); |
|
424 | + $pages.$this->translation['msgPages']); |
|
425 | 425 | } |
426 | 426 | $output .= '<ul class="phpmyfaq_ul">'; |
427 | 427 | |
@@ -594,20 +594,20 @@ discard block |
||
594 | 594 | $result = $this->config->getDb()->query($query); |
595 | 595 | |
596 | 596 | $num = $this->config->getDb()->numRows($result); |
597 | - $pages = ceil($num / $this->config->get('records.numberOfRecordsPerPage')); |
|
597 | + $pages = ceil($num/$this->config->get('records.numberOfRecordsPerPage')); |
|
598 | 598 | |
599 | 599 | if ($page == 1) { |
600 | 600 | $first = 0; |
601 | 601 | } else { |
602 | - $first = ($page * $this->config->get('records.numberOfRecordsPerPage')) - $this->config->get('records.numberOfRecordsPerPage'); |
|
602 | + $first = ($page*$this->config->get('records.numberOfRecordsPerPage')) - $this->config->get('records.numberOfRecordsPerPage'); |
|
603 | 603 | } |
604 | 604 | |
605 | 605 | if ($num > 0) { |
606 | 606 | if ($pages > 1) { |
607 | 607 | $output .= sprintf('<p><strong>%s %s %s</strong></p>', |
608 | - $this->translation['msgPage'] . $page, |
|
608 | + $this->translation['msgPage'].$page, |
|
609 | 609 | $this->translation['msgVoteFrom'], |
610 | - $pages . $this->translation['msgPages']); |
|
610 | + $pages.$this->translation['msgPages']); |
|
611 | 611 | } |
612 | 612 | $output .= '<ul class="phpmyfaq_ul">'; |
613 | 613 | $counter = 0; |
@@ -654,7 +654,7 @@ discard block |
||
654 | 654 | |
655 | 655 | $lastFaqId = $row->id; |
656 | 656 | } |
657 | - $output .= '</ul><span id="totFaqRecords" style="display: none;">' . $num . '</span>'; |
|
657 | + $output .= '</ul><span id="totFaqRecords" style="display: none;">'.$num.'</span>'; |
|
658 | 658 | } else { |
659 | 659 | return false; |
660 | 660 | } |
@@ -667,21 +667,21 @@ discard block |
||
667 | 667 | $vor = $page - 1; |
668 | 668 | $next = $page + 1; |
669 | 669 | if ($vor != 0) { |
670 | - $url = $sids . '&action=search&tagging_id=' . $taggingId . '&seite=' . $vor; |
|
671 | - $oLink = new Link(Link::getSystemRelativeUri() . '?' . $url, $this->config); |
|
670 | + $url = $sids.'&action=search&tagging_id='.$taggingId.'&seite='.$vor; |
|
671 | + $oLink = new Link(Link::getSystemRelativeUri().'?'.$url, $this->config); |
|
672 | 672 | $oLink->itemTitle = 'tag'; |
673 | 673 | $oLink->text = $this->translation['msgPrevious']; |
674 | 674 | $oLink->tooltip = $this->translation['msgPrevious']; |
675 | - $output .= '[ ' . $oLink->toHtmlAnchor() . ' ]'; |
|
675 | + $output .= '[ '.$oLink->toHtmlAnchor().' ]'; |
|
676 | 676 | } |
677 | 677 | $output .= ' '; |
678 | 678 | if ($next <= $pages) { |
679 | - $url = $sids . '&action=search&tagging_id=' . $taggingId . '&seite=' . $next; |
|
680 | - $oLink = new Link(Link::getSystemRelativeUri() . '?' . $url, $this->config); |
|
679 | + $url = $sids.'&action=search&tagging_id='.$taggingId.'&seite='.$next; |
|
680 | + $oLink = new Link(Link::getSystemRelativeUri().'?'.$url, $this->config); |
|
681 | 681 | $oLink->itemTitle = 'tag'; |
682 | 682 | $oLink->text = $this->translation['msgNext']; |
683 | 683 | $oLink->tooltip = $this->translation['msgNext']; |
684 | - $output .= '[ ' . $oLink->toHtmlAnchor() . ' ]'; |
|
684 | + $output .= '[ '.$oLink->toHtmlAnchor().' ]'; |
|
685 | 685 | } |
686 | 686 | $output .= '</strong></p>'; |
687 | 687 | } |
@@ -808,7 +808,7 @@ discard block |
||
808 | 808 | Db::getTablePrefix(), |
809 | 809 | Db::getTablePrefix(), |
810 | 810 | $faqId, |
811 | - isset($faqRevisionId) ? 'AND revision_id = ' . $faqRevisionId : '', |
|
811 | + isset($faqRevisionId) ? 'AND revision_id = '.$faqRevisionId : '', |
|
812 | 812 | $faqLanguage, |
813 | 813 | ($isAdmin) ? 'AND 1=1' : $this->queryPermission($this->groupSupport) |
814 | 814 | ); |
@@ -901,7 +901,7 @@ discard block |
||
901 | 901 | 'record_title' => $row->question, |
902 | 902 | 'record_preview' => $faqHelper->renderAnswerPreview($row->answer, 25), |
903 | 903 | 'record_link' => $oLink->toString(), |
904 | - 'record_updated' => Date::createIsoDate($row->updated) . ':00', |
|
904 | + 'record_updated' => Date::createIsoDate($row->updated).':00', |
|
905 | 905 | 'visits' => (int)$visits, |
906 | 906 | 'record_created' => $row->created |
907 | 907 | ]; |
@@ -921,7 +921,7 @@ discard block |
||
921 | 921 | public function addRecord(Array $data, $newRecord = true) |
922 | 922 | { |
923 | 923 | if ($newRecord) { |
924 | - $recordId = $this->config->getDb()->nextId(Db::getTablePrefix() . 'faqdata', 'id'); |
|
924 | + $recordId = $this->config->getDb()->nextId(Db::getTablePrefix().'faqdata', 'id'); |
|
925 | 925 | } else { |
926 | 926 | $recordId = $data['id']; |
927 | 927 | } |
@@ -1464,12 +1464,12 @@ discard block |
||
1464 | 1464 | $where .= ' IN ('; |
1465 | 1465 | $separator = ''; |
1466 | 1466 | foreach ($data as $value) { |
1467 | - $where .= $separator . "'" . $this->config->getDb()->escape($value) . "'"; |
|
1467 | + $where .= $separator."'".$this->config->getDb()->escape($value)."'"; |
|
1468 | 1468 | $separator = ', '; |
1469 | 1469 | } |
1470 | 1470 | $where .= ')'; |
1471 | 1471 | } else { |
1472 | - $where .= " = '" . $this->config->getDb()->escape($data) . "'"; |
|
1472 | + $where .= " = '".$this->config->getDb()->escape($data)."'"; |
|
1473 | 1473 | } |
1474 | 1474 | if ($num > 0) { |
1475 | 1475 | $where .= ' AND '; |
@@ -1818,7 +1818,7 @@ discard block |
||
1818 | 1818 | AND |
1819 | 1819 | date_end >= '%s'", |
1820 | 1820 | Db::getTablePrefix(), |
1821 | - null == $language ? '' : "AND lang = '" . $language . "'", |
|
1821 | + null == $language ? '' : "AND lang = '".$language."'", |
|
1822 | 1822 | $now, |
1823 | 1823 | $now |
1824 | 1824 | ); |
@@ -1905,25 +1905,25 @@ discard block |
||
1905 | 1905 | fdg.group_id AS group_id, |
1906 | 1906 | fdu.user_id AS user_id |
1907 | 1907 | FROM |
1908 | - ' . Db::getTablePrefix() . 'faqvisits fv, |
|
1909 | - ' . Db::getTablePrefix() . 'faqdata fd |
|
1908 | + ' . Db::getTablePrefix().'faqvisits fv, |
|
1909 | + ' . Db::getTablePrefix().'faqdata fd |
|
1910 | 1910 | LEFT JOIN |
1911 | - ' . Db::getTablePrefix() . 'faqcategoryrelations fcr |
|
1911 | + ' . Db::getTablePrefix().'faqcategoryrelations fcr |
|
1912 | 1912 | ON |
1913 | 1913 | fd.id = fcr.record_id |
1914 | 1914 | AND |
1915 | 1915 | fd.lang = fcr.record_lang |
1916 | 1916 | LEFT JOIN |
1917 | - ' . Db::getTablePrefix() . 'faqdata_group AS fdg |
|
1917 | + ' . Db::getTablePrefix().'faqdata_group AS fdg |
|
1918 | 1918 | ON |
1919 | 1919 | fd.id = fdg.record_id |
1920 | 1920 | LEFT JOIN |
1921 | - ' . Db::getTablePrefix() . 'faqdata_user AS fdu |
|
1921 | + ' . Db::getTablePrefix().'faqdata_user AS fdu |
|
1922 | 1922 | ON |
1923 | 1923 | fd.id = fdu.record_id |
1924 | 1924 | WHERE |
1925 | - fd.date_start <= \'' . $now . '\' |
|
1926 | - AND fd.date_end >= \'' . $now . '\' |
|
1925 | + fd.date_start <= \'' . $now.'\' |
|
1926 | + AND fd.date_end >= \'' . $now.'\' |
|
1927 | 1927 | AND fd.id = fv.id |
1928 | 1928 | AND fd.lang = fv.lang |
1929 | 1929 | AND fd.active = \'yes\''; |
@@ -1931,15 +1931,15 @@ discard block |
||
1931 | 1931 | if (isset($categoryId) && is_numeric($categoryId) && ($categoryId != 0)) { |
1932 | 1932 | $query .= ' |
1933 | 1933 | AND |
1934 | - fcr.category_id = \'' . $categoryId . '\''; |
|
1934 | + fcr.category_id = \'' . $categoryId.'\''; |
|
1935 | 1935 | } |
1936 | 1936 | if (isset($language) && Language::isASupportedLanguage($language)) { |
1937 | 1937 | $query .= ' |
1938 | 1938 | AND |
1939 | - fd.lang = \'' . $language . '\''; |
|
1939 | + fd.lang = \'' . $language.'\''; |
|
1940 | 1940 | } |
1941 | 1941 | $query .= ' |
1942 | - ' . $this->queryPermission($this->groupSupport) . ' |
|
1942 | + ' . $this->queryPermission($this->groupSupport).' |
|
1943 | 1943 | |
1944 | 1944 | GROUP BY |
1945 | 1945 | fd.id,fd.lang,fcr.category_id,fv.visits,fv.last_visit,fdg.group_id,fdu.user_id |
@@ -2020,40 +2020,40 @@ discard block |
||
2020 | 2020 | (fv.vote/fv.usr) AS avg, |
2021 | 2021 | fv.usr AS user |
2022 | 2022 | FROM |
2023 | - ' . Db::getTablePrefix() . 'faqvoting fv, |
|
2024 | - ' . Db::getTablePrefix() . 'faqdata fd |
|
2023 | + ' . Db::getTablePrefix().'faqvoting fv, |
|
2024 | + ' . Db::getTablePrefix().'faqdata fd |
|
2025 | 2025 | LEFT JOIN |
2026 | - ' . Db::getTablePrefix() . 'faqcategoryrelations fcr |
|
2026 | + ' . Db::getTablePrefix().'faqcategoryrelations fcr |
|
2027 | 2027 | ON |
2028 | 2028 | fd.id = fcr.record_id |
2029 | 2029 | AND |
2030 | 2030 | fd.lang = fcr.record_lang |
2031 | 2031 | LEFT JOIN |
2032 | - ' . Db::getTablePrefix() . 'faqdata_group AS fdg |
|
2032 | + ' . Db::getTablePrefix().'faqdata_group AS fdg |
|
2033 | 2033 | ON |
2034 | 2034 | fd.id = fdg.record_id |
2035 | 2035 | LEFT JOIN |
2036 | - ' . Db::getTablePrefix() . 'faqdata_user AS fdu |
|
2036 | + ' . Db::getTablePrefix().'faqdata_user AS fdu |
|
2037 | 2037 | ON |
2038 | 2038 | fd.id = fdu.record_id |
2039 | 2039 | WHERE |
2040 | - fd.date_start <= \'' . $now . '\' |
|
2041 | - AND fd.date_end >= \'' . $now . '\' |
|
2040 | + fd.date_start <= \'' . $now.'\' |
|
2041 | + AND fd.date_end >= \'' . $now.'\' |
|
2042 | 2042 | AND fd.id = fv.artikel |
2043 | 2043 | AND fd.active = \'yes\''; |
2044 | 2044 | |
2045 | 2045 | if (isset($categoryId) && is_numeric($categoryId) && ($categoryId != 0)) { |
2046 | 2046 | $query .= ' |
2047 | 2047 | AND |
2048 | - fcr.category_id = \'' . $categoryId . '\''; |
|
2048 | + fcr.category_id = \'' . $categoryId.'\''; |
|
2049 | 2049 | } |
2050 | 2050 | if (isset($language) && Language::isASupportedLanguage($language)) { |
2051 | 2051 | $query .= ' |
2052 | 2052 | AND |
2053 | - fd.lang = \'' . $language . '\''; |
|
2053 | + fd.lang = \'' . $language.'\''; |
|
2054 | 2054 | } |
2055 | 2055 | $query .= ' |
2056 | - ' . $this->queryPermission($this->groupSupport) . ' |
|
2056 | + ' . $this->queryPermission($this->groupSupport).' |
|
2057 | 2057 | ORDER BY |
2058 | 2058 | avg DESC'; |
2059 | 2059 | |
@@ -2142,25 +2142,25 @@ discard block |
||
2142 | 2142 | fdg.group_id AS group_id, |
2143 | 2143 | fdu.user_id AS user_id |
2144 | 2144 | FROM |
2145 | - ' . Db::getTablePrefix() . 'faqvisits fv, |
|
2146 | - ' . Db::getTablePrefix() . 'faqdata fd |
|
2145 | + ' . Db::getTablePrefix().'faqvisits fv, |
|
2146 | + ' . Db::getTablePrefix().'faqdata fd |
|
2147 | 2147 | LEFT JOIN |
2148 | - ' . Db::getTablePrefix() . 'faqcategoryrelations fcr |
|
2148 | + ' . Db::getTablePrefix().'faqcategoryrelations fcr |
|
2149 | 2149 | ON |
2150 | 2150 | fd.id = fcr.record_id |
2151 | 2151 | AND |
2152 | 2152 | fd.lang = fcr.record_lang |
2153 | 2153 | LEFT JOIN |
2154 | - ' . Db::getTablePrefix() . 'faqdata_group AS fdg |
|
2154 | + ' . Db::getTablePrefix().'faqdata_group AS fdg |
|
2155 | 2155 | ON |
2156 | 2156 | fd.id = fdg.record_id |
2157 | 2157 | LEFT JOIN |
2158 | - ' . Db::getTablePrefix() . 'faqdata_user AS fdu |
|
2158 | + ' . Db::getTablePrefix().'faqdata_user AS fdu |
|
2159 | 2159 | ON |
2160 | 2160 | fd.id = fdu.record_id |
2161 | 2161 | WHERE |
2162 | - fd.date_start <= \'' . $now . '\' |
|
2163 | - AND fd.date_end >= \'' . $now . '\' |
|
2162 | + fd.date_start <= \'' . $now.'\' |
|
2163 | + AND fd.date_end >= \'' . $now.'\' |
|
2164 | 2164 | AND fd.id = fv.id |
2165 | 2165 | AND fd.lang = fv.lang |
2166 | 2166 | AND fd.active = \'yes\''; |
@@ -2168,10 +2168,10 @@ discard block |
||
2168 | 2168 | if (isset($language) && Language::isASupportedLanguage($language)) { |
2169 | 2169 | $query .= ' |
2170 | 2170 | AND |
2171 | - fd.lang = \'' . $language . '\''; |
|
2171 | + fd.lang = \'' . $language.'\''; |
|
2172 | 2172 | } |
2173 | 2173 | $query .= ' |
2174 | - ' . $this->queryPermission($this->groupSupport) . ' |
|
2174 | + ' . $this->queryPermission($this->groupSupport).' |
|
2175 | 2175 | GROUP BY |
2176 | 2176 | fd.id,fd.lang,fcr.category_id,fv.visits,fdg.group_id,fdu.user_id |
2177 | 2177 | ORDER BY |
@@ -2329,7 +2329,7 @@ discard block |
||
2329 | 2329 | VALUES |
2330 | 2330 | (%d, '%s', '%s', '%s', %d, '%s', '%s', '%s', %d)", |
2331 | 2331 | Db::getTablePrefix(), |
2332 | - $this->config->getDb()->nextId(Db::getTablePrefix() . 'faqquestions', 'id'), |
|
2332 | + $this->config->getDb()->nextId(Db::getTablePrefix().'faqquestions', 'id'), |
|
2333 | 2333 | $this->config->getLanguage()->getLanguage(), |
2334 | 2334 | $this->config->getDb()->escape($questionData['username']), |
2335 | 2335 | $this->config->getDb()->escape($questionData['email']), |
@@ -2476,7 +2476,7 @@ discard block |
||
2476 | 2476 | VALUES |
2477 | 2477 | (%d, %d, '%s', %d, %d, %d, '%s')", |
2478 | 2478 | Db::getTablePrefix(), |
2479 | - $this->config->getDb()->nextId(Db::getTablePrefix() . 'faqchanges', 'id'), |
|
2479 | + $this->config->getDb()->nextId(Db::getTablePrefix().'faqchanges', 'id'), |
|
2480 | 2480 | $id, |
2481 | 2481 | $lang, |
2482 | 2482 | $revision_id, |
@@ -2627,7 +2627,7 @@ discard block |
||
2627 | 2627 | // faqvisits data selection |
2628 | 2628 | if (!empty($faqId)) { |
2629 | 2629 | // Select ONLY the faq with the provided $faqid |
2630 | - $query .= "fd.id = '" . $faqId . "' AND "; |
|
2630 | + $query .= "fd.id = '".$faqId."' AND "; |
|
2631 | 2631 | } |
2632 | 2632 | $query .= 'fd.id = fv.id |
2633 | 2633 | AND |
@@ -2637,7 +2637,7 @@ discard block |
||
2637 | 2637 | if ($needAndOp) { |
2638 | 2638 | $query .= ' AND'; |
2639 | 2639 | } |
2640 | - $query .= ' (fcr.category_id = ' . $categoryId; |
|
2640 | + $query .= ' (fcr.category_id = '.$categoryId; |
|
2641 | 2641 | if ($bDownwards) { |
2642 | 2642 | $query .= $this->getCatidWhereSequence($categoryId, 'OR'); |
2643 | 2643 | } |
@@ -2648,14 +2648,14 @@ discard block |
||
2648 | 2648 | if ($needAndOp) { |
2649 | 2649 | $query .= ' AND'; |
2650 | 2650 | } |
2651 | - $query .= " fd.updated LIKE '" . $date . "'"; |
|
2651 | + $query .= " fd.updated LIKE '".$date."'"; |
|
2652 | 2652 | $needAndOp = true; |
2653 | 2653 | } |
2654 | 2654 | if ((!empty($lang)) && Utils::isLanguage($lang)) { |
2655 | 2655 | if ($needAndOp) { |
2656 | 2656 | $query .= ' AND'; |
2657 | 2657 | } |
2658 | - $query .= " fd.lang = '" . $lang . "'"; |
|
2658 | + $query .= " fd.lang = '".$lang."'"; |
|
2659 | 2659 | $needAndOp = true; |
2660 | 2660 | } |
2661 | 2661 | switch ($queryType) { |
@@ -2663,7 +2663,7 @@ discard block |
||
2663 | 2663 | if ($needAndOp) { |
2664 | 2664 | $query .= ' AND'; |
2665 | 2665 | } |
2666 | - $query .= " fd.active = '" . FAQ_SQL_ACTIVE_NO . "'"; |
|
2666 | + $query .= " fd.active = '".FAQ_SQL_ACTIVE_NO."'"; |
|
2667 | 2667 | break; |
2668 | 2668 | case FAQ_QUERY_TYPE_EXPORT_PDF: |
2669 | 2669 | case FAQ_QUERY_TYPE_EXPORT_XHTML: |
@@ -2671,13 +2671,13 @@ discard block |
||
2671 | 2671 | if ($needAndOp) { |
2672 | 2672 | $query .= ' AND'; |
2673 | 2673 | } |
2674 | - $query .= " fd.active = '" . FAQ_SQL_ACTIVE_YES . "'"; |
|
2674 | + $query .= " fd.active = '".FAQ_SQL_ACTIVE_YES."'"; |
|
2675 | 2675 | break; |
2676 | 2676 | default: |
2677 | 2677 | if ($needAndOp) { |
2678 | 2678 | $query .= ' AND'; |
2679 | 2679 | } |
2680 | - $query .= " fd.active = '" . FAQ_SQL_ACTIVE_YES . "'"; |
|
2680 | + $query .= " fd.active = '".FAQ_SQL_ACTIVE_YES."'"; |
|
2681 | 2681 | break; |
2682 | 2682 | } |
2683 | 2683 | // Sort criteria |
@@ -2719,7 +2719,7 @@ discard block |
||
2719 | 2719 | $aChildren = array_values($oCat->getChildren($nCatid)); |
2720 | 2720 | |
2721 | 2721 | foreach ($aChildren as $catid) { |
2722 | - $sqlWhereFilter .= ' ' . $logicOp . ' fcr.category_id = ' . $catid; |
|
2722 | + $sqlWhereFilter .= ' '.$logicOp.' fcr.category_id = '.$catid; |
|
2723 | 2723 | $sqlWhereFilter .= $this->getCatidWhereSequence($catid, 'OR', $oCat); |
2724 | 2724 | } |
2725 | 2725 | |
@@ -2922,7 +2922,7 @@ discard block |
||
2922 | 2922 | $oLink->itemTitle = $row->thema; |
2923 | 2923 | $oLink->text = $title; |
2924 | 2924 | $oLink->tooltip = $title; |
2925 | - $listItem = '<li>' . $oLink->toHtmlAnchor() . '</li>'; |
|
2925 | + $listItem = '<li>'.$oLink->toHtmlAnchor().'</li>'; |
|
2926 | 2926 | |
2927 | 2927 | $output .= $listItem; |
2928 | 2928 | } |
@@ -3029,7 +3029,7 @@ discard block |
||
3029 | 3029 | ); |
3030 | 3030 | } |
3031 | 3031 | |
3032 | - return $output . $extraout; |
|
3032 | + return $output.$extraout; |
|
3033 | 3033 | } |
3034 | 3034 | |
3035 | 3035 | /** |