@@ -22,7 +22,7 @@ |
||
22 | 22 | exit(); |
23 | 23 | } |
24 | 24 | |
25 | -require_once PMF_CONFIG_DIR . '/constants.php'; |
|
25 | +require_once PMF_CONFIG_DIR.'/constants.php'; |
|
26 | 26 | |
27 | 27 | /** |
28 | 28 | * Export Class |
@@ -86,11 +86,11 @@ |
||
86 | 86 | public function sendOpenQuestionAnswered($email, $userName, $url) |
87 | 87 | { |
88 | 88 | $this->mail->addTo($email, $userName); |
89 | - $this->mail->subject = $this->config->get('main.titleFAQ') . ' - ' . $this->pmfStr['msgQuestionAnswered']; |
|
89 | + $this->mail->subject = $this->config->get('main.titleFAQ').' - '.$this->pmfStr['msgQuestionAnswered']; |
|
90 | 90 | $this->mail->message = sprintf( |
91 | 91 | $this->pmfStr['msgMessageQuestionAnswered'], |
92 | 92 | $this->config->get('main.titleFAQ') |
93 | - ) . "\n\r" . $url; |
|
93 | + )."\n\r".$url; |
|
94 | 94 | $this->mail->send(); |
95 | 95 | } |
96 | 96 | } |
97 | 97 | \ No newline at end of file |
@@ -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 | } |
@@ -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 | } |
@@ -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 | } |
@@ -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 | } |
@@ -31,7 +31,7 @@ |
||
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 | /** |
@@ -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; |
@@ -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 |
@@ -292,8 +292,8 @@ |
||
292 | 292 | %sfaquser |
293 | 293 | WHERE |
294 | 294 | user_id = %d", |
295 | - PMF_Db::getTablePrefix(), |
|
296 | - $this->getUserId() |
|
295 | + PMF_Db::getTablePrefix(), |
|
296 | + $this->getUserId() |
|
297 | 297 | ); |
298 | 298 | |
299 | 299 | $res = $this->config->getDb()->query($select); |
@@ -280,7 +280,7 @@ discard block |
||
280 | 280 | if (!isset($_SESSION[PMF_SESSION_ID_TIMESTAMP])) { |
281 | 281 | return 0; |
282 | 282 | } |
283 | - return ($_SERVER['REQUEST_TIME'] - $_SESSION[PMF_SESSION_ID_TIMESTAMP]) / 60; |
|
283 | + return ($_SERVER['REQUEST_TIME'] - $_SESSION[PMF_SESSION_ID_TIMESTAMP])/60; |
|
284 | 284 | } |
285 | 285 | |
286 | 286 | /** |
@@ -329,10 +329,10 @@ discard block |
||
329 | 329 | $oldSessionId = session_id(); |
330 | 330 | if (session_regenerate_id(true)) { |
331 | 331 | $sessionPath = session_save_path(); |
332 | - if (strpos ($sessionPath, ';') !== false) { |
|
333 | - $sessionPath = substr ($sessionPath, strpos ($sessionPath, ';') + 1); |
|
332 | + if (strpos($sessionPath, ';') !== false) { |
|
333 | + $sessionPath = substr($sessionPath, strpos($sessionPath, ';') + 1); |
|
334 | 334 | } |
335 | - $sessionFilename = $sessionPath . '/sess_' . $oldSessionId; |
|
335 | + $sessionFilename = $sessionPath.'/sess_'.$oldSessionId; |
|
336 | 336 | if (@file_exists($sessionFilename)) { |
337 | 337 | @unlink($sessionFilename); |
338 | 338 | } |
@@ -353,7 +353,7 @@ discard block |
||
353 | 353 | PMF_Db::getTablePrefix(), |
354 | 354 | session_id(), |
355 | 355 | $_SERVER['REQUEST_TIME'], |
356 | - $updateLastlogin ? "last_login = '".date('YmdHis', $_SERVER['REQUEST_TIME'])."'," : '', |
|
356 | + $updateLastlogin ? "last_login = '".date('YmdHis', $_SERVER['REQUEST_TIME'])."'," : '', |
|
357 | 357 | $_SERVER['REMOTE_ADDR'], |
358 | 358 | $this->getUserId() |
359 | 359 | ); |
@@ -499,7 +499,7 @@ discard block |
||
499 | 499 | */ |
500 | 500 | public static function getFromCookie(PMF_Configuration $config) |
501 | 501 | { |
502 | - if (! isset($_COOKIE[PMF_Session::PMF_COOKIE_NAME_REMEMBERME])) { |
|
502 | + if (!isset($_COOKIE[PMF_Session::PMF_COOKIE_NAME_REMEMBERME])) { |
|
503 | 503 | return null; |
504 | 504 | } |
505 | 505 | |
@@ -592,7 +592,7 @@ discard block |
||
592 | 592 | */ |
593 | 593 | protected function setSuccess($success) |
594 | 594 | { |
595 | - $this->loginState = (int) $success; |
|
595 | + $this->loginState = (int)$success; |
|
596 | 596 | |
597 | 597 | $update = sprintf(" |
598 | 598 | UPDATE |
@@ -648,6 +648,6 @@ discard block |
||
648 | 648 | */ |
649 | 649 | private function createCsrfToken() |
650 | 650 | { |
651 | - return sha1(microtime() . $this->getLogin()); |
|
651 | + return sha1(microtime().$this->getLogin()); |
|
652 | 652 | } |
653 | 653 | } |
@@ -318,7 +318,7 @@ |
||
318 | 318 | isset($rightData['for_groups']) ? (int)$rightData['for_groups'] : 1 |
319 | 319 | ); |
320 | 320 | |
321 | - if (! $this->config->getDb()->query($insert)) { |
|
321 | + if (!$this->config->getDb()->query($insert)) { |
|
322 | 322 | return 0; |
323 | 323 | } |
324 | 324 |