@@ -210,8 +210,8 @@ discard block |
||
210 | 210 | $confPerPage = $this->_config->get('records.numberOfRecordsPerPage'); |
211 | 211 | $numOfResults = $resultSet->getNumberOfResults(); |
212 | 212 | |
213 | - $totalPages = ceil($numOfResults / $confPerPage); |
|
214 | - $lastPage = $currentPage * $confPerPage; |
|
213 | + $totalPages = ceil($numOfResults/$confPerPage); |
|
214 | + $lastPage = $currentPage*$confPerPage; |
|
215 | 215 | $firstPage = $lastPage - $confPerPage; |
216 | 216 | |
217 | 217 | if (0 < $numOfResults) { |
@@ -285,7 +285,7 @@ discard block |
||
285 | 285 | $oLink->itemTitle = $oLink->tooltip = $result->question; |
286 | 286 | |
287 | 287 | $html .= '<li>'; |
288 | - $html .= $this->renderScore($result->score * 33); |
|
288 | + $html .= $this->renderScore($result->score*33); |
|
289 | 289 | $html .= sprintf('<strong>%s</strong>: %s<br />', |
290 | 290 | $categoryInfo[0]['name'], |
291 | 291 | $oLink->toHtmlAnchor() |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | $numFaqs = $this->Category->getNumberOfRecordsOfCategory(); |
54 | 54 | |
55 | 55 | if ($numCategories > 0) { |
56 | - for ($y = 0;$y < $numCategories; $y = $this->Category->getNextLineTree($y)) { |
|
56 | + for ($y = 0; $y < $numCategories; $y = $this->Category->getNextLineTree($y)) { |
|
57 | 57 | list($hasChild, $name, $categoryId, $description, $active) = $this->Category->getLineDisplay($y); |
58 | 58 | |
59 | 59 | if (!$active) { |
@@ -158,7 +158,7 @@ discard block |
||
158 | 158 | $this->Category->expandAll(); |
159 | 159 | |
160 | 160 | if ($numCategories > 0) { |
161 | - for ($y = 0;$y < $this->Category->height(); $y = $this->Category->getNextLineTree($y)) { |
|
161 | + for ($y = 0; $y < $this->Category->height(); $y = $this->Category->getNextLineTree($y)) { |
|
162 | 162 | list($hasChild, $categoryName, $parent, $description, $active) = $this->Category->getLineDisplay($y); |
163 | 163 | |
164 | 164 | if (!$active) { |
@@ -253,7 +253,7 @@ discard block |
||
253 | 253 | { |
254 | 254 | $categories = ''; |
255 | 255 | foreach ($this->Category->categories as $cat) { |
256 | - if (0 === (int) $cat['parent_id']) { |
|
256 | + if (0 === (int)$cat['parent_id']) { |
|
257 | 257 | $categories .= sprintf( |
258 | 258 | '<li><a href="?action=show&cat=%d">%s</a></li>', |
259 | 259 | $cat['id'], |
@@ -65,12 +65,12 @@ discard block |
||
65 | 65 | public function addHeader() |
66 | 66 | { |
67 | 67 | header('Expires: Thu, 07 Apr 1977 14:47:00 GMT'); |
68 | - header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); |
|
68 | + header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); |
|
69 | 69 | header('Cache-Control: no-store, no-cache, must-revalidate'); |
70 | 70 | header('Cache-Control: post-check=0, pre-check=0', false); |
71 | 71 | header('Pragma: no-cache'); |
72 | 72 | header('Vary: Negotiate,Accept'); |
73 | - header('Content-type: ' . $this->contentType); |
|
73 | + header('Content-type: '.$this->contentType); |
|
74 | 74 | } |
75 | 75 | |
76 | 76 | /** |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | * Sends the CORS header. |
119 | 119 | */ |
120 | 120 | public function sendCorsHeader() { |
121 | - header('Access-Control-Allow-Origin: ' . $_SERVER['HTTP_ORIGIN']); |
|
121 | + header('Access-Control-Allow-Origin: '.$_SERVER['HTTP_ORIGIN']); |
|
122 | 122 | } |
123 | 123 | |
124 | 124 | /** |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | // for preventing data loss |
141 | 141 | session_write_close(); |
142 | 142 | $this->sendStatus(301); |
143 | - header('Location: ' . $url); |
|
143 | + header('Location: '.$url); |
|
144 | 144 | } |
145 | 145 | |
146 | 146 | /** |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | |
87 | 87 | foreach ($myTemplate as $templateName => $filename) { |
88 | 88 | $this->templates[$templateName] = $this->readTemplateFile( |
89 | - 'assets/themes/' . $tplSetName . '/templates/' . $filename, |
|
89 | + 'assets/themes/'.$tplSetName.'/templates/'.$filename, |
|
90 | 90 | $templateName |
91 | 91 | ); |
92 | 92 | } |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | */ |
101 | 101 | public function merge($from, $into) |
102 | 102 | { |
103 | - $this->outputs[$into] = str_replace('{{ ' . $from . ' }}', $this->outputs[$from], $this->outputs[$into]); |
|
103 | + $this->outputs[$into] = str_replace('{{ '.$from.' }}', $this->outputs[$from], $this->outputs[$into]); |
|
104 | 104 | $this->outputs[$from] = null; |
105 | 105 | } |
106 | 106 | |
@@ -121,12 +121,12 @@ discard block |
||
121 | 121 | foreach ($rawBlocks as $key => $rawBlock) { |
122 | 122 | if (in_array($key, $this->blocksTouched) && $key !== 'unblocked') { |
123 | 123 | $tmp = str_replace($rawBlock, $this->blocks[$templateName][$key], $tmp); |
124 | - $tmp = str_replace('[' . $key . ']', '', $tmp); |
|
125 | - $tmp = str_replace('[/' . $key . ']', '', $tmp); |
|
124 | + $tmp = str_replace('['.$key.']', '', $tmp); |
|
125 | + $tmp = str_replace('[/'.$key.']', '', $tmp); |
|
126 | 126 | } elseif ($key !== 'unblocked') { |
127 | 127 | $tmp = str_replace($rawBlock, '', $tmp); |
128 | - $tmp = str_replace('[' . $key . ']', '', $tmp); |
|
129 | - $tmp = str_replace('[/' . $key . ']', '', $tmp); |
|
128 | + $tmp = str_replace('['.$key.']', '', $tmp); |
|
129 | + $tmp = str_replace('[/'.$key.']', '', $tmp); |
|
130 | 130 | } |
131 | 131 | } |
132 | 132 | } |
@@ -146,9 +146,9 @@ discard block |
||
146 | 146 | if (isset($filters[$templateName])) { |
147 | 147 | if (count($filters[$templateName])) { |
148 | 148 | foreach ($filters[$templateName] as $filter) { |
149 | - $filterMethod = 'render' . ucfirst(key($filter)) . 'Filter'; |
|
149 | + $filterMethod = 'render'.ucfirst(key($filter)).'Filter'; |
|
150 | 150 | $filteredVar = $this->tplHelper->$filterMethod(current($filter)); |
151 | - $tmp = str_replace('{{ ' . current($filter) . ' | ' . key($filter) . ' }}', $filteredVar, $tmp); |
|
151 | + $tmp = str_replace('{{ '.current($filter).' | '.key($filter).' }}', $filteredVar, $tmp); |
|
152 | 152 | } |
153 | 153 | } |
154 | 154 | } |
@@ -210,7 +210,7 @@ discard block |
||
210 | 210 | $block = $this->multiplyBlock($this->blocks[$templateName][$blockName], $blockContent); |
211 | 211 | break; |
212 | 212 | } else { |
213 | - $block = str_replace('{{ ' . $var . ' }}', $val, $block); |
|
213 | + $block = str_replace('{{ '.$var.' }}', $val, $block); |
|
214 | 214 | } |
215 | 215 | } |
216 | 216 | |
@@ -256,7 +256,7 @@ discard block |
||
256 | 256 | |
257 | 257 | return $tplContent; |
258 | 258 | } else { |
259 | - return '<p><span style="color: red;">Error:</span> Cannot open the file ' . $filename . '.</p>'; |
|
259 | + return '<p><span style="color: red;">Error:</span> Cannot open the file '.$filename.'.</p>'; |
|
260 | 260 | } |
261 | 261 | } |
262 | 262 | |
@@ -299,7 +299,7 @@ discard block |
||
299 | 299 | for ($i = 0; $i < $multiplyTimes; ++$i) { |
300 | 300 | $tmpBlock[$i] = $block; |
301 | 301 | foreach ($replace as $var => $val) { |
302 | - $tmpBlock[$i] = str_replace('{{ ' . $var . ' }}', $val[$i], $tmpBlock[$i]); |
|
302 | + $tmpBlock[$i] = str_replace('{{ '.$var.' }}', $val[$i], $tmpBlock[$i]); |
|
303 | 303 | } |
304 | 304 | } |
305 | 305 | |
@@ -329,14 +329,14 @@ discard block |
||
329 | 329 | Strings::preg_match('/\[.+\]/', $tmpBlocks[0][$i], $name); |
330 | 330 | $name = Strings::preg_replace('/[\[\[\/\]]/', '', $name); |
331 | 331 | // remove block tags from block |
332 | - $res = str_replace('[' . $name[0] . ']', '', $tmpBlocks[0][$i]); |
|
333 | - $res = str_replace('[/' . $name[0] . ']', '', $res); |
|
332 | + $res = str_replace('['.$name[0].']', '', $tmpBlocks[0][$i]); |
|
333 | + $res = str_replace('[/'.$name[0].']', '', $res); |
|
334 | 334 | $tplBlocks[$name[0]] = $res; |
335 | 335 | |
336 | 336 | // unblocked content |
337 | 337 | $unblocked = str_replace($tplBlocks[$name[0]], '', $unblocked); |
338 | - $unblocked = str_replace('[' . $name[0] . ']', '', $unblocked); |
|
339 | - $unblocked = str_replace('[/' . $name[0] . ']', '', $unblocked); |
|
338 | + $unblocked = str_replace('['.$name[0].']', '', $unblocked); |
|
339 | + $unblocked = str_replace('[/'.$name[0].']', '', $unblocked); |
|
340 | 340 | } |
341 | 341 | |
342 | 342 | $hits = []; |
@@ -216,6 +216,6 @@ |
||
216 | 216 | $score += $object->relevance_keywords; |
217 | 217 | } |
218 | 218 | |
219 | - return round($score / 3 * 100); |
|
219 | + return round($score/3*100); |
|
220 | 220 | } |
221 | 221 | } |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | */ |
58 | 58 | public function add(MetaEntity $data) |
59 | 59 | { |
60 | - $id = $this->config->getDb()->nextId(Db::getTablePrefix() . 'faqmeta', 'id'); |
|
60 | + $id = $this->config->getDb()->nextId(Db::getTablePrefix().'faqmeta', 'id'); |
|
61 | 61 | |
62 | 62 | $query = sprintf(" |
63 | 63 | INSERT INTO |
@@ -183,7 +183,7 @@ discard block |
||
183 | 183 | $this->config->getLanguage()->getLanguage() |
184 | 184 | ); |
185 | 185 | |
186 | - return (boolean) $this->config->getDb()->query($query); |
|
186 | + return (boolean)$this->config->getDb()->query($query); |
|
187 | 187 | } |
188 | 188 | |
189 | 189 | /** |
@@ -199,7 +199,7 @@ discard block |
||
199 | 199 | $id |
200 | 200 | ); |
201 | 201 | |
202 | - return (boolean) $this->config->getDb()->query($query); |
|
202 | + return (boolean)$this->config->getDb()->query($query); |
|
203 | 203 | |
204 | 204 | } |
205 | 205 | } |
@@ -84,7 +84,7 @@ |
||
84 | 84 | } |
85 | 85 | |
86 | 86 | foreach ($botBlacklist as $bot) { |
87 | - if ((bool) Strings::strstr($agent, $bot)) { |
|
87 | + if ((bool)Strings::strstr($agent, $bot)) { |
|
88 | 88 | ++$bots; |
89 | 89 | } |
90 | 90 | } |
@@ -476,8 +476,8 @@ |
||
476 | 476 | %sfaqcaptcha |
477 | 477 | WHERE |
478 | 478 | id = '%s'", |
479 | - Db::getTablePrefix(), |
|
480 | - $this->code |
|
479 | + Db::getTablePrefix(), |
|
480 | + $this->code |
|
481 | 481 | ); |
482 | 482 | |
483 | 483 | $result = $this->_config->getDb()->query($select); |
@@ -206,7 +206,7 @@ discard block |
||
206 | 206 | $this->drawText(); |
207 | 207 | if (function_exists('imagejpeg')) { |
208 | 208 | header('Content-Type: image/jpeg'); |
209 | - imagejpeg($this->img, null, (int) $this->quality); |
|
209 | + imagejpeg($this->img, null, (int)$this->quality); |
|
210 | 210 | } elseif (function_exists('imagegif')) { |
211 | 211 | header('Content-Type: image/gif'); |
212 | 212 | imagegif($this->img); |
@@ -314,7 +314,7 @@ discard block |
||
314 | 314 | $w1 = 0; |
315 | 315 | $w2 = 0; |
316 | 316 | |
317 | - for ($x = 0; $x < $this->width; $x += (int) $nextline) { |
|
317 | + for ($x = 0; $x < $this->width; $x += (int)$nextline) { |
|
318 | 318 | if ($x < $this->width) { |
319 | 319 | imageline($this->img, $x + $w1, 0, $x + $w2, $this->height - 1, rand($color1, $color2)); |
320 | 320 | } |
@@ -345,18 +345,18 @@ discard block |
||
345 | 345 | { |
346 | 346 | $len = Strings::strlen($this->code); |
347 | 347 | $w1 = 15; |
348 | - $w2 = $this->width / ($len + 1); |
|
348 | + $w2 = $this->width/($len + 1); |
|
349 | 349 | |
350 | 350 | for ($p = 0; $p < $len; ++$p) { |
351 | 351 | $letter = $this->code[$p]; |
352 | 352 | if (count($this->fonts) > 0) { |
353 | 353 | $font = $this->fonts[rand(0, count($this->fonts) - 1)]; |
354 | 354 | } |
355 | - $size = rand(20, $this->height / 2.2); |
|
355 | + $size = rand(20, $this->height/2.2); |
|
356 | 356 | $rotation = rand(-23, 23); |
357 | 357 | $y = rand($size + 3, $this->height - 5); |
358 | 358 | // $w1 += rand(- $this->width / 90, $this->width / 40 ); |
359 | - $x = $w1 + $w2 * $p; |
|
359 | + $x = $w1 + $w2*$p; |
|
360 | 360 | $c1 = []; // fore char color |
361 | 361 | $c2 = []; // back char color |
362 | 362 | do { |
@@ -370,28 +370,28 @@ discard block |
||
370 | 370 | } while ($c1['b'] == $this->_backgroundColor['b']); |
371 | 371 | $c1 = imagecolorallocate($this->img, $c1['r'], $c1['g'], $c1['b']); |
372 | 372 | do { |
373 | - $c2['r'] = ($c1['r'] < 100 ? $c1['r'] * 2 : mt_rand(30, 199)); |
|
373 | + $c2['r'] = ($c1['r'] < 100 ? $c1['r']*2 : mt_rand(30, 199)); |
|
374 | 374 | } while (($c2['r'] == $this->_backgroundColor['r']) && ($c2['r'] == $c1['r'])); |
375 | 375 | do { |
376 | - $c2['g'] = ($c1['g'] < 100 ? $c1['g'] * 2 : mt_rand(30, 199)); |
|
376 | + $c2['g'] = ($c1['g'] < 100 ? $c1['g']*2 : mt_rand(30, 199)); |
|
377 | 377 | } while (($c2['g'] == $this->_backgroundColor['g']) && ($c2['g'] == $c1['g'])); |
378 | 378 | do { |
379 | - $c2['b'] = ($c1['b'] < 100 ? $c1['b'] * 2 : mt_rand(30, 199)); |
|
379 | + $c2['b'] = ($c1['b'] < 100 ? $c1['b']*2 : mt_rand(30, 199)); |
|
380 | 380 | } while (($c2['b'] == $this->_backgroundColor['b']) && ($c2['b'] == $c1['b'])); |
381 | 381 | $c2 = imagecolorallocate($this->img, $c2['r'], $c2['g'], $c2['b']); |
382 | 382 | // Add the letter |
383 | 383 | if (function_exists('imagettftext') && (count($this->fonts) > 0)) { |
384 | - imagettftext($this->img, $size, $rotation, $x + 2, $y, $c2, $font, $letter); |
|
384 | + imagettftext($this->img, $size, $rotation, $x + 2, $y, $c2, $font, $letter); |
|
385 | 385 | imagettftext($this->img, $size, $rotation, $x + 1, $y + 1, $c2, $font, $letter); |
386 | - imagettftext($this->img, $size, $rotation, $x, $y - 2, $c1, $font, $letter); |
|
386 | + imagettftext($this->img, $size, $rotation, $x, $y - 2, $c1, $font, $letter); |
|
387 | 387 | } else { |
388 | 388 | $size = 5; |
389 | 389 | $c3 = imagecolorallocate($this->img, 0, 0, 255); |
390 | 390 | $x = 20; |
391 | 391 | $y = 12; |
392 | 392 | $s = 30; |
393 | - imagestring($this->img, $size, $x + 1 + ($s * $p), $y + 1, $letter, $c3); |
|
394 | - imagestring($this->img, $size, $x + ($s * $p), $y, $letter, $c1); |
|
393 | + imagestring($this->img, $size, $x + 1 + ($s*$p), $y + 1, $letter, $c3); |
|
394 | + imagestring($this->img, $size, $x + ($s*$p), $y, $letter, $c1); |
|
395 | 395 | } |
396 | 396 | } |
397 | 397 |
@@ -214,7 +214,7 @@ discard block |
||
214 | 214 | WHERE' : ' |
215 | 215 | AND'; |
216 | 216 | $where .= " |
217 | - fc.lang = '" . $this->language . "'"; |
|
217 | + fc.lang = '" . $this->language."'"; |
|
218 | 218 | } |
219 | 219 | |
220 | 220 | $query = sprintf(' |
@@ -255,10 +255,10 @@ discard block |
||
255 | 255 | if ($result) { |
256 | 256 | while ($row = $this->config->getDb()->fetchArray($result)) { |
257 | 257 | $this->categoryName[$row['id']] = $row; |
258 | - $this->categories[] =& $this->categoryName[$row['id']]; |
|
259 | - $this->children[$row['parent_id']][$row['id']] =& $this->categoryName[$row['id']]; |
|
260 | - $this->owner[$row['id']] =& $row['user_id']; |
|
261 | - $this->moderators[$row['id']] =& $row['group_id']; |
|
258 | + $this->categories[] = & $this->categoryName[$row['id']]; |
|
259 | + $this->children[$row['parent_id']][$row['id']] = & $this->categoryName[$row['id']]; |
|
260 | + $this->owner[$row['id']] = & $row['user_id']; |
|
261 | + $this->moderators[$row['id']] = & $row['group_id']; |
|
262 | 262 | } |
263 | 263 | } |
264 | 264 | |
@@ -321,13 +321,13 @@ discard block |
||
321 | 321 | $query .= 'parent_id = 0'; |
322 | 322 | } |
323 | 323 | foreach (explode(',', $categories) as $cats) { |
324 | - $_query .= ' OR parent_id = ' . $cats; |
|
324 | + $_query .= ' OR parent_id = '.$cats; |
|
325 | 325 | } |
326 | 326 | if (false === $parentId && 0 < Strings::strlen($_query)) { |
327 | 327 | $query .= Strings::substr($_query, 4); |
328 | 328 | } |
329 | 329 | if (isset($this->language) && preg_match("/^[a-z\-]{2,}$/", $this->language)) { |
330 | - $query .= " AND lang = '" . $this->language . "'"; |
|
330 | + $query .= " AND lang = '".$this->language."'"; |
|
331 | 331 | } |
332 | 332 | $query .= ' ORDER BY id'; |
333 | 333 | $result = $this->config->getDb()->query($query); |
@@ -354,7 +354,7 @@ discard block |
||
354 | 354 | Db::getTablePrefix() |
355 | 355 | ); |
356 | 356 | if (isset($this->language) && preg_match("/^[a-z\-]{2,}$/", $this->language)) { |
357 | - $query .= " WHERE lang = '" . $this->language . "'"; |
|
357 | + $query .= " WHERE lang = '".$this->language."'"; |
|
358 | 358 | } |
359 | 359 | $result = $this->config->getDb()->query($query); |
360 | 360 | while ($row = $this->config->getDb()->fetchArray($result)) { |
@@ -394,7 +394,7 @@ discard block |
||
394 | 394 | Db::getTablePrefix() |
395 | 395 | ); |
396 | 396 | if (isset($this->language) && preg_match("/^[a-z\-]{2,}$/", $this->language)) { |
397 | - $query .= " AND lang = '" . $this->language . "'"; |
|
397 | + $query .= " AND lang = '".$this->language."'"; |
|
398 | 398 | } |
399 | 399 | $result = $this->config->getDb()->query($query); |
400 | 400 | |
@@ -435,7 +435,7 @@ discard block |
||
435 | 435 | Db::getTablePrefix() |
436 | 436 | ); |
437 | 437 | if (isset($this->language) && preg_match("/^[a-z\-]{2,}$/", $this->language)) { |
438 | - $query .= " AND lang = '" . $this->language . "'"; |
|
438 | + $query .= " AND lang = '".$this->language."'"; |
|
439 | 439 | } |
440 | 440 | $result = $this->config->getDb()->query($query); |
441 | 441 | while ($row = $this->config->getDb()->fetchArray($result)) { |
@@ -805,7 +805,7 @@ discard block |
||
805 | 805 | if (0 === $number[$parent] && 0 === $level) { |
806 | 806 | $numFaqs = ''; |
807 | 807 | } else { |
808 | - $numFaqs = '<span class="rssCategoryLink"> (' . $plr->GetMsg('plmsgEntries', $number[$parent]); |
|
808 | + $numFaqs = '<span class="rssCategoryLink"> ('.$plr->GetMsg('plmsgEntries', $number[$parent]); |
|
809 | 809 | if ($this->config->get('main.enableRssFeeds')) { |
810 | 810 | $numFaqs .= sprintf( |
811 | 811 | ' <a href="feed/category/rss.php?category_id=%d&category_lang=%s" target="_blank"><i aria-hidden="true" class="fas fa-rss"></i></a>', |
@@ -828,7 +828,7 @@ discard block |
||
828 | 828 | $oLink->text = $categoryName; |
829 | 829 | $oLink->tooltip = $description; |
830 | 830 | |
831 | - $output .= $oLink->toHtmlAnchor() . $numFaqs; |
|
831 | + $output .= $oLink->toHtmlAnchor().$numFaqs; |
|
832 | 832 | $open = $level; |
833 | 833 | } |
834 | 834 | |
@@ -937,7 +937,7 @@ discard block |
||
937 | 937 | ); |
938 | 938 | |
939 | 939 | $oLink = new Link($url, $this->config); |
940 | - $oLink->id = 'category_' . $categoryId; |
|
940 | + $oLink->id = 'category_'.$categoryId; |
|
941 | 941 | $oLink->itemTitle = $categoryName; |
942 | 942 | $oLink->text = $categoryName; |
943 | 943 | |
@@ -1024,15 +1024,15 @@ discard block |
||
1024 | 1024 | |
1025 | 1025 | public function generateCategoriesList(array $categories, $level) |
1026 | 1026 | { |
1027 | - $output = '<div class="pmf-categories pmf-slider-categories-' . $level . '" ><ul id="categories_' . $level . '">'; |
|
1027 | + $output = '<div class="pmf-categories pmf-slider-categories-'.$level.'" ><ul id="categories_'.$level.'">'; |
|
1028 | 1028 | if (count($categories) > 0) { |
1029 | 1029 | foreach ($categories as $category) { |
1030 | - $output .= '<li class="slide_category_2" id="' . $category->getId() . '" >'; |
|
1031 | - $output .= '<span class="info">' . $category->getName() . '</span>'; |
|
1030 | + $output .= '<li class="slide_category_2" id="'.$category->getId().'" >'; |
|
1031 | + $output .= '<span class="info">'.$category->getName().'</span>'; |
|
1032 | 1032 | if ('' != $category->getImage()) { |
1033 | - $output .= '<img src="' . '/images/' . $category->getImage() . '" alt="' . $category->getName() . '">'; |
|
1033 | + $output .= '<img src="'.'/images/'.$category->getImage().'" alt="'.$category->getName().'">'; |
|
1034 | 1034 | } else { |
1035 | - $output .= '<img src="/images/no_picture.png" alt="' . $category->getName() . '">'; |
|
1035 | + $output .= '<img src="/images/no_picture.png" alt="'.$category->getName().'">'; |
|
1036 | 1036 | } |
1037 | 1037 | $output .= '</li>'; |
1038 | 1038 | } |
@@ -1299,7 +1299,7 @@ discard block |
||
1299 | 1299 | { |
1300 | 1300 | // If we only need a new language, we don't need a new category id |
1301 | 1301 | if (is_null($id)) { |
1302 | - $id = $this->config->getDb()->nextId(Db::getTablePrefix() . 'faqcategories', 'id'); |
|
1302 | + $id = $this->config->getDb()->nextId(Db::getTablePrefix().'faqcategories', 'id'); |
|
1303 | 1303 | } |
1304 | 1304 | |
1305 | 1305 | $query = sprintf(" |
@@ -1446,19 +1446,19 @@ discard block |
||
1446 | 1446 | foreach ($tables as $pair) { |
1447 | 1447 | foreach ($pair as $_table => $_field) { |
1448 | 1448 | $result = $result && $this->config->getDb()->query(sprintf('UPDATE %s SET %s = %d WHERE %s = %d', |
1449 | - Db::getTablePrefix() . $_table, |
|
1449 | + Db::getTablePrefix().$_table, |
|
1450 | 1450 | $_field, |
1451 | 1451 | $temp_cat, |
1452 | 1452 | $_field, |
1453 | 1453 | $category_id_2)); |
1454 | 1454 | $result = $result && $this->config->getDb()->query(sprintf('UPDATE %s SET %s = %d WHERE %s = %d', |
1455 | - Db::getTablePrefix() . $_table, |
|
1455 | + Db::getTablePrefix().$_table, |
|
1456 | 1456 | $_field, |
1457 | 1457 | $category_id_2, |
1458 | 1458 | $_field, |
1459 | 1459 | $category_id_1)); |
1460 | 1460 | $result = $result && $this->config->getDb()->query(sprintf('UPDATE %s SET %s = %d WHERE %s = %d', |
1461 | - Db::getTablePrefix() . $_table, |
|
1461 | + Db::getTablePrefix().$_table, |
|
1462 | 1462 | $_field, |
1463 | 1463 | $category_id_1, |
1464 | 1464 | $_field, |
@@ -1471,19 +1471,19 @@ discard block |
||
1471 | 1471 | foreach ($tables2 as $pair) { |
1472 | 1472 | foreach ($pair as $_table => $_field) { |
1473 | 1473 | $result = $result && $this->config->getDb()->query(sprintf("UPDATE %s SET %s = '%d' WHERE %s = '%d'", |
1474 | - Db::getTablePrefix() . $_table, |
|
1474 | + Db::getTablePrefix().$_table, |
|
1475 | 1475 | $_field, |
1476 | 1476 | $temp_cat, |
1477 | 1477 | $_field, |
1478 | 1478 | $category_id_2)); |
1479 | 1479 | $result = $result && $this->config->getDb()->query(sprintf("UPDATE %s SET %s = '%d' WHERE %s = '%d'", |
1480 | - Db::getTablePrefix() . $_table, |
|
1480 | + Db::getTablePrefix().$_table, |
|
1481 | 1481 | $_field, |
1482 | 1482 | $category_id_2, |
1483 | 1483 | $_field, |
1484 | 1484 | $category_id_1)); |
1485 | 1485 | $result = $result && $this->config->getDb()->query(sprintf("UPDATE %s SET %s = '%d' WHERE %s = '%d'", |
1486 | - Db::getTablePrefix() . $_table, |
|
1486 | + Db::getTablePrefix().$_table, |
|
1487 | 1487 | $_field, |
1488 | 1488 | $category_id_1, |
1489 | 1489 | $_field, |
@@ -1542,7 +1542,7 @@ discard block |
||
1542 | 1542 | Db::getTablePrefix(), |
1543 | 1543 | $category_id); |
1544 | 1544 | if (!$delete_all) { |
1545 | - $query .= " AND lang = '" . $category_lang . "'"; |
|
1545 | + $query .= " AND lang = '".$category_lang."'"; |
|
1546 | 1546 | } |
1547 | 1547 | $this->config->getDb()->query($query); |
1548 | 1548 | |
@@ -1568,7 +1568,7 @@ discard block |
||
1568 | 1568 | Db::getTablePrefix(), |
1569 | 1569 | $category_id); |
1570 | 1570 | if (!$delete_all) { |
1571 | - $query .= " AND category_lang = '" . $category_lang . "'"; |
|
1571 | + $query .= " AND category_lang = '".$category_lang."'"; |
|
1572 | 1572 | } |
1573 | 1573 | $this->config->getDb()->query($query); |
1574 | 1574 | |
@@ -1604,7 +1604,7 @@ discard block |
||
1604 | 1604 | $language); |
1605 | 1605 | $result = $this->config->getDb()->query($query); |
1606 | 1606 | if ($row = $this->config->getDb()->fetchArray($result)) { |
1607 | - $translated[$languageCodes[strtoupper($language)]] = $row['name'] . ('' == $row['description'] ? '' : ' (' . $row['description'] . ')'); |
|
1607 | + $translated[$languageCodes[strtoupper($language)]] = $row['name'].('' == $row['description'] ? '' : ' ('.$row['description'].')'); |
|
1608 | 1608 | } |
1609 | 1609 | } |
1610 | 1610 | ksort($translated); |
@@ -1627,11 +1627,11 @@ discard block |
||
1627 | 1627 | |
1628 | 1628 | foreach (Language::getAvailableLanguages() as $lang => $langname) { |
1629 | 1629 | if (!in_array(strtolower($lang), $existcatlang)) { |
1630 | - $output .= "\t<option value=\"" . strtolower($lang) . '"'; |
|
1630 | + $output .= "\t<option value=\"".strtolower($lang).'"'; |
|
1631 | 1631 | if ($lang == $selected_lang) { |
1632 | 1632 | $output .= ' selected="selected"'; |
1633 | 1633 | } |
1634 | - $output .= '>' . $langname . "</option>\n"; |
|
1634 | + $output .= '>'.$langname."</option>\n"; |
|
1635 | 1635 | } |
1636 | 1636 | } |
1637 | 1637 | |
@@ -1651,7 +1651,7 @@ discard block |
||
1651 | 1651 | %sfaqcategories', |
1652 | 1652 | Db::getTablePrefix()); |
1653 | 1653 | if (isset($this->language) && preg_match("/^[a-z\-]{2,}$/", $this->language)) { |
1654 | - $query .= " WHERE lang != '" . $this->language . "'"; |
|
1654 | + $query .= " WHERE lang != '".$this->language."'"; |
|
1655 | 1655 | } |
1656 | 1656 | $query .= ' ORDER BY id'; |
1657 | 1657 | $result = $this->config->getDb()->query($query); |