@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | $this->handle = @fopen($this->path, $this->mode); |
67 | 67 | |
68 | 68 | if (!is_resource($this->handle)) { |
69 | - throw new PMF_Attachment_Filesystem_File_Exception('Could not open file: ' . $this->path); |
|
69 | + throw new PMF_Attachment_Filesystem_File_Exception('Could not open file: '.$this->path); |
|
70 | 70 | } |
71 | 71 | } |
72 | 72 | |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | { |
152 | 152 | $retval = false; |
153 | 153 | |
154 | - if(in_array($mode, array(self::MODE_WRITE, self::MODE_READ, self::MODE_APPEND))) { |
|
154 | + if (in_array($mode, array(self::MODE_WRITE, self::MODE_READ, self::MODE_APPEND))) { |
|
155 | 155 | fclose($this->handle); |
156 | 156 | $this->handle = fopen($this->path, $mode); |
157 | 157 |
@@ -1,21 +1,21 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * File handler class |
|
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 Attachment |
|
13 | - * @author Anatoliy Belsky <[email protected]> |
|
14 | - * @copyright 2009-2015 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-08-21 |
|
18 | - */ |
|
3 | + * File handler class |
|
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 Attachment |
|
13 | + * @author Anatoliy Belsky <[email protected]> |
|
14 | + * @copyright 2009-2015 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-08-21 |
|
18 | + */ |
|
19 | 19 | |
20 | 20 | if (!defined('IS_VALID_PHPMYFAQ')) { |
21 | 21 | exit(); |
@@ -1,21 +1,21 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * File handler class |
|
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 Attachment |
|
13 | - * @author Anatoliy Belsky <[email protected]> |
|
14 | - * @copyright 2009-2015 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-08-21 |
|
18 | - */ |
|
3 | + * File handler class |
|
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 Attachment |
|
13 | + * @author Anatoliy Belsky <[email protected]> |
|
14 | + * @copyright 2009-2015 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-08-21 |
|
18 | + */ |
|
19 | 19 | |
20 | 20 | if (!defined('IS_VALID_PHPMYFAQ')) { |
21 | 21 | exit(); |
@@ -1,21 +1,21 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Interface to create new attachment types |
|
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 Attachment |
|
13 | - * @author Anatoliy Belsky <[email protected]> |
|
14 | - * @copyright 2009-2015 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-08-21 |
|
18 | - */ |
|
3 | + * Interface to create new attachment types |
|
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 Attachment |
|
13 | + * @author Anatoliy Belsky <[email protected]> |
|
14 | + * @copyright 2009-2015 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-08-21 |
|
18 | + */ |
|
19 | 19 | |
20 | 20 | if (!defined('IS_VALID_PHPMYFAQ')) { |
21 | 21 | exit(); |
@@ -1,21 +1,21 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Attachment exception |
|
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 Attachment |
|
13 | - * @author Anatoliy Belsky <[email protected]> |
|
14 | - * @copyright 2009-2015 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-08-21 |
|
18 | - */ |
|
3 | + * Attachment exception |
|
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 Attachment |
|
13 | + * @author Anatoliy Belsky <[email protected]> |
|
14 | + * @copyright 2009-2015 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-08-21 |
|
18 | + */ |
|
19 | 19 | |
20 | 20 | if (!defined('IS_VALID_PHPMYFAQ')) { |
21 | 21 | exit(); |
@@ -1,21 +1,21 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Mime type class |
|
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 Attachment |
|
13 | - * @author Anatoliy Belsky <[email protected]> |
|
14 | - * @copyright 2009-2015 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-08-21 |
|
18 | - */ |
|
3 | + * Mime type class |
|
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 Attachment |
|
13 | + * @author Anatoliy Belsky <[email protected]> |
|
14 | + * @copyright 2009-2015 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-08-21 |
|
18 | + */ |
|
19 | 19 | |
20 | 20 | if (!defined('IS_VALID_PHPMYFAQ')) { |
21 | 21 | exit(); |
@@ -1,21 +1,21 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Attachment handler class for files stored in filesystem |
|
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 Attachment |
|
13 | - * @author Anatoliy Belsky <[email protected]> |
|
14 | - * @copyright 2009-2015 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-08-21 |
|
18 | - */ |
|
3 | + * Attachment handler class for files stored in filesystem |
|
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 Attachment |
|
13 | + * @author Anatoliy Belsky <[email protected]> |
|
14 | + * @copyright 2009-2015 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-08-21 |
|
18 | + */ |
|
19 | 19 | |
20 | 20 | if (!defined('IS_VALID_PHPMYFAQ')) { |
21 | 21 | exit(); |
@@ -49,10 +49,10 @@ discard block |
||
49 | 49 | $subDirNameLength = 5; |
50 | 50 | |
51 | 51 | for ($i = 0; $i < $subDirCount; $i++) { |
52 | - $retval .= DIRECTORY_SEPARATOR . substr($fsHash, $i*$subDirNameLength, $subDirNameLength); |
|
52 | + $retval .= DIRECTORY_SEPARATOR.substr($fsHash, $i*$subDirNameLength, $subDirNameLength); |
|
53 | 53 | } |
54 | 54 | |
55 | - $retval .= DIRECTORY_SEPARATOR . substr($fsHash, $i*$subDirNameLength); |
|
55 | + $retval .= DIRECTORY_SEPARATOR.substr($fsHash, $i*$subDirNameLength); |
|
56 | 56 | |
57 | 57 | return $retval; |
58 | 58 | } |
@@ -193,9 +193,9 @@ discard block |
||
193 | 193 | |
194 | 194 | if ($headers) { |
195 | 195 | $disposition = 'attachment' == $disposition ? 'attachment' : 'inline'; |
196 | - header('Content-Type: ' . $this->mimeType, true); |
|
197 | - header('Content-Length: ' . $this->filesize, true); |
|
198 | - header("Content-Disposition: $disposition; filename=\"{$this->filename}\"" , true); |
|
196 | + header('Content-Type: '.$this->mimeType, true); |
|
197 | + header('Content-Length: '.$this->filesize, true); |
|
198 | + header("Content-Disposition: $disposition; filename=\"{$this->filename}\"", true); |
|
199 | 199 | header("Content-MD5: {$this->realHash}", true); |
200 | 200 | } |
201 | 201 |
@@ -1,23 +1,23 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Manages all language stuff |
|
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 Language |
|
13 | - * @author Thorsten Rinne <[email protected]> |
|
14 | - * @author Matteo scaramuccia <[email protected]> |
|
15 | - * @author Aurimas Fišeras <[email protected]> |
|
16 | - * @copyright 2009-2015 phpMyFAQ Team |
|
17 | - * @license http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0 |
|
18 | - * @link http://www.phpmyfaq.de |
|
19 | - * @since 2009-05-14 |
|
20 | - */ |
|
3 | + * Manages all language stuff |
|
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 Language |
|
13 | + * @author Thorsten Rinne <[email protected]> |
|
14 | + * @author Matteo scaramuccia <[email protected]> |
|
15 | + * @author Aurimas Fišeras <[email protected]> |
|
16 | + * @copyright 2009-2015 phpMyFAQ Team |
|
17 | + * @license http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0 |
|
18 | + * @link http://www.phpmyfaq.de |
|
19 | + * @since 2009-05-14 |
|
20 | + */ |
|
21 | 21 | |
22 | 22 | if (!defined('IS_VALID_PHPMYFAQ')) { |
23 | 23 | exit(); |
@@ -132,33 +132,33 @@ discard block |
||
132 | 132 | |
133 | 133 | // Get language from: _POST, _GET, _COOKIE, phpMyFAQ configuration and the automatic language detection |
134 | 134 | $_lang['post'] = PMF_Filter::filterInput(INPUT_POST, 'language', FILTER_SANITIZE_STRING); |
135 | - if (!is_null($_lang['post']) && !self::isASupportedLanguage($_lang['post']) ) { |
|
135 | + if (!is_null($_lang['post']) && !self::isASupportedLanguage($_lang['post'])) { |
|
136 | 136 | $_lang['post'] = null; |
137 | 137 | } |
138 | 138 | // Get the user language |
139 | 139 | $_lang['get'] = PMF_Filter::filterInput(INPUT_GET, 'lang', FILTER_SANITIZE_STRING); |
140 | - if (!is_null($_lang['get']) && !self::isASupportedLanguage($_lang['get']) ) { |
|
140 | + if (!is_null($_lang['get']) && !self::isASupportedLanguage($_lang['get'])) { |
|
141 | 141 | $_lang['get'] = null; |
142 | 142 | } |
143 | 143 | // Get the faq record language |
144 | 144 | $_lang['artget'] = PMF_Filter::filterInput(INPUT_GET, 'artlang', FILTER_SANITIZE_STRING); |
145 | - if (!is_null($_lang['artget']) && !self::isASupportedLanguage($_lang['artget']) ) { |
|
145 | + if (!is_null($_lang['artget']) && !self::isASupportedLanguage($_lang['artget'])) { |
|
146 | 146 | $_lang['artget'] = null; |
147 | 147 | } |
148 | 148 | // Get the language from the session |
149 | - if (isset($_SESSION['pmf_lang']) && self::isASupportedLanguage($_SESSION['pmf_lang']) ) { |
|
149 | + if (isset($_SESSION['pmf_lang']) && self::isASupportedLanguage($_SESSION['pmf_lang'])) { |
|
150 | 150 | $_lang['session'] = trim($_SESSION['pmf_lang']); |
151 | 151 | } |
152 | 152 | |
153 | 153 | // Get the language from the config |
154 | 154 | if (isset($configLanguage)) { |
155 | 155 | $confLangCode = str_replace(array("language_", ".php"), "", $configLanguage); |
156 | - if (self::isASupportedLanguage($confLangCode) ) { |
|
156 | + if (self::isASupportedLanguage($confLangCode)) { |
|
157 | 157 | $_lang['config'] = $confLangCode; |
158 | 158 | } |
159 | 159 | } |
160 | 160 | // Detect the browser's language |
161 | - if ((true === $configDetection) && self::isASupportedLanguage($this->acceptedLanguage) ) { |
|
161 | + if ((true === $configDetection) && self::isASupportedLanguage($this->acceptedLanguage)) { |
|
162 | 162 | $_lang['detection'] = strtolower($this->acceptedLanguage); |
163 | 163 | } |
164 | 164 | // Select the language |
@@ -208,12 +208,12 @@ discard block |
||
208 | 208 | { |
209 | 209 | global $languageCodes; |
210 | 210 | |
211 | - $search = array("language_" , ".php"); |
|
211 | + $search = array("language_", ".php"); |
|
212 | 212 | $languages = $languageFiles = array(); |
213 | 213 | |
214 | 214 | $dir = new DirectoryIterator(PMF_LANGUAGE_DIR); |
215 | 215 | foreach ($dir as $fileinfo) { |
216 | - if (! $fileinfo->isDot()) { |
|
216 | + if (!$fileinfo->isDot()) { |
|
217 | 217 | $languageFiles[] = strtoupper( |
218 | 218 | str_replace($search, '', trim($fileinfo->getFilename())) |
219 | 219 | ); |
@@ -248,21 +248,21 @@ discard block |
||
248 | 248 | global $languageCodes; |
249 | 249 | |
250 | 250 | $onChange = ($submitOnChange ? ' onchange="this.form.submit();"' : ''); |
251 | - $output = '<select class="language" name="' . $id . '" id="' . $id . '" size="1"' . $onChange . ">\n"; |
|
251 | + $output = '<select class="language" name="'.$id.'" id="'.$id.'" size="1"'.$onChange.">\n"; |
|
252 | 252 | $languages = self::getAvailableLanguages(); |
253 | 253 | |
254 | 254 | if (count($languages) > 0) { |
255 | 255 | foreach ($languages as $lang => $value) { |
256 | - if (! in_array($lang, $excludedLanguages)) { |
|
257 | - $output .= "\t" . '<option value="' . $lang . '"'; |
|
256 | + if (!in_array($lang, $excludedLanguages)) { |
|
257 | + $output .= "\t".'<option value="'.$lang.'"'; |
|
258 | 258 | if ($lang == $default) { |
259 | 259 | $output .= ' selected="selected"'; |
260 | 260 | } |
261 | - $output .= '>' . $value . "</option>\n"; |
|
261 | + $output .= '>'.$value."</option>\n"; |
|
262 | 262 | } |
263 | 263 | } |
264 | 264 | } else { |
265 | - $output .= "\t<option value=\"en\">" . $languageCodes["EN"] . "</option>"; |
|
265 | + $output .= "\t<option value=\"en\">".$languageCodes["EN"]."</option>"; |
|
266 | 266 | } |
267 | 267 | $output .= "</select>\n"; |
268 | 268 | return $output; |
@@ -283,24 +283,24 @@ discard block |
||
283 | 283 | if ($onlyThisLang) { |
284 | 284 | if (strtolower($key) == $lang) { |
285 | 285 | if ($fileLanguageValue) { |
286 | - $output .= "\t<option value=\"language_" . strtolower($lang) . ".php\""; |
|
286 | + $output .= "\t<option value=\"language_".strtolower($lang).".php\""; |
|
287 | 287 | } else { |
288 | - $output .= "\t<option value=\"" . strtolower($lang) . "\""; |
|
288 | + $output .= "\t<option value=\"".strtolower($lang)."\""; |
|
289 | 289 | } |
290 | 290 | $output .= " selected=\"selected\""; |
291 | - $output .= ">" . $value . "</option>\n"; |
|
291 | + $output .= ">".$value."</option>\n"; |
|
292 | 292 | break; |
293 | 293 | } |
294 | 294 | } else { |
295 | 295 | if ($fileLanguageValue) { |
296 | - $output .= "\t<option value=\"language_" . strtolower($key) . ".php\""; |
|
296 | + $output .= "\t<option value=\"language_".strtolower($key).".php\""; |
|
297 | 297 | } else { |
298 | - $output .= "\t<option value=\"" . strtolower($key) . "\""; |
|
298 | + $output .= "\t<option value=\"".strtolower($key)."\""; |
|
299 | 299 | } |
300 | 300 | if (strtolower($key) == $lang) { |
301 | 301 | $output .= " selected=\"selected\""; |
302 | 302 | } |
303 | - $output .= ">" . $value . "</option>\n"; |
|
303 | + $output .= ">".$value."</option>\n"; |
|
304 | 304 | } |
305 | 305 | } |
306 | 306 | return $output; |
@@ -335,7 +335,7 @@ discard block |
||
335 | 335 | public static function isASupportedTinyMCELanguage($langcode) |
336 | 336 | { |
337 | 337 | return file_exists( |
338 | - PMF_ROOT_DIR . '/admin/editor/langs/' . $langcode . '.js' |
|
338 | + PMF_ROOT_DIR.'/admin/editor/langs/'.$langcode.'.js' |
|
339 | 339 | ); |
340 | 340 | } |
341 | 341 |
@@ -364,7 +364,9 @@ |
||
364 | 364 | if (count($matches[1])) { |
365 | 365 | $languages = array_combine($matches[1], $matches[4]); |
366 | 366 | foreach ($languages as $lang => $val) { |
367 | - if ($val === '') $languages[$lang] = 1; |
|
367 | + if ($val === '') { |
|
368 | + $languages[$lang] = 1; |
|
369 | + } |
|
368 | 370 | } |
369 | 371 | arsort($languages, SORT_NUMERIC); |
370 | 372 | } |
@@ -1,21 +1,21 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Provides methods for password encryption using hash(). |
|
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 Enc |
|
13 | - * @author Thorsten Rinne <[email protected]> |
|
14 | - * @copyright 2012-2015 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 2012-01-04 |
|
18 | - */ |
|
3 | + * Provides methods for password encryption using hash(). |
|
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 Enc |
|
13 | + * @author Thorsten Rinne <[email protected]> |
|
14 | + * @copyright 2012-2015 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 2012-01-04 |
|
18 | + */ |
|
19 | 19 | |
20 | 20 | if (!defined('IS_VALID_PHPMYFAQ')) { |
21 | 21 | exit(); |
@@ -43,6 +43,6 @@ |
||
43 | 43 | */ |
44 | 44 | public function encrypt($str) |
45 | 45 | { |
46 | - return hash('sha256', $str . $this->salt); |
|
46 | + return hash('sha256', $str.$this->salt); |
|
47 | 47 | } |
48 | 48 | } |
49 | 49 | \ No newline at end of file |
@@ -1,21 +1,21 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Provides methods for password encryption using md5(). |
|
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 Enc |
|
13 | - * @author Lars Tiedemann <[email protected]> |
|
14 | - * @copyright 2005-2015 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 2005-09-18 |
|
18 | - */ |
|
3 | + * Provides methods for password encryption using md5(). |
|
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 Enc |
|
13 | + * @author Lars Tiedemann <[email protected]> |
|
14 | + * @copyright 2005-2015 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 2005-09-18 |
|
18 | + */ |
|
19 | 19 | |
20 | 20 | if (!defined('IS_VALID_PHPMYFAQ')) { |
21 | 21 | exit(); |