@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | if (empty($this->joinedTable)) { |
163 | 163 | return ''; |
164 | 164 | } else { |
165 | - return ' LEFT JOIN ' . $this->joinedTable . ' ON '; |
|
165 | + return ' LEFT JOIN '.$this->joinedTable.' ON '; |
|
166 | 166 | } |
167 | 167 | } |
168 | 168 | |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | if (empty($resultColumns)) { |
194 | 194 | $resultColumns = $column; |
195 | 195 | } else { |
196 | - $resultColumns .= ', ' . $column; |
|
196 | + $resultColumns .= ', '.$column; |
|
197 | 197 | } |
198 | 198 | } |
199 | 199 | |
@@ -224,7 +224,7 @@ discard block |
||
224 | 224 | $joinedColumns = ''; |
225 | 225 | |
226 | 226 | foreach ($this->joinedColumns as $column) { |
227 | - $joinedColumns .= $column . ' AND '; |
|
227 | + $joinedColumns .= $column.' AND '; |
|
228 | 228 | } |
229 | 229 | |
230 | 230 | return PMF_String::substr($joinedColumns, 0, -4); |
@@ -280,9 +280,9 @@ discard block |
||
280 | 280 | if (count($this->conditions)) { |
281 | 281 | foreach ($this->conditions as $column => $value) { |
282 | 282 | if (is_array($value)) { |
283 | - $conditions .= ' AND ' . $column . ' IN (' . implode(', ', $value) . ')'; |
|
283 | + $conditions .= ' AND '.$column.' IN ('.implode(', ', $value).')'; |
|
284 | 284 | } else { |
285 | - $conditions .= ' AND ' . $column . ' = ' . $value; |
|
285 | + $conditions .= ' AND '.$column.' = '.$value; |
|
286 | 286 | } |
287 | 287 | } |
288 | 288 | } |
@@ -305,10 +305,10 @@ discard block |
||
305 | 305 | $where = ''; |
306 | 306 | |
307 | 307 | for ($i = 0; $i < $numKeys; $i++) { |
308 | - if (strlen($where) != 0 ) { |
|
309 | - $where = $where . " OR"; |
|
308 | + if (strlen($where) != 0) { |
|
309 | + $where = $where." OR"; |
|
310 | 310 | } |
311 | - $where = $where . " ("; |
|
311 | + $where = $where." ("; |
|
312 | 312 | for ($j = 0; $j < $numMatch; $j++) { |
313 | 313 | if ($j != 0) { |
314 | 314 | $where = $where." OR "; |
@@ -1,21 +1,21 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * phpMyFAQ database based search classes |
|
4 | - * |
|
5 | - * PHP Version 5.3 |
|
6 | - * |
|
7 | - * This Source Code Form is subject to the terms of the Mozilla Public License, |
|
8 | - * v. 2.0. If a copy of the MPL was not distributed with this file, You can |
|
9 | - * obtain one at http://mozilla.org/MPL/2.0/. |
|
10 | - * |
|
11 | - * @category phpMyFAQ |
|
12 | - * @package Search |
|
13 | - * @author Thorsten Rinne <[email protected]> |
|
14 | - * @copyright 2010-2016 phpMyFAQ Team |
|
15 | - * @license http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0 |
|
16 | - * @link http://www.phpmyfaq.de |
|
17 | - * @since 2010-06-06 |
|
18 | - */ |
|
3 | + * phpMyFAQ database based search classes |
|
4 | + * |
|
5 | + * PHP Version 5.3 |
|
6 | + * |
|
7 | + * This Source Code Form is subject to the terms of the Mozilla Public License, |
|
8 | + * v. 2.0. If a copy of the MPL was not distributed with this file, You can |
|
9 | + * obtain one at http://mozilla.org/MPL/2.0/. |
|
10 | + * |
|
11 | + * @category phpMyFAQ |
|
12 | + * @package Search |
|
13 | + * @author Thorsten Rinne <[email protected]> |
|
14 | + * @copyright 2010-2016 phpMyFAQ Team |
|
15 | + * @license http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0 |
|
16 | + * @link http://www.phpmyfaq.de |
|
17 | + * @since 2010-06-06 |
|
18 | + */ |
|
19 | 19 | |
20 | 20 | if (!defined('IS_VALID_PHPMYFAQ')) { |
21 | 21 | exit(); |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | * |
45 | 45 | * @return mixed |
46 | 46 | */ |
47 | - public static function filterInput ($type, $variable_name, $filter, $default = null) |
|
47 | + public static function filterInput($type, $variable_name, $filter, $default = null) |
|
48 | 48 | { |
49 | 49 | $return = filter_input($type, $variable_name, $filter); |
50 | 50 | return (is_null($return) || $return === false) ? $default : $return; |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | * @param array $definition Definition |
58 | 58 | * @return mixed |
59 | 59 | */ |
60 | - public static function filterInputArray ($type, Array $definition) |
|
60 | + public static function filterInputArray($type, Array $definition) |
|
61 | 61 | { |
62 | 62 | return filter_input_array($type, $definition); |
63 | 63 | } |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | * @param mixed $default Default value |
71 | 71 | * @return mixed |
72 | 72 | */ |
73 | - public static function filterVar ($variable, $filter, $default = null) |
|
73 | + public static function filterVar($variable, $filter, $default = null) |
|
74 | 74 | { |
75 | 75 | $return = filter_var($variable, $filter); |
76 | 76 | return ($return === false) ? $default : $return; |
@@ -117,7 +117,7 @@ |
||
117 | 117 | $faq->faqRecord['id'] |
118 | 118 | ); |
119 | 119 | |
120 | - $oLink = new PMF_Link(PMF_Link::getSystemRelativeUri() . $faqUrl, $this->_config); |
|
120 | + $oLink = new PMF_Link(PMF_Link::getSystemRelativeUri().$faqUrl, $this->_config); |
|
121 | 121 | $oLink->itemTitle = $faq->faqRecord['title']; |
122 | 122 | $availableLanguages = $this->_config->getLanguage()->languageAvailable($faq->faqRecord['id']); |
123 | 123 |
@@ -1,21 +1,21 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Helper class for phpMyFAQ FAQs |
|
4 | - * |
|
5 | - * PHP Version 5.3 |
|
6 | - * |
|
7 | - * This Source Code Form is subject to the terms of the Mozilla Public License, |
|
8 | - * v. 2.0. If a copy of the MPL was not distributed with this file, You can |
|
9 | - * obtain one at http://mozilla.org/MPL/2.0/. |
|
10 | - * |
|
11 | - * @category phpMyFAQ |
|
12 | - * @package Helper |
|
13 | - * @author Thorsten Rinne <[email protected]> |
|
14 | - * @copyright 2010-2016 phpMyFAQ Team |
|
15 | - * @license http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0 |
|
16 | - * @link http://www.phpmyfaq.de |
|
17 | - * @since 2010-11-12 |
|
18 | - */ |
|
3 | + * Helper class for phpMyFAQ FAQs |
|
4 | + * |
|
5 | + * PHP Version 5.3 |
|
6 | + * |
|
7 | + * This Source Code Form is subject to the terms of the Mozilla Public License, |
|
8 | + * v. 2.0. If a copy of the MPL was not distributed with this file, You can |
|
9 | + * obtain one at http://mozilla.org/MPL/2.0/. |
|
10 | + * |
|
11 | + * @category phpMyFAQ |
|
12 | + * @package Helper |
|
13 | + * @author Thorsten Rinne <[email protected]> |
|
14 | + * @copyright 2010-2016 phpMyFAQ Team |
|
15 | + * @license http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0 |
|
16 | + * @link http://www.phpmyfaq.de |
|
17 | + * @since 2010-11-12 |
|
18 | + */ |
|
19 | 19 | |
20 | 20 | if (!defined('IS_VALID_PHPMYFAQ')) { |
21 | 21 | exit(); |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | { |
114 | 114 | return sprintf( |
115 | 115 | '<a class="searchplugin" href="#" onclick="window.external.AddSearchProvider(\'%s\'); return false;">%s</a>', |
116 | - $this->_config->get('main.referenceURL') . '/opensearch.php', |
|
116 | + $this->_config->get('main.referenceURL').'/opensearch.php', |
|
117 | 117 | $this->translation['opensearch_plugin_install'] |
118 | 118 | ); |
119 | 119 | } |
@@ -240,8 +240,8 @@ discard block |
||
240 | 240 | $confPerPage = $this->_config->get('records.numberOfRecordsPerPage'); |
241 | 241 | $numOfResults = $resultSet->getNumberOfResults(); |
242 | 242 | |
243 | - $totalPages = ceil($numOfResults / $confPerPage); |
|
244 | - $lastPage = $currentPage * $confPerPage; |
|
243 | + $totalPages = ceil($numOfResults/$confPerPage); |
|
244 | + $lastPage = $currentPage*$confPerPage; |
|
245 | 245 | $firstPage = $lastPage - $confPerPage; |
246 | 246 | if ($lastPage > $numOfResults) { |
247 | 247 | $lastPage = $numOfResults; |
@@ -260,7 +260,7 @@ discard block |
||
260 | 260 | $this->translation['msgPage'], |
261 | 261 | $currentPage, |
262 | 262 | $this->translation['msgVoteFrom'], |
263 | - $this->plurals->GetMsg('plmsgPagesTotal',$totalPages) |
|
263 | + $this->plurals->GetMsg('plmsgPagesTotal', $totalPages) |
|
264 | 264 | ); |
265 | 265 | } |
266 | 266 | |
@@ -376,7 +376,7 @@ discard block |
||
376 | 376 | $oLink->itemTitle = $result->question; |
377 | 377 | $oLink->text = $result->question; |
378 | 378 | $oLink->tooltip = $result->question; |
379 | - $html .= '<li>' . $oLink->toHtmlAnchor() . '</li>'; |
|
379 | + $html .= '<li>'.$oLink->toHtmlAnchor().'</li>'; |
|
380 | 380 | } |
381 | 381 | $html .= '</ul>'; |
382 | 382 | } |
@@ -406,6 +406,6 @@ discard block |
||
406 | 406 | } |
407 | 407 | } |
408 | 408 | |
409 | - return $html . '</ul>'; |
|
409 | + return $html.'</ul>'; |
|
410 | 410 | } |
411 | 411 | } |
412 | 412 | \ No newline at end of file |
@@ -1,21 +1,21 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Helper class for phpMyFAQ search |
|
4 | - * |
|
5 | - * PHP Version 5.3 |
|
6 | - * |
|
7 | - * This Source Code Form is subject to the terms of the Mozilla Public License, |
|
8 | - * v. 2.0. If a copy of the MPL was not distributed with this file, You can |
|
9 | - * obtain one at http://mozilla.org/MPL/2.0/. |
|
10 | - * |
|
11 | - * @category phpMyFAQ |
|
12 | - * @package Helper |
|
13 | - * @author Thorsten Rinne <[email protected]> |
|
14 | - * @copyright 2009-2016 phpMyFAQ Team |
|
15 | - * @license http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0 |
|
16 | - * @link http://www.phpmyfaq.de |
|
17 | - * @since 2009-09-07 |
|
18 | - */ |
|
3 | + * Helper class for phpMyFAQ search |
|
4 | + * |
|
5 | + * PHP Version 5.3 |
|
6 | + * |
|
7 | + * This Source Code Form is subject to the terms of the Mozilla Public License, |
|
8 | + * v. 2.0. If a copy of the MPL was not distributed with this file, You can |
|
9 | + * obtain one at http://mozilla.org/MPL/2.0/. |
|
10 | + * |
|
11 | + * @category phpMyFAQ |
|
12 | + * @package Helper |
|
13 | + * @author Thorsten Rinne <[email protected]> |
|
14 | + * @copyright 2009-2016 phpMyFAQ Team |
|
15 | + * @license http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0 |
|
16 | + * @link http://www.phpmyfaq.de |
|
17 | + * @since 2009-09-07 |
|
18 | + */ |
|
19 | 19 | |
20 | 20 | if (!defined('IS_VALID_PHPMYFAQ')) { |
21 | 21 | exit(); |
@@ -293,10 +293,10 @@ discard block |
||
293 | 293 | |
294 | 294 | if (PMF_String::strlen($searchItems[0]) > 1) { |
295 | 295 | foreach ($searchItems as $item) { |
296 | - if (PMF_String::strlen($item) > 2) { |
|
297 | - $question = PMF_Utils::setHighlightedString($question, $item); |
|
298 | - $answerPreview = PMF_Utils::setHighlightedString($answerPreview, $item); |
|
299 | - } |
|
296 | + if (PMF_String::strlen($item) > 2) { |
|
297 | + $question = PMF_Utils::setHighlightedString($question, $item); |
|
298 | + $answerPreview = PMF_Utils::setHighlightedString($answerPreview, $item); |
|
299 | + } |
|
300 | 300 | } |
301 | 301 | } |
302 | 302 |
@@ -62,13 +62,13 @@ discard block |
||
62 | 62 | } |
63 | 63 | |
64 | 64 | if ($action != '') { |
65 | - $action = "action=" . $action; |
|
65 | + $action = "action=".$action; |
|
66 | 66 | } |
67 | 67 | |
68 | 68 | if (isset($PMF_LANG[$caption])) { |
69 | 69 | $_caption = $PMF_LANG[$caption]; |
70 | 70 | } else { |
71 | - $_caption = 'No string for ' . $caption; |
|
71 | + $_caption = 'No string for '.$caption; |
|
72 | 72 | } |
73 | 73 | |
74 | 74 | $output = sprintf('<li%s><a href="?%s">%s</a></li>%s', $active, $action, $_caption, "\n"); |
@@ -96,9 +96,9 @@ discard block |
||
96 | 96 | */ |
97 | 97 | private function evaluatePermission($restrictions) |
98 | 98 | { |
99 | - if (false !== strpos ($restrictions, '+')) { |
|
99 | + if (false !== strpos($restrictions, '+')) { |
|
100 | 100 | $retval = false; |
101 | - foreach (explode('+',$restrictions) as $_restriction) { |
|
101 | + foreach (explode('+', $restrictions) as $_restriction) { |
|
102 | 102 | $retval = $retval || $this->evaluatePermission($_restriction); |
103 | 103 | if ($retval) { |
104 | 104 | break; |
@@ -1,22 +1,22 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Helper class for Administration backend |
|
4 | - * |
|
5 | - * PHP Version 5.3 |
|
6 | - * |
|
7 | - * This Source Code Form is subject to the terms of the Mozilla Public License, |
|
8 | - * v. 2.0. If a copy of the MPL was not distributed with this file, You can |
|
9 | - * obtain one at http://mozilla.org/MPL/2.0/. |
|
10 | - * |
|
11 | - * @category phpMyFAQ |
|
12 | - * @package Helper |
|
13 | - * @author Thorsten Rinne <[email protected]> |
|
14 | - * @author Anatoliy Belsky <[email protected]> |
|
15 | - * @copyright 2010-2016 phpMyFAQ Team |
|
16 | - * @license http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0 |
|
17 | - * @link http://www.phpmyfaq.de |
|
18 | - * @since 2010-01-19 |
|
19 | - */ |
|
3 | + * Helper class for Administration backend |
|
4 | + * |
|
5 | + * PHP Version 5.3 |
|
6 | + * |
|
7 | + * This Source Code Form is subject to the terms of the Mozilla Public License, |
|
8 | + * v. 2.0. If a copy of the MPL was not distributed with this file, You can |
|
9 | + * obtain one at http://mozilla.org/MPL/2.0/. |
|
10 | + * |
|
11 | + * @category phpMyFAQ |
|
12 | + * @package Helper |
|
13 | + * @author Thorsten Rinne <[email protected]> |
|
14 | + * @author Anatoliy Belsky <[email protected]> |
|
15 | + * @copyright 2010-2016 phpMyFAQ Team |
|
16 | + * @license http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0 |
|
17 | + * @link http://www.phpmyfaq.de |
|
18 | + * @since 2010-01-19 |
|
19 | + */ |
|
20 | 20 | |
21 | 21 | /** |
22 | 22 | * PMF_Helper_Administration |
@@ -63,12 +63,12 @@ discard block |
||
63 | 63 | public function addHeader() |
64 | 64 | { |
65 | 65 | header('Expires: Thu, 07 Apr 1977 14:47:00 GMT'); |
66 | - header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); |
|
66 | + header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); |
|
67 | 67 | header('Cache-Control: no-store, no-cache, must-revalidate'); |
68 | 68 | header('Cache-Control: post-check=0, pre-check=0', false); |
69 | 69 | header('Pragma: no-cache'); |
70 | 70 | header('Vary: Negotiate,Accept'); |
71 | - header('Content-type: ' . $this->contentType); |
|
71 | + header('Content-type: '.$this->contentType); |
|
72 | 72 | } |
73 | 73 | |
74 | 74 | /** |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | */ |
107 | 107 | public function redirect($url) |
108 | 108 | { |
109 | - header('Location: ' . $url); |
|
109 | + header('Location: '.$url); |
|
110 | 110 | } |
111 | 111 | |
112 | 112 | /** |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | $validHeaders = array(); |
137 | 137 | if (is_string($headers) && strlen($headers) > 0) { |
138 | 138 | $validHeaders[] = $headers; |
139 | - } elseif(is_array($headers)) { |
|
139 | + } elseif (is_array($headers)) { |
|
140 | 140 | foreach ($headers as $header) { |
141 | 141 | if (strlen($header) > 0) { |
142 | 142 | $validHeaders[] = $header; |
@@ -1,22 +1,22 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * HTTP Helper class for phpMyFAQ |
|
4 | - * |
|
5 | - * PHP Version 5.3.0 |
|
6 | - * |
|
7 | - * This Source Code Form is subject to the terms of the Mozilla Public License, |
|
8 | - * v. 2.0. If a copy of the MPL was not distributed with this file, You can |
|
9 | - * obtain one at http://mozilla.org/MPL/2.0/. |
|
10 | - * |
|
11 | - * @category phpMyFAQ |
|
12 | - * @package PMF_Helper |
|
13 | - * @author Thorsten Rinne <[email protected]> |
|
14 | - * @author Florian Anderiasch <[email protected]> |
|
15 | - * @copyright 2009-2016 phpMyFAQ Team |
|
16 | - * @license http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0 |
|
17 | - * @link http://www.phpmyfaq.de |
|
18 | - * @since 2009-09-13 |
|
19 | - */ |
|
3 | + * HTTP Helper class for phpMyFAQ |
|
4 | + * |
|
5 | + * PHP Version 5.3.0 |
|
6 | + * |
|
7 | + * This Source Code Form is subject to the terms of the Mozilla Public License, |
|
8 | + * v. 2.0. If a copy of the MPL was not distributed with this file, You can |
|
9 | + * obtain one at http://mozilla.org/MPL/2.0/. |
|
10 | + * |
|
11 | + * @category phpMyFAQ |
|
12 | + * @package PMF_Helper |
|
13 | + * @author Thorsten Rinne <[email protected]> |
|
14 | + * @author Florian Anderiasch <[email protected]> |
|
15 | + * @copyright 2009-2016 phpMyFAQ Team |
|
16 | + * @license http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0 |
|
17 | + * @link http://www.phpmyfaq.de |
|
18 | + * @since 2009-09-13 |
|
19 | + */ |
|
20 | 20 | |
21 | 21 | if (!defined('IS_VALID_PHPMYFAQ')) { |
22 | 22 | exit(); |
@@ -29,18 +29,18 @@ discard block |
||
29 | 29 | * path to TCPDF |
30 | 30 | * |
31 | 31 | */ |
32 | -define('K_PATH_MAIN', PMF_INCLUDE_DIR . '/libs/tcpdf/'); |
|
32 | +define('K_PATH_MAIN', PMF_INCLUDE_DIR.'/libs/tcpdf/'); |
|
33 | 33 | |
34 | 34 | /** |
35 | 35 | * path for PDF fonts |
36 | 36 | * use K_PATH_MAIN.'fonts/old/' for old non-UTF8 fonts |
37 | 37 | */ |
38 | -define('K_PATH_FONTS', K_PATH_MAIN . 'fonts/'); |
|
38 | +define('K_PATH_FONTS', K_PATH_MAIN.'fonts/'); |
|
39 | 39 | |
40 | 40 | /** |
41 | 41 | * cache directory for temporary files (full path) |
42 | 42 | */ |
43 | -define('K_PATH_CACHE', PMF_ROOT_DIR . '/images/'); |
|
43 | +define('K_PATH_CACHE', PMF_ROOT_DIR.'/images/'); |
|
44 | 44 | |
45 | 45 | /** |
46 | 46 | * cache directory for temporary files (url path) |
@@ -50,12 +50,12 @@ discard block |
||
50 | 50 | /** |
51 | 51 | * images directory |
52 | 52 | */ |
53 | -define('K_PATH_IMAGES', K_PATH_MAIN . 'images/'); |
|
53 | +define('K_PATH_IMAGES', K_PATH_MAIN.'images/'); |
|
54 | 54 | |
55 | 55 | /** |
56 | 56 | * blank image |
57 | 57 | */ |
58 | -define('K_BLANK_IMAGE', K_PATH_IMAGES . '_blank.png'); |
|
58 | +define('K_BLANK_IMAGE', K_PATH_IMAGES.'_blank.png'); |
|
59 | 59 | |
60 | 60 | /** |
61 | 61 | * page format |
@@ -180,9 +180,9 @@ discard block |
||
180 | 180 | /** |
181 | 181 | * reduction factor for small font |
182 | 182 | */ |
183 | -define('K_SMALL_RATIO', 2 / 3); |
|
183 | +define('K_SMALL_RATIO', 2/3); |
|
184 | 184 | |
185 | -require K_PATH_MAIN . '/tcpdf.php'; |
|
185 | +require K_PATH_MAIN.'/tcpdf.php'; |
|
186 | 186 | |
187 | 187 | /** |
188 | 188 | * @category phpMyFAQ |
@@ -350,7 +350,7 @@ discard block |
||
350 | 350 | |
351 | 351 | $title = html_entity_decode($title, ENT_QUOTES, 'utf-8'); |
352 | 352 | |
353 | - $this->SetTextColor(0,0,0); |
|
353 | + $this->SetTextColor(0, 0, 0); |
|
354 | 354 | $this->SetFont($this->currentFont, 'B', 18); |
355 | 355 | $this->MultiCell(0, 9, $title, 0, 'C', 0); |
356 | 356 | $this->SetMargins(PDF_MARGIN_LEFT, $this->getLastH() + 5, PDF_MARGIN_RIGHT); |
@@ -376,13 +376,13 @@ discard block |
||
376 | 376 | ); |
377 | 377 | |
378 | 378 | $currentTextColor = $this->TextColor; |
379 | - $this->SetTextColor(0,0,0); |
|
379 | + $this->SetTextColor(0, 0, 0); |
|
380 | 380 | $this->SetY(-25); |
381 | 381 | $this->SetFont($this->currentFont, '', 10); |
382 | - $this->Cell(0, 10, $PMF_LANG['ad_gen_page'] . ' ' . $this->getAliasNumPage() . ' / ' . $this->getAliasNbPages(), 0, 0, 'C'); |
|
382 | + $this->Cell(0, 10, $PMF_LANG['ad_gen_page'].' '.$this->getAliasNumPage().' / '.$this->getAliasNbPages(), 0, 0, 'C'); |
|
383 | 383 | $this->SetY(-20); |
384 | 384 | $this->SetFont($this->currentFont, 'B', 8); |
385 | - $this->Cell(0, 10, $footer,0,1,"C"); |
|
385 | + $this->Cell(0, 10, $footer, 0, 1, "C"); |
|
386 | 386 | if ($this->enableBookmarks == false) { |
387 | 387 | $this->SetY(-15); |
388 | 388 | $this->SetFont($this->currentFont, '', 8); |
@@ -390,14 +390,14 @@ discard block |
||
390 | 390 | if (is_array($this->faq) && !empty($this->faq)) { |
391 | 391 | $baseUrl .= '?action=artikel&'; |
392 | 392 | if (array_key_exists($this->category, $this->categories)) { |
393 | - $baseUrl .= 'cat=' . $this->categories[$this->category]['id']; |
|
393 | + $baseUrl .= 'cat='.$this->categories[$this->category]['id']; |
|
394 | 394 | } else { |
395 | 395 | $baseUrl .= 'cat=0'; |
396 | 396 | } |
397 | 397 | $baseUrl .= '&id='.$this->faq['id']; |
398 | 398 | $baseUrl .= '&artlang='.$this->faq['lang']; |
399 | 399 | } |
400 | - $url = $this->_config->get('main.referenceURL') . $baseUrl; |
|
400 | + $url = $this->_config->get('main.referenceURL').$baseUrl; |
|
401 | 401 | $urlObj = new PMF_Link($url, $this->_config); |
402 | 402 | $urlObj->itemTitle = $this->question; |
403 | 403 | $_url = str_replace('&', '&', $urlObj->toString()); |
@@ -429,7 +429,7 @@ discard block |
||
429 | 429 | $this->SetFont($this->currentFont, '', 12); |
430 | 430 | |
431 | 431 | // Render TOC |
432 | - $this->addTOC(1, $this->currentFont, '.', $PMF_LANG['msgTableOfContent'], 'B', array(128,0,0)); |
|
432 | + $this->addTOC(1, $this->currentFont, '.', $PMF_LANG['msgTableOfContent'], 'B', array(128, 0, 0)); |
|
433 | 433 | $this->endTOCPage(); |
434 | 434 | } |
435 | 435 | |
@@ -505,7 +505,7 @@ discard block |
||
505 | 505 | public function Image($file, $x = '', $y = '', $w = 0, $h = 0, $type = '', $link = '', $align = '', $resize = false, $dpi = 300, $palign = '', $ismask = false, $imgmask = false, $border = 0, $fitbox = false, $hidden = false, $fitonpage = false, $alt = false, $altimgs = array()) |
506 | 506 | { |
507 | 507 | if (!strpos($file, 'data:image/png;base64,') === false) { |
508 | - $file = '@' . base64_decode( |
|
508 | + $file = '@'.base64_decode( |
|
509 | 509 | chunk_split(str_replace(' ', '+', str_replace('data:image/png;base64,', '', $file))) |
510 | 510 | ); |
511 | 511 | } |
@@ -199,10 +199,10 @@ |
||
199 | 199 | class PMF_Export_Pdf_Wrapper extends TCPDF |
200 | 200 | { |
201 | 201 | /** |
202 | - * With or without bookmarks |
|
203 | - * |
|
204 | - * @var boolean |
|
205 | - */ |
|
202 | + * With or without bookmarks |
|
203 | + * |
|
204 | + * @var boolean |
|
205 | + */ |
|
206 | 206 | public $enableBookmarks = false; |
207 | 207 | |
208 | 208 | /** |
@@ -97,8 +97,8 @@ discard block |
||
97 | 97 | $this->pdf->setCategory($categoryId); |
98 | 98 | $this->pdf->setCategories($this->category->categoryName); |
99 | 99 | $this->pdf->SetCreator( |
100 | - $this->_config->get('main.titleFAQ') . |
|
101 | - ' - powered by phpMyFAQ ' . |
|
100 | + $this->_config->get('main.titleFAQ'). |
|
101 | + ' - powered by phpMyFAQ '. |
|
102 | 102 | $this->_config->get('main.currentVersion') |
103 | 103 | ); |
104 | 104 | |
@@ -137,27 +137,27 @@ discard block |
||
137 | 137 | $tags = $this->tags->getAllTagsById($faq['id']); |
138 | 138 | } |
139 | 139 | |
140 | - $this->pdf->WriteHTML('<h2 align="center">' . $faq['topic'] . '</h2>', true); |
|
140 | + $this->pdf->WriteHTML('<h2 align="center">'.$faq['topic'].'</h2>', true); |
|
141 | 141 | $this->pdf->Ln(10); |
142 | 142 | |
143 | 143 | $this->pdf->SetFont($this->pdf->getCurrentFont(), '', 12); |
144 | 144 | $this->pdf->WriteHTML(trim($faq['content'])); |
145 | 145 | $this->pdf->Ln(10); |
146 | 146 | |
147 | - if (! empty($faq['keywords'])) { |
|
147 | + if (!empty($faq['keywords'])) { |
|
148 | 148 | $this->pdf->Ln(); |
149 | - $this->pdf->Write(5, $PMF_LANG['msgNewContentKeywords'] . ' ' . $faq['keywords']); |
|
149 | + $this->pdf->Write(5, $PMF_LANG['msgNewContentKeywords'].' '.$faq['keywords']); |
|
150 | 150 | } |
151 | 151 | if (isset($tags) && 0 !== count($tags)) { |
152 | 152 | $this->pdf->Ln(); |
153 | - $this->pdf->Write(5, $PMF_LANG['ad_entry_tags'] . ': ' . implode(', ', $tags)); |
|
153 | + $this->pdf->Write(5, $PMF_LANG['ad_entry_tags'].': '.implode(', ', $tags)); |
|
154 | 154 | } |
155 | 155 | |
156 | 156 | $this->pdf->Ln(); |
157 | 157 | $this->pdf->Ln(); |
158 | 158 | $this->pdf->Write( |
159 | 159 | 5, |
160 | - $PMF_LANG['msgLastUpdateArticle'] . PMF_Date::createIsoDate($faq['lastmodified']) |
|
160 | + $PMF_LANG['msgLastUpdateArticle'].PMF_Date::createIsoDate($faq['lastmodified']) |
|
161 | 161 | ); |
162 | 162 | } |
163 | 163 | } |
@@ -184,7 +184,7 @@ discard block |
||
184 | 184 | |
185 | 185 | // Default filename: FAQ-<id>-<language>.pdf |
186 | 186 | if (empty($filename)) { |
187 | - $filename = 'FAQ-' . $faqData['id'] . '-' . $faqData['lang'] . '.pdf'; |
|
187 | + $filename = 'FAQ-'.$faqData['id'].'-'.$faqData['lang'].'.pdf'; |
|
188 | 188 | } |
189 | 189 | |
190 | 190 | $this->pdf->setFaq($faqData); |
@@ -195,27 +195,27 @@ discard block |
||
195 | 195 | // Set any item |
196 | 196 | $this->pdf->SetTitle($faqData['title']); |
197 | 197 | $this->pdf->SetCreator( |
198 | - $this->_config->get('main.titleFAQ') . |
|
199 | - ' - powered by phpMyFAQ ' . |
|
198 | + $this->_config->get('main.titleFAQ'). |
|
199 | + ' - powered by phpMyFAQ '. |
|
200 | 200 | $this->_config->get('main.currentVersion') |
201 | 201 | ); |
202 | 202 | $this->pdf->AddPage(); |
203 | 203 | $this->pdf->SetFont($this->pdf->getCurrentFont(), '', 12); |
204 | 204 | $this->pdf->SetDisplayMode('real'); |
205 | 205 | $this->pdf->Ln(); |
206 | - $this->pdf->WriteHTML('<h1 align="center">' . $faqData['title'] . '</h1>', true); |
|
206 | + $this->pdf->WriteHTML('<h1 align="center">'.$faqData['title'].'</h1>', true); |
|
207 | 207 | $this->pdf->Ln(); |
208 | 208 | $this->pdf->Ln(); |
209 | 209 | $this->pdf->WriteHTML(str_replace('../', '', $faqData['content']), true); |
210 | 210 | $this->pdf->Ln(); |
211 | 211 | $this->pdf->Ln(); |
212 | 212 | $this->pdf->SetFont($this->pdf->getCurrentFont(), '', 11); |
213 | - $this->pdf->Write(5, $PMF_LANG['ad_entry_solution_id'] . ': #' . $faqData['solution_id']); |
|
213 | + $this->pdf->Write(5, $PMF_LANG['ad_entry_solution_id'].': #'.$faqData['solution_id']); |
|
214 | 214 | $this->pdf->SetAuthor($faqData['author']); |
215 | 215 | $this->pdf->Ln(); |
216 | - $this->pdf->Write(5, $PMF_LANG['msgAuthor'] . ': ' . $faqData['author']); |
|
216 | + $this->pdf->Write(5, $PMF_LANG['msgAuthor'].': '.$faqData['author']); |
|
217 | 217 | $this->pdf->Ln(); |
218 | - $this->pdf->Write(5, $PMF_LANG['msgLastUpdateArticle'] . $faqData['date']); |
|
218 | + $this->pdf->Write(5, $PMF_LANG['msgLastUpdateArticle'].$faqData['date']); |
|
219 | 219 | |
220 | 220 | return $this->pdf->Output($filename); |
221 | 221 | } |
@@ -1,21 +1,21 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * PDF Export class for phpMyFAQ |
|
4 | - * |
|
5 | - * PHP Version 5.3 |
|
6 | - * |
|
7 | - * This Source Code Form is subject to the terms of the Mozilla Public License, |
|
8 | - * v. 2.0. If a copy of the MPL was not distributed with this file, You can |
|
9 | - * obtain one at http://mozilla.org/MPL/2.0/. |
|
10 | - * |
|
11 | - * @category phpMyFAQ |
|
12 | - * @package Export |
|
13 | - * @author Thorsten Rinne <[email protected]> |
|
14 | - * @copyright 2009-2016 phpMyFAQ Team |
|
15 | - * @license http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0 |
|
16 | - * @link http://www.phpmyfaq.de |
|
17 | - * @since 2009-10-07 |
|
18 | - */ |
|
3 | + * PDF Export class for phpMyFAQ |
|
4 | + * |
|
5 | + * PHP Version 5.3 |
|
6 | + * |
|
7 | + * This Source Code Form is subject to the terms of the Mozilla Public License, |
|
8 | + * v. 2.0. If a copy of the MPL was not distributed with this file, You can |
|
9 | + * obtain one at http://mozilla.org/MPL/2.0/. |
|
10 | + * |
|
11 | + * @category phpMyFAQ |
|
12 | + * @package Export |
|
13 | + * @author Thorsten Rinne <[email protected]> |
|
14 | + * @copyright 2009-2016 phpMyFAQ Team |
|
15 | + * @license http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0 |
|
16 | + * @link http://www.phpmyfaq.de |
|
17 | + * @since 2009-10-07 |
|
18 | + */ |
|
19 | 19 | |
20 | 20 | if (!defined('IS_VALID_PHPMYFAQ')) { |
21 | 21 | exit(); |
@@ -115,10 +115,10 @@ |
||
115 | 115 | $this->xml->startElement('p'); |
116 | 116 | $this->xml->writeCdata(html_entity_decode($data['content'], ENT_QUOTES, 'UTF-8')); |
117 | 117 | $this->xml->endElement(); |
118 | - $this->xml->writeElement('p', $PMF_LANG['msgAuthor'] . ': ' .$data['author_email']); |
|
118 | + $this->xml->writeElement('p', $PMF_LANG['msgAuthor'].': '.$data['author_email']); |
|
119 | 119 | $this->xml->writeElement( |
120 | 120 | 'p', |
121 | - $PMF_LANG['msgLastUpdateArticle'] . PMF_Date::createIsoDate($data['lastmodified']) |
|
121 | + $PMF_LANG['msgLastUpdateArticle'].PMF_Date::createIsoDate($data['lastmodified']) |
|
122 | 122 | ); |
123 | 123 | |
124 | 124 | $lastCategory = $data['category_id']; |
@@ -1,21 +1,21 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * XHTML Export class for phpMyFAQ |
|
4 | - * |
|
5 | - * PHP Version 5.3 |
|
6 | - * |
|
7 | - * This Source Code Form is subject to the terms of the Mozilla Public License, |
|
8 | - * v. 2.0. If a copy of the MPL was not distributed with this file, You can |
|
9 | - * obtain one at http://mozilla.org/MPL/2.0/. |
|
10 | - * |
|
11 | - * @category phpMyFAQ |
|
12 | - * @package Export |
|
13 | - * @author Thorsten Rinne <[email protected]> |
|
14 | - * @copyright 2009-2016 phpMyFAQ Team |
|
15 | - * @license http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0 |
|
16 | - * @link http://www.phpmyfaq.de |
|
17 | - * @since 2009-10-07 |
|
18 | - */ |
|
3 | + * XHTML Export class for phpMyFAQ |
|
4 | + * |
|
5 | + * PHP Version 5.3 |
|
6 | + * |
|
7 | + * This Source Code Form is subject to the terms of the Mozilla Public License, |
|
8 | + * v. 2.0. If a copy of the MPL was not distributed with this file, You can |
|
9 | + * obtain one at http://mozilla.org/MPL/2.0/. |
|
10 | + * |
|
11 | + * @category phpMyFAQ |
|
12 | + * @package Export |
|
13 | + * @author Thorsten Rinne <[email protected]> |
|
14 | + * @copyright 2009-2016 phpMyFAQ Team |
|
15 | + * @license http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0 |
|
16 | + * @link http://www.phpmyfaq.de |
|
17 | + * @since 2009-10-07 |
|
18 | + */ |
|
19 | 19 | |
20 | 20 | if (!defined('IS_VALID_PHPMYFAQ')) { |
21 | 21 | exit(); |
@@ -80,13 +80,13 @@ discard block |
||
80 | 80 | $faqdata = $this->faq->get(FAQ_QUERY_TYPE_EXPORT_XHTML, $categoryId, $downwards, $language); |
81 | 81 | $version = $this->_config->get('main.currentVersion'); |
82 | 82 | $comment = sprintf('XHTML output by phpMyFAQ %s | Date: %s', |
83 | - $version, |
|
84 | - PMF_Date::createIsoDate(date("YmdHis"))); |
|
83 | + $version, |
|
84 | + PMF_Date::createIsoDate(date("YmdHis"))); |
|
85 | 85 | |
86 | 86 | $this->xml->startDocument('1.0', 'utf-8'); |
87 | 87 | $this->xml->writeDtd('html', |
88 | - '-//W3C//DTD XHTML 1.0 Transitional//EN', |
|
89 | - 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'); |
|
88 | + '-//W3C//DTD XHTML 1.0 Transitional//EN', |
|
89 | + 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'); |
|
90 | 90 | $this->xml->startElement('html'); |
91 | 91 | $this->xml->writeAttribute('xmlns', 'http://www.w3.org/1999/xhtml'); |
92 | 92 | $this->xml->writeAttribute('xml:lang', $language); |