@@ -1,46 +1,46 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * This class manages user permissions and group memberships. |
|
4 | - * |
|
5 | - * There are three possible extensions of this class: basic, medium and large |
|
6 | - * by the classes PMF_PermBasic, PMF_PermMedium and PMF_PermLarge. The classes |
|
7 | - * to allow for scalability. This means that PMF_PermMedium is an extend of |
|
8 | - * and PMF_PermLarge is an extend of PMF_PermMedium. |
|
9 | - * |
|
10 | - * The permission type can be selected by calling $perm = Perm(perm_type) or |
|
11 | - * static method $perm = Perm::selectPerm(perm_type) where perm_type is |
|
12 | - * 'medium' or 'large'. Both ways, a PMF_PermBasic, PMF_PermMedium or |
|
13 | - * is returned. |
|
14 | - * |
|
15 | - * Before calling any method, the object $perm needs to be initialised calling |
|
16 | - * user_id, context, context_id). The parameters context and context_id are |
|
17 | - * accepted, but do only matter in PMF_PermLarge. In other words, if you have a |
|
18 | - * or PMF_PermMedium, it does not matter if you pass context and context_id or |
|
19 | - * But in PMF_PermLarge, they do make a significant difference if passed, thus |
|
20 | - * for up- and downwards-compatibility. |
|
21 | - * |
|
22 | - * Perhaps the most important method is $perm->checkRight(right_name). This |
|
23 | - * checks whether the user having the user_id set with $perm->setPerm() |
|
24 | - * |
|
25 | - * The permission object is added to a user using the user's addPerm() method. |
|
26 | - * a single permission-object is allowed for each user. The permission-object is |
|
27 | - * in the user's $perm variable. Permission methods are performed using the |
|
28 | - * variable (e.g. $user->perm->method() ). |
|
29 | - * |
|
30 | - * PHP Version 5.3 |
|
31 | - * |
|
32 | - * This Source Code Form is subject to the terms of the Mozilla Public License, |
|
33 | - * v. 2.0. If a copy of the MPL was not distributed with this file, You can |
|
34 | - * obtain one at http://mozilla.org/MPL/2.0/. |
|
35 | - * |
|
36 | - * @category phpMyFAQ |
|
37 | - * @package Perm |
|
38 | - * @author Lars Tiedemann <[email protected]> |
|
39 | - * @copyright 2005-2015 phpMyFAQ Team |
|
40 | - * @license http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0 |
|
41 | - * @link http://www.phpmyfaq.de |
|
42 | - * @since 2005-09-17 |
|
43 | - */ |
|
3 | + * This class manages user permissions and group memberships. |
|
4 | + * |
|
5 | + * There are three possible extensions of this class: basic, medium and large |
|
6 | + * by the classes PMF_PermBasic, PMF_PermMedium and PMF_PermLarge. The classes |
|
7 | + * to allow for scalability. This means that PMF_PermMedium is an extend of |
|
8 | + * and PMF_PermLarge is an extend of PMF_PermMedium. |
|
9 | + * |
|
10 | + * The permission type can be selected by calling $perm = Perm(perm_type) or |
|
11 | + * static method $perm = Perm::selectPerm(perm_type) where perm_type is |
|
12 | + * 'medium' or 'large'. Both ways, a PMF_PermBasic, PMF_PermMedium or |
|
13 | + * is returned. |
|
14 | + * |
|
15 | + * Before calling any method, the object $perm needs to be initialised calling |
|
16 | + * user_id, context, context_id). The parameters context and context_id are |
|
17 | + * accepted, but do only matter in PMF_PermLarge. In other words, if you have a |
|
18 | + * or PMF_PermMedium, it does not matter if you pass context and context_id or |
|
19 | + * But in PMF_PermLarge, they do make a significant difference if passed, thus |
|
20 | + * for up- and downwards-compatibility. |
|
21 | + * |
|
22 | + * Perhaps the most important method is $perm->checkRight(right_name). This |
|
23 | + * checks whether the user having the user_id set with $perm->setPerm() |
|
24 | + * |
|
25 | + * The permission object is added to a user using the user's addPerm() method. |
|
26 | + * a single permission-object is allowed for each user. The permission-object is |
|
27 | + * in the user's $perm variable. Permission methods are performed using the |
|
28 | + * variable (e.g. $user->perm->method() ). |
|
29 | + * |
|
30 | + * PHP Version 5.3 |
|
31 | + * |
|
32 | + * This Source Code Form is subject to the terms of the Mozilla Public License, |
|
33 | + * v. 2.0. If a copy of the MPL was not distributed with this file, You can |
|
34 | + * obtain one at http://mozilla.org/MPL/2.0/. |
|
35 | + * |
|
36 | + * @category phpMyFAQ |
|
37 | + * @package Perm |
|
38 | + * @author Lars Tiedemann <[email protected]> |
|
39 | + * @copyright 2005-2015 phpMyFAQ Team |
|
40 | + * @license http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0 |
|
41 | + * @link http://www.phpmyfaq.de |
|
42 | + * @since 2005-09-17 |
|
43 | + */ |
|
44 | 44 | |
45 | 45 | if (!defined('IS_VALID_PHPMYFAQ')) { |
46 | 46 | exit(); |
@@ -87,7 +87,7 @@ |
||
87 | 87 | public static function selectPerm($permLevel, PMF_Configuration $config) |
88 | 88 | { |
89 | 89 | if (isset($permLevel)) { |
90 | - $permclass = 'PMF_Perm_' . ucfirst(strtolower($permLevel)); |
|
90 | + $permclass = 'PMF_Perm_'.ucfirst(strtolower($permLevel)); |
|
91 | 91 | if (class_exists($permclass)) { |
92 | 92 | return new $permclass($config); |
93 | 93 | } |
@@ -1,21 +1,21 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * The main Rating 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 PMF_Rating |
|
13 | - * @author Thorsten Rinne <[email protected]> |
|
14 | - * @copyright 2007-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 2007-03-31 |
|
18 | - */ |
|
3 | + * The main Rating 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 PMF_Rating |
|
13 | + * @author Thorsten Rinne <[email protected]> |
|
14 | + * @copyright 2007-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 2007-03-31 |
|
18 | + */ |
|
19 | 19 | |
20 | 20 | if (!defined('IS_VALID_PHPMYFAQ')) { |
21 | 21 | exit(); |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | ); |
123 | 123 | break; |
124 | 124 | |
125 | - default: |
|
125 | + default: |
|
126 | 126 | $query = sprintf(" |
127 | 127 | SELECT |
128 | 128 | fd.id AS id, |
@@ -162,12 +162,12 @@ discard block |
||
162 | 162 | $result = $this->_config->getDb()->query($query); |
163 | 163 | while ($row = $this->_config->getDb()->fetchObject($result)) { |
164 | 164 | $ratings[] = array( |
165 | - 'id' => $row->id, |
|
166 | - 'lang' => $row->lang, |
|
167 | - 'category_id' => $row->category_id, |
|
168 | - 'question' => $row->question, |
|
169 | - 'num' => $row->num, |
|
170 | - 'usr' => $row->usr |
|
165 | + 'id' => $row->id, |
|
166 | + 'lang' => $row->lang, |
|
167 | + 'category_id' => $row->category_id, |
|
168 | + 'question' => $row->question, |
|
169 | + 'num' => $row->num, |
|
170 | + 'usr' => $row->usr |
|
171 | 171 | ); |
172 | 172 | } |
173 | 173 | |
@@ -200,8 +200,8 @@ discard block |
||
200 | 200 | ' %s ('.$this->plr->GetMsg('plmsgVotes',$row->usr).')', |
201 | 201 | round($row->voting, 2) |
202 | 202 | ); |
203 | - } else { |
|
203 | + } else { |
|
204 | 204 | return '0 (' . $this->plr->GetMsg('plmsgVotes', 0) . ')'; |
205 | - } |
|
205 | + } |
|
206 | 206 | } |
207 | 207 | } |
@@ -197,11 +197,11 @@ |
||
197 | 197 | if ($this->_config->getDb()->numRows($result) > 0) { |
198 | 198 | $row = $this->_config->getDb()->fetchObject($result); |
199 | 199 | return sprintf( |
200 | - ' %s ('.$this->plr->GetMsg('plmsgVotes',$row->usr).')', |
|
200 | + ' %s ('.$this->plr->GetMsg('plmsgVotes', $row->usr).')', |
|
201 | 201 | round($row->voting, 2) |
202 | 202 | ); |
203 | 203 | } else { |
204 | - return '0 (' . $this->plr->GetMsg('plmsgVotes', 0) . ')'; |
|
204 | + return '0 ('.$this->plr->GetMsg('plmsgVotes', 0).')'; |
|
205 | 205 | } |
206 | 206 | } |
207 | 207 | } |
@@ -1,21 +1,21 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * MUA (Mail User Agent) implementation using the PHP built-in mail() function. |
|
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 Mail |
|
13 | - * @author Matteo Scaramuccia <[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-09-11 |
|
18 | - */ |
|
3 | + * MUA (Mail User Agent) implementation using the PHP built-in mail() function. |
|
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 Mail |
|
13 | + * @author Matteo Scaramuccia <[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-09-11 |
|
18 | + */ |
|
19 | 19 | |
20 | 20 | if (!defined('IS_VALID_PHPMYFAQ')) { |
21 | 21 | exit(); |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | * @license http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0 |
32 | 32 | * @link http://www.phpmyfaq.de |
33 | 33 | * @since 2009-09-11 |
34 | - */ |
|
34 | + */ |
|
35 | 35 | class PMF_Mail_Builtin implements PMF_Mail_IMUA |
36 | 36 | { |
37 | 37 | /** |
@@ -64,14 +64,14 @@ |
||
64 | 64 | // Prepare the headers for the e-mail |
65 | 65 | $mailHeaders = ''; |
66 | 66 | foreach ($headers as $key => $value) { |
67 | - $mailHeaders .= $key . ': ' . $value . PHP_EOL; |
|
67 | + $mailHeaders .= $key.': '.$value.PHP_EOL; |
|
68 | 68 | } |
69 | 69 | |
70 | 70 | // Send the e-mail |
71 | 71 | if (empty($sender)) { |
72 | 72 | return mail($recipients, $subject, $body, $mailHeaders); |
73 | 73 | } else { |
74 | - return mail($recipients, $subject, $body, $mailHeaders, '-f' . $sender); |
|
74 | + return mail($recipients, $subject, $body, $mailHeaders, '-f'.$sender); |
|
75 | 75 | } |
76 | 76 | } |
77 | 77 | } |
@@ -1,21 +1,21 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * MUA (Mail User Agent) interface. |
|
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 Mail |
|
13 | - * @author Matteo Scaramuccia <[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-09-11 |
|
18 | - */ |
|
3 | + * MUA (Mail User Agent) interface. |
|
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 Mail |
|
13 | + * @author Matteo Scaramuccia <[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-09-11 |
|
18 | + */ |
|
19 | 19 | |
20 | 20 | if (!defined('IS_VALID_PHPMYFAQ')) { |
21 | 21 | exit(); |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | * @license http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0 |
32 | 32 | * @link http://www.phpmyfaq.de |
33 | 33 | * @since 2009-09-11 |
34 | - */ |
|
34 | + */ |
|
35 | 35 | interface PMF_Mail_IMUA |
36 | 36 | { |
37 | 37 | /** |
@@ -1,21 +1,21 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Abstract class for various services, e.g. Twitter, Facebook, Digg, ... |
|
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 Services |
|
13 | - * @author Thorsten Rinne <[email protected]> |
|
14 | - * @copyright 2010-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 2010-09-05 |
|
18 | - */ |
|
3 | + * Abstract class for various services, e.g. Twitter, Facebook, Digg, ... |
|
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 Services |
|
13 | + * @author Thorsten Rinne <[email protected]> |
|
14 | + * @copyright 2010-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 2010-09-05 |
|
18 | + */ |
|
19 | 19 | |
20 | 20 | /** |
21 | 21 | * Services |
@@ -160,7 +160,7 @@ |
||
160 | 160 | return sprintf( |
161 | 161 | 'https://twitter.com/share?url=%s&text=%s', |
162 | 162 | urlencode($link->toString()), |
163 | - $this->getQuestion() . urlencode(' | ' . $link->toString()) |
|
163 | + $this->getQuestion().urlencode(' | '.$link->toString()) |
|
164 | 164 | ); |
165 | 165 | } |
166 | 166 |
@@ -1,21 +1,21 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Simple HTTP Streamer |
|
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 PMF_HttpStreamer |
|
13 | - * @author Matteo Scaramuccia <[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-11-02 |
|
18 | - */ |
|
3 | + * Simple HTTP Streamer |
|
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 PMF_HttpStreamer |
|
13 | + * @author Matteo Scaramuccia <[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-11-02 |
|
18 | + */ |
|
19 | 19 | |
20 | 20 | if (!defined('IS_VALID_PHPMYFAQ')) { |
21 | 21 | exit(); |
@@ -209,7 +209,7 @@ discard block |
||
209 | 209 | |
210 | 210 | // Set the correct HTTP headers: |
211 | 211 | // 1. Prevent proxies&browsers caching |
212 | - header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); |
|
212 | + header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); |
|
213 | 213 | header("Expires: 0"); |
214 | 214 | header("Cache-Control: private, no-store, no-cache, must-revalidate, post-check=0, pre-check=0"); |
215 | 215 | header("Pragma: no-cache"); |
@@ -221,13 +221,13 @@ discard block |
||
221 | 221 | header("Content-Type: application/force-download"); |
222 | 222 | } |
223 | 223 | // RFC2616, �19.5.1: $filename must be a quoted-string |
224 | - header("Content-Disposition: " . $this->disposition."; filename=\"" . PMF_Export::getExportTimestamp() . "_" . $filename."\""); |
|
224 | + header("Content-Disposition: ".$this->disposition."; filename=\"".PMF_Export::getExportTimestamp()."_".$filename."\""); |
|
225 | 225 | if (!empty($description)) { |
226 | - header("Content-Description: " . $description); |
|
226 | + header("Content-Description: ".$description); |
|
227 | 227 | } |
228 | 228 | header("Content-Transfer-Encoding: binary"); |
229 | 229 | header("Accept-Ranges: none"); |
230 | - header("Content-Length: " . $this->size); |
|
230 | + header("Content-Length: ".$this->size); |
|
231 | 231 | } |
232 | 232 | |
233 | 233 | /** |
@@ -1,37 +1,37 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Manages user authentication. |
|
4 | - * |
|
5 | - * Subclasses of Auth implement authentication functionality with different |
|
6 | - * types. The class AuthLdap for example provides authentication functionality |
|
7 | - * LDAP-database access, AuthDb with database access. |
|
8 | - * Authentication functionality includes creation of a new login-and-password |
|
9 | - * deletion of an existing login-and-password combination and validation of |
|
10 | - * given by a user. These functions are provided by the database-specific |
|
11 | - * see documentation of the database-specific authentication classes AuthMysql, |
|
12 | - * or AuthLdap for further details. |
|
13 | - * Passwords are usually encrypted before stored in a database. For |
|
14 | - * and security, a password encryption method may be chosen. See documentation |
|
15 | - * Enc class for further details. |
|
16 | - * Instead of calling the database-specific subclasses directly, the static |
|
17 | - * selectDb(dbtype) may be called which returns a valid database-specific |
|
18 | - * object. See documentation of the static method selectDb for further details. |
|
19 | - * |
|
20 | - * PHP Version 5.3 |
|
21 | - * |
|
22 | - * This Source Code Form is subject to the terms of the Mozilla Public License, |
|
23 | - * v. 2.0. If a copy of the MPL was not distributed with this file, You can |
|
24 | - * obtain one at http://mozilla.org/MPL/2.0/. |
|
25 | - * |
|
26 | - * @category phpMyFAQ |
|
27 | - * @package Auth |
|
28 | - * @author Lars Tiedemann <[email protected]> |
|
29 | - * @author Thorsten Rinne <[email protected]> |
|
30 | - * @copyright 2005-2015 phpMyFAQ Team |
|
31 | - * @license http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0 |
|
32 | - * @link http://www.phpmyfaq.de |
|
33 | - * @since 2005-09-30 |
|
34 | - */ |
|
3 | + * Manages user authentication. |
|
4 | + * |
|
5 | + * Subclasses of Auth implement authentication functionality with different |
|
6 | + * types. The class AuthLdap for example provides authentication functionality |
|
7 | + * LDAP-database access, AuthDb with database access. |
|
8 | + * Authentication functionality includes creation of a new login-and-password |
|
9 | + * deletion of an existing login-and-password combination and validation of |
|
10 | + * given by a user. These functions are provided by the database-specific |
|
11 | + * see documentation of the database-specific authentication classes AuthMysql, |
|
12 | + * or AuthLdap for further details. |
|
13 | + * Passwords are usually encrypted before stored in a database. For |
|
14 | + * and security, a password encryption method may be chosen. See documentation |
|
15 | + * Enc class for further details. |
|
16 | + * Instead of calling the database-specific subclasses directly, the static |
|
17 | + * selectDb(dbtype) may be called which returns a valid database-specific |
|
18 | + * object. See documentation of the static method selectDb for further details. |
|
19 | + * |
|
20 | + * PHP Version 5.3 |
|
21 | + * |
|
22 | + * This Source Code Form is subject to the terms of the Mozilla Public License, |
|
23 | + * v. 2.0. If a copy of the MPL was not distributed with this file, You can |
|
24 | + * obtain one at http://mozilla.org/MPL/2.0/. |
|
25 | + * |
|
26 | + * @category phpMyFAQ |
|
27 | + * @package Auth |
|
28 | + * @author Lars Tiedemann <[email protected]> |
|
29 | + * @author Thorsten Rinne <[email protected]> |
|
30 | + * @copyright 2005-2015 phpMyFAQ Team |
|
31 | + * @license http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0 |
|
32 | + * @link http://www.phpmyfaq.de |
|
33 | + * @since 2005-09-30 |
|
34 | + */ |
|
35 | 35 | |
36 | 36 | if (!defined('IS_VALID_PHPMYFAQ')) { |
37 | 37 | exit(); |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | $message = ''; |
131 | 131 | |
132 | 132 | if (!is_array($this->errors)) { |
133 | - $this->errors = array((string) $this->errors); |
|
133 | + $this->errors = array((string)$this->errors); |
|
134 | 134 | } |
135 | 135 | foreach ($this->errors as $error) { |
136 | 136 | $message .= $error."\n"; |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | return $this; |
166 | 166 | } |
167 | 167 | |
168 | - $authClass = 'PMF_Auth_' . $method; |
|
168 | + $authClass = 'PMF_Auth_'.$method; |
|
169 | 169 | if (!class_exists($authClass)) { |
170 | 170 | $this->errors[] = self::PMF_ERROR_USER_NO_AUTHTYPE; |
171 | 171 | return $this; |
@@ -1,21 +1,21 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * The main Comment 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 PMF_Comment |
|
13 | - * @author Thorsten Rinne <[email protected]> |
|
14 | - * @copyright 2006-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 2006-07-23 |
|
18 | - */ |
|
3 | + * The main Comment 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 PMF_Comment |
|
13 | + * @author Thorsten Rinne <[email protected]> |
|
14 | + * @copyright 2006-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 2006-07-23 |
|
18 | + */ |
|
19 | 19 | |
20 | 20 | if (!defined('IS_VALID_PHPMYFAQ')) { |
21 | 21 | exit(); |
@@ -39,14 +39,14 @@ discard block |
||
39 | 39 | * |
40 | 40 | * @const string |
41 | 41 | */ |
42 | - const COMMENT_TYPE_FAQ = 'faq'; |
|
42 | + const COMMENT_TYPE_FAQ = 'faq'; |
|
43 | 43 | |
44 | 44 | /** |
45 | 45 | * News type |
46 | 46 | * |
47 | 47 | * @const string |
48 | 48 | */ |
49 | - const COMMENT_TYPE_NEWS ='news'; |
|
49 | + const COMMENT_TYPE_NEWS = 'news'; |
|
50 | 50 | |
51 | 51 | /** |
52 | 52 | * @var PMF_Configuration |
@@ -182,7 +182,7 @@ discard block |
||
182 | 182 | $mail->safeEmail($item['email']), |
183 | 183 | $item['user'], |
184 | 184 | $this->showShortComment($id, $item['content']), |
185 | - $this->pmfStr['newsCommentDate'] . |
|
185 | + $this->pmfStr['newsCommentDate']. |
|
186 | 186 | $date->format( |
187 | 187 | PMF_Date::createIsoDate($item['date'], 'Y-m-d H:i', false) |
188 | 188 | ) |
@@ -355,12 +355,12 @@ discard block |
||
355 | 355 | |
356 | 356 | $comment = ''; |
357 | 357 | foreach ($words as $word) { |
358 | - $comment .= $word . ' '; |
|
358 | + $comment .= $word.' '; |
|
359 | 359 | if (15 === $numWords) { |
360 | - $comment .= '<span class="comment-dots-' . $id . '">... </span>' . |
|
361 | - '<a onclick="showLongComment(' . $id . ')" class="comment-show-more-' . $id . |
|
362 | - ' pointer">' . $this->pmfStr['msgShowMore'] . '</a>' . |
|
363 | - '<span class="comment-more-' . $id . ' hide">'; |
|
360 | + $comment .= '<span class="comment-dots-'.$id.'">... </span>'. |
|
361 | + '<a onclick="showLongComment('.$id.')" class="comment-show-more-'.$id. |
|
362 | + ' pointer">'.$this->pmfStr['msgShowMore'].'</a>'. |
|
363 | + '<span class="comment-more-'.$id.' hide">'; |
|
364 | 364 | } |
365 | 365 | $numWords++; |
366 | 366 | } |
@@ -368,6 +368,6 @@ discard block |
||
368 | 368 | // Convert URLs to HTML anchors |
369 | 369 | |
370 | 370 | |
371 | - return PMF_Utils::parseUrl($comment) . '</span>'; |
|
371 | + return PMF_Utils::parseUrl($comment).'</span>'; |
|
372 | 372 | } |
373 | 373 | } |
374 | 374 | \ No newline at end of file |
@@ -1,21 +1,21 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Attachment 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 | + * Attachment 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(); |