@@ -19,10 +19,10 @@ discard block |
||
19 | 19 | |
20 | 20 | if (!defined('IS_VALID_PHPMYFAQ')) { |
21 | 21 | $protocol = 'http'; |
22 | - if (isset($_SERVER['HTTPS']) && strtoupper($_SERVER['HTTPS']) === 'ON'){ |
|
22 | + if (isset($_SERVER['HTTPS']) && strtoupper($_SERVER['HTTPS']) === 'ON') { |
|
23 | 23 | $protocol = 'https'; |
24 | 24 | } |
25 | - header('Location: ' . $protocol . '://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['SCRIPT_NAME'])); |
|
25 | + header('Location: '.$protocol.'://'.$_SERVER['HTTP_HOST'].dirname($_SERVER['SCRIPT_NAME'])); |
|
26 | 26 | exit(); |
27 | 27 | } |
28 | 28 | |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | 'msgNewTranslationAddon' => $PMF_LANG['msgNewTranslationAddon'], |
84 | 84 | 'msgNewTransSourcePane' => $PMF_LANG['msgNewTransSourcePane'], |
85 | 85 | 'msgNewTranslationPane' => $PMF_LANG['msgNewTranslationPane'], |
86 | - 'writeSendAdress' => '?' . $sids . 'action=save', |
|
86 | + 'writeSendAdress' => '?'.$sids.'action=save', |
|
87 | 87 | 'defaultContentName' => ($user ? $user->getUserData('display_name') : ''), |
88 | 88 | 'defaultContentMail' => ($user ? $user->getUserData('email') : ''), |
89 | 89 | 'msgNewTranslationQuestion' => $PMF_LANG['msgNewContentTheme'], |
@@ -19,11 +19,11 @@ discard block |
||
19 | 19 | |
20 | 20 | define('IS_VALID_PHPMYFAQ', null); |
21 | 21 | |
22 | -require __DIR__ . '/inc/Bootstrap.php'; |
|
23 | -require PMF_LANGUAGE_DIR . '/' . $faqConfig->get('main.language'); |
|
22 | +require __DIR__.'/inc/Bootstrap.php'; |
|
23 | +require PMF_LANGUAGE_DIR.'/'.$faqConfig->get('main.language'); |
|
24 | 24 | |
25 | 25 | $baseUrl = $faqConfig->get('main.referenceURL'); |
26 | -$searchUrl = $baseUrl . '/index.php?action=search'; |
|
26 | +$searchUrl = $baseUrl.'/index.php?action=search'; |
|
27 | 27 | |
28 | 28 | $xml = new XMLWriter(); |
29 | 29 | $xml->openMemory(); |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | $xml->writeElement('Description', $faqConfig->get('main.metaDescription')); |
37 | 37 | $xml->startElement('Url'); |
38 | 38 | $xml->writeAttribute('type', 'text/html'); |
39 | -$xml->writeAttribute('template', $searchUrl . '&search={searchTerms}'); |
|
39 | +$xml->writeAttribute('template', $searchUrl.'&search={searchTerms}'); |
|
40 | 40 | $xml->endElement(); |
41 | 41 | $xml->writeElement('Language', $PMF_LANG['metaLanguage']); |
42 | 42 | $xml->writeElement('OutputEncoding', 'utf-8'); |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | $xml->writeAttribute('height', 16); |
46 | 46 | $xml->writeAttribute('width', 16); |
47 | 47 | $xml->writeAttribute('type', 'image/png'); |
48 | -$xml->text($baseUrl . '/assets/img/pmfsearch.png'); |
|
48 | +$xml->text($baseUrl.'/assets/img/pmfsearch.png'); |
|
49 | 49 | |
50 | 50 | $xml->endDocument(); |
51 | 51 |
@@ -19,10 +19,10 @@ discard block |
||
19 | 19 | |
20 | 20 | if (!defined('IS_VALID_PHPMYFAQ')) { |
21 | 21 | $protocol = 'http'; |
22 | - if (isset($_SERVER['HTTPS']) && strtoupper($_SERVER['HTTPS']) === 'ON'){ |
|
22 | + if (isset($_SERVER['HTTPS']) && strtoupper($_SERVER['HTTPS']) === 'ON') { |
|
23 | 23 | $protocol = 'https'; |
24 | 24 | } |
25 | - header('Location: ' . $protocol . '://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['SCRIPT_NAME'])); |
|
25 | + header('Location: '.$protocol.'://'.$_SERVER['HTTP_HOST'].dirname($_SERVER['SCRIPT_NAME'])); |
|
26 | 26 | exit(); |
27 | 27 | } |
28 | 28 | |
@@ -106,9 +106,9 @@ discard block |
||
106 | 106 | // Before a redirection we must force the PHP session update for preventing data loss |
107 | 107 | session_write_close(); |
108 | 108 | if ($faqConfig->get('main.enableRewriteRules')) { |
109 | - header('Location: ' . $faqConfig->get('main.referenceURL') . '/solution_id_' . $inputSearchTerm . '.html'); |
|
109 | + header('Location: '.$faqConfig->get('main.referenceURL').'/solution_id_'.$inputSearchTerm.'.html'); |
|
110 | 110 | } else { |
111 | - header('Location: ' . $faqConfig->get('main.referenceURL') . '/index.php?solution_id=' . $inputSearchTerm); |
|
111 | + header('Location: '.$faqConfig->get('main.referenceURL').'/index.php?solution_id='.$inputSearchTerm); |
|
112 | 112 | } |
113 | 113 | exit(); |
114 | 114 | } |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | } else { |
130 | 130 | $baseUrl = sprintf('%s?%saction=search&search=%s&seite=%d%s&searchcategory=%d', |
131 | 131 | PMF_Link::getSystemRelativeUri(), |
132 | - empty($sids) ? '' : 'sids=' . $sids . '&', |
|
132 | + empty($sids) ? '' : 'sids='.$sids.'&', |
|
133 | 133 | urlencode($inputSearchTerm), |
134 | 134 | $page, |
135 | 135 | $languages, |
@@ -1,21 +1,21 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * The fulltext search page |
|
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 Frontend |
|
13 | - * @author Thorsten Rinne <[email protected]> |
|
14 | - * @copyright 2002-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 2002-09-16 |
|
18 | - */ |
|
3 | + * The fulltext search page |
|
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 Frontend |
|
13 | + * @author Thorsten Rinne <[email protected]> |
|
14 | + * @copyright 2002-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 2002-09-16 |
|
18 | + */ |
|
19 | 19 | |
20 | 20 | if (!defined('IS_VALID_PHPMYFAQ')) { |
21 | 21 | $protocol = 'http'; |
@@ -602,8 +602,8 @@ discard block |
||
602 | 602 | |
603 | 603 | $message = array( |
604 | 604 | 'success' => trim($PMF_LANG['successMessage']) . |
605 | - ' ' . |
|
606 | - trim($PMF_LANG['msgRegThankYou']) |
|
605 | + ' ' . |
|
606 | + trim($PMF_LANG['msgRegThankYou']) |
|
607 | 607 | ); |
608 | 608 | } |
609 | 609 | |
@@ -698,7 +698,7 @@ discard block |
||
698 | 698 | $mailto = PMF_Filter::filterInputArray(INPUT_POST, |
699 | 699 | array('mailto' => |
700 | 700 | array('filter' => FILTER_VALIDATE_EMAIL, |
701 | - 'flags' => FILTER_REQUIRE_ARRAY | FILTER_NULL_ON_FAILURE |
|
701 | + 'flags' => FILTER_REQUIRE_ARRAY | FILTER_NULL_ON_FAILURE |
|
702 | 702 | ) |
703 | 703 | ) |
704 | 704 | ); |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | |
37 | 37 | if (PMF_Language::isASupportedLanguage($ajaxlang)) { |
38 | 38 | $languageCode = trim($ajaxlang); |
39 | - require_once 'lang/language_' . $languageCode . '.php'; |
|
39 | + require_once 'lang/language_'.$languageCode.'.php'; |
|
40 | 40 | } else { |
41 | 41 | $languageCode = 'en'; |
42 | 42 | require_once 'lang/language_en.php'; |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | // Check, if user is logged in |
83 | 83 | // |
84 | 84 | $user = PMF_User_CurrentUser::getFromCookie($faqConfig); |
85 | -if (! $user instanceof PMF_User_CurrentUser) { |
|
85 | +if (!$user instanceof PMF_User_CurrentUser) { |
|
86 | 86 | $user = PMF_User_CurrentUser::getFromSession($faqConfig); |
87 | 87 | } |
88 | 88 | if ($user instanceof PMF_User_CurrentUser) { |
@@ -199,9 +199,9 @@ discard block |
||
199 | 199 | } |
200 | 200 | |
201 | 201 | $commentMail = |
202 | - 'User: ' . $commentData['username'] . ', mailto:'. $commentData['usermail'] . "\n". |
|
203 | - 'New comment posted on: ' . $urlToContent . |
|
204 | - "\n\n" . |
|
202 | + 'User: '.$commentData['username'].', mailto:'.$commentData['usermail']."\n". |
|
203 | + 'New comment posted on: '.$urlToContent. |
|
204 | + "\n\n". |
|
205 | 205 | wordwrap($comment, 72); |
206 | 206 | |
207 | 207 | $send = array(); |
@@ -392,9 +392,9 @@ discard block |
||
392 | 392 | |
393 | 393 | // @todo let the email contains the faq article both as plain text and as HTML |
394 | 394 | $mail->message = html_entity_decode( |
395 | - $PMF_LANG['msgMailCheck']) . "\n\n" . |
|
396 | - $faqConfig->get('main.titleFAQ') . ": " . |
|
397 | - $faqConfig->get('main.referenceURL') . '/admin/'; |
|
395 | + $PMF_LANG['msgMailCheck'])."\n\n". |
|
396 | + $faqConfig->get('main.titleFAQ').": ". |
|
397 | + $faqConfig->get('main.referenceURL').'/admin/'; |
|
398 | 398 | $result = $mail->send(); |
399 | 399 | unset($mail); |
400 | 400 | |
@@ -457,7 +457,7 @@ discard block |
||
457 | 457 | $searchResult[] = $faqSearch->search($word); |
458 | 458 | } |
459 | 459 | foreach ($searchResult as $resultSet) { |
460 | - foreach($resultSet as $result) { |
|
460 | + foreach ($resultSet as $result) { |
|
461 | 461 | $mergedResult[] = $result; |
462 | 462 | } |
463 | 463 | } |
@@ -494,11 +494,11 @@ discard block |
||
494 | 494 | |
495 | 495 | $faq->addQuestion($questionData); |
496 | 496 | |
497 | - $questionMail = "User: " . $questionData['username'] . |
|
498 | - ", mailto:".$questionData['email'] . "\n" . $PMF_LANG["msgCategory"] . |
|
499 | - ": " . $categories[$questionData['category_id']]["name"] . "\n\n" . |
|
500 | - wordwrap($question, 72) . "\n\n" . |
|
501 | - $faqConfig->get('main.referenceURL') . '/admin/'; |
|
497 | + $questionMail = "User: ".$questionData['username']. |
|
498 | + ", mailto:".$questionData['email']."\n".$PMF_LANG["msgCategory"]. |
|
499 | + ": ".$categories[$questionData['category_id']]["name"]."\n\n". |
|
500 | + wordwrap($question, 72)."\n\n". |
|
501 | + $faqConfig->get('main.referenceURL').'/admin/'; |
|
502 | 502 | |
503 | 503 | $userId = $cat->getCategoryUser($questionData['category_id']); |
504 | 504 | $oUser = new PMF_User($faqConfig); |
@@ -526,11 +526,11 @@ discard block |
||
526 | 526 | |
527 | 527 | $faq->addQuestion($questionData); |
528 | 528 | |
529 | - $questionMail = "User: " . $questionData['username'] . |
|
530 | - ", mailto:".$questionData['email'] . "\n" . $PMF_LANG["msgCategory"] . |
|
531 | - ": " . $categories[$questionData['category_id']]["name"] . "\n\n" . |
|
532 | - wordwrap($question, 72) . "\n\n" . |
|
533 | - $faqConfig->get('main.referenceURL') . '/admin/'; |
|
529 | + $questionMail = "User: ".$questionData['username']. |
|
530 | + ", mailto:".$questionData['email']."\n".$PMF_LANG["msgCategory"]. |
|
531 | + ": ".$categories[$questionData['category_id']]["name"]."\n\n". |
|
532 | + wordwrap($question, 72)."\n\n". |
|
533 | + $faqConfig->get('main.referenceURL').'/admin/'; |
|
534 | 534 | |
535 | 535 | $userId = $cat->getCategoryUser($questionData['category_id']); |
536 | 536 | $oUser = new PMF_User($faqConfig); |
@@ -585,7 +585,7 @@ discard block |
||
585 | 585 | $user->setStatus('blocked'); |
586 | 586 | |
587 | 587 | $text = sprintf( |
588 | - "New user has been registrated:\n\nName: %s\nLogin name: %s\n\n" . |
|
588 | + "New user has been registrated:\n\nName: %s\nLogin name: %s\n\n". |
|
589 | 589 | "To activate this user do please use the administration interface at %s.", |
590 | 590 | $realname, |
591 | 591 | $loginname, |
@@ -601,8 +601,8 @@ discard block |
||
601 | 601 | unset($mail); |
602 | 602 | |
603 | 603 | $message = array( |
604 | - 'success' => trim($PMF_LANG['successMessage']) . |
|
605 | - ' ' . |
|
604 | + 'success' => trim($PMF_LANG['successMessage']). |
|
605 | + ' '. |
|
606 | 606 | trim($PMF_LANG['msgRegThankYou']) |
607 | 607 | ); |
608 | 608 | } |
@@ -630,7 +630,7 @@ discard block |
||
630 | 630 | |
631 | 631 | if (!$faq->getNumberOfVotings($recordId)) { |
632 | 632 | $faq->addVoting($votingData); |
633 | - } else { |
|
633 | + } else { |
|
634 | 634 | $faq->updateVoting($votingData); |
635 | 635 | } |
636 | 636 | $faqRating = new PMF_Rating($faqConfig); |
@@ -676,7 +676,7 @@ discard block |
||
676 | 676 | $mail = new PMF_Mail($faqConfig); |
677 | 677 | $mail->setReplyTo($email, $name); |
678 | 678 | $mail->addTo($faqConfig->get('main.administrationMail')); |
679 | - $mail->subject = 'Feedback: %sitename%';; |
|
679 | + $mail->subject = 'Feedback: %sitename%'; ; |
|
680 | 680 | $mail->message = $question; |
681 | 681 | $result = $mail->send(); |
682 | 682 | unset($mail); |
@@ -707,7 +707,7 @@ discard block |
||
707 | 707 | is_array($mailto) && !empty($mailto['mailto'][0]) && |
708 | 708 | $stopwords->checkBannedWord(PMF_String::htmlspecialchars($attached))) { |
709 | 709 | |
710 | - foreach($mailto['mailto'] as $recipient) { |
|
710 | + foreach ($mailto['mailto'] as $recipient) { |
|
711 | 711 | $recipient = trim(strip_tags($recipient)); |
712 | 712 | if (!empty($recipient)) { |
713 | 713 | $mail = new PMF_Mail($faqConfig); |
@@ -797,16 +797,16 @@ discard block |
||
797 | 797 | |
798 | 798 | if ($loginExist && ($email == $user->getUserData('email'))) { |
799 | 799 | $consonants = array( |
800 | - 'b','c','d','f','g','h','j','k','l','m','n','p','r','s','t','v','w','x','y','z' |
|
800 | + 'b', 'c', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'm', 'n', 'p', 'r', 's', 't', 'v', 'w', 'x', 'y', 'z' |
|
801 | 801 | ); |
802 | 802 | $vowels = array( |
803 | - 'a','e','i','o','u' |
|
803 | + 'a', 'e', 'i', 'o', 'u' |
|
804 | 804 | ); |
805 | 805 | $newPassword = ''; |
806 | 806 | srand((double)microtime()*1000000); |
807 | 807 | for ($i = 1; $i <= 4; $i++) { |
808 | - $newPassword .= $consonants[rand(0,19)]; |
|
809 | - $newPassword .= $vowels[rand(0,4)]; |
|
808 | + $newPassword .= $consonants[rand(0, 19)]; |
|
809 | + $newPassword .= $vowels[rand(0, 4)]; |
|
810 | 810 | } |
811 | 811 | $user->changePassword($newPassword); |
812 | 812 | $text = $PMF_LANG['lostpwd_text_1']."\nUsername: ".$username."\nNew Password: ".$newPassword."\n\n".$PMF_LANG["lostpwd_text_2"]; |
@@ -630,7 +630,7 @@ |
||
630 | 630 | |
631 | 631 | if (!$faq->getNumberOfVotings($recordId)) { |
632 | 632 | $faq->addVoting($votingData); |
633 | - } else { |
|
633 | + } else { |
|
634 | 634 | $faq->updateVoting($votingData); |
635 | 635 | } |
636 | 636 | $faqRating = new PMF_Rating($faqConfig); |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | */ |
20 | 20 | |
21 | 21 | // Datamapping - in this example for an ADS |
22 | -$PMF_LDAP['ldap_mapping'] = array ( |
|
22 | +$PMF_LDAP['ldap_mapping'] = array( |
|
23 | 23 | 'name' => 'cn', |
24 | 24 | 'username' => 'samAccountName', |
25 | 25 | 'mail' => 'mail' |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | |
33 | 33 | // LDAP-options to set |
34 | 34 | // refer to the documentation of ldap_set_option() for information on available options |
35 | -$PMF_LDAP["ldap_options"] = array ( |
|
35 | +$PMF_LDAP["ldap_options"] = array( |
|
36 | 36 | LDAP_OPT_PROTOCOL_VERSION => 3, |
37 | 37 | LDAP_OPT_REFERRALS => 0 |
38 | 38 | ); |
@@ -1,22 +1,22 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * LDAP constants 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 PMF_Ldap |
|
13 | - * @author Lars Scheithauer <[email protected]> |
|
14 | - * @author Thorsten Rinne <[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-08-05 |
|
19 | - */ |
|
3 | + * LDAP constants 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 PMF_Ldap |
|
13 | + * @author Lars Scheithauer <[email protected]> |
|
14 | + * @author Thorsten Rinne <[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-08-05 |
|
19 | + */ |
|
20 | 20 | |
21 | 21 | // Datamapping - in this example for an ADS |
22 | 22 | $PMF_LDAP['ldap_mapping'] = array ( |
@@ -20,10 +20,10 @@ discard block |
||
20 | 20 | |
21 | 21 | if (!defined('IS_VALID_PHPMYFAQ')) { |
22 | 22 | $protocol = 'http'; |
23 | - if (isset($_SERVER['HTTPS']) && strtoupper($_SERVER['HTTPS']) === 'ON'){ |
|
23 | + if (isset($_SERVER['HTTPS']) && strtoupper($_SERVER['HTTPS']) === 'ON') { |
|
24 | 24 | $protocol = 'https'; |
25 | 25 | } |
26 | - header('Location: ' . $protocol . '://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['SCRIPT_NAME'])); |
|
26 | + header('Location: '.$protocol.'://'.$_SERVER['HTTP_HOST'].dirname($_SERVER['SCRIPT_NAME'])); |
|
27 | 27 | exit(); |
28 | 28 | } |
29 | 29 | |
@@ -198,7 +198,7 @@ discard block |
||
198 | 198 | '%', |
199 | 199 | '%%', |
200 | 200 | PMF_Link::getSystemRelativeUri('index.php') |
201 | - ) . 'index.php?%saction=translate&cat=%s&id=%d&srclang=%s', |
|
201 | + ).'index.php?%saction=translate&cat=%s&id=%d&srclang=%s', |
|
202 | 202 | $sids, |
203 | 203 | $currentCategory, |
204 | 204 | $recordId, |
@@ -232,7 +232,7 @@ discard block |
||
232 | 232 | 'writeContent', |
233 | 233 | 'tagsAvailable', |
234 | 234 | array( |
235 | - 'renderTags' => $PMF_LANG['msg_tags'] . ': ' . $faqTagging->getAllLinkTagsById($recordId) |
|
235 | + 'renderTags' => $PMF_LANG['msg_tags'].': '.$faqTagging->getAllLinkTagsById($recordId) |
|
236 | 236 | ) |
237 | 237 | ); |
238 | 238 | } |
@@ -268,12 +268,12 @@ discard block |
||
268 | 268 | 'baseHref' => $faqSystem->getSystemUri($faqConfig), |
269 | 269 | 'writeRubrik' => $categoryName, |
270 | 270 | 'solution_id' => $faq->faqRecord['solution_id'], |
271 | - 'solution_id_link' => PMF_Link::getSystemRelativeUri() . '?solution_id=' . $faq->faqRecord['solution_id'], |
|
271 | + 'solution_id_link' => PMF_Link::getSystemRelativeUri().'?solution_id='.$faq->faqRecord['solution_id'], |
|
272 | 272 | 'writeThema' => $question, |
273 | 273 | 'writeContent' => $answer, |
274 | - 'writeDateMsg' => '<dt>' . $PMF_LANG['msgLastUpdateArticle'] . '</dt><dd>' . $date->format($faq->faqRecord['date']) . '</dd>', |
|
275 | - 'writeRevision' => '<dt>' . $PMF_LANG['ad_entry_revision'] . ':</dt><dd>1.' . $faq->faqRecord['revision_id'] . '</dd>', |
|
276 | - 'writeAuthor' => '<dt>' . $PMF_LANG['msgAuthor'] . ':</dt><dd>' . $faq->faqRecord['author'] . '</dd>', |
|
274 | + 'writeDateMsg' => '<dt>'.$PMF_LANG['msgLastUpdateArticle'].'</dt><dd>'.$date->format($faq->faqRecord['date']).'</dd>', |
|
275 | + 'writeRevision' => '<dt>'.$PMF_LANG['ad_entry_revision'].':</dt><dd>1.'.$faq->faqRecord['revision_id'].'</dd>', |
|
276 | + 'writeAuthor' => '<dt>'.$PMF_LANG['msgAuthor'].':</dt><dd>'.$faq->faqRecord['author'].'</dd>', |
|
277 | 277 | 'editThisEntry' => $editThisEntry, |
278 | 278 | 'translationUrl' => $translationUrl, |
279 | 279 | 'languageSelection' => PMF_Language::selectLanguages($LANGCODE, false, $availableLanguages, 'translation'), |
@@ -283,7 +283,7 @@ discard block |
||
283 | 283 | '%', |
284 | 284 | '%%', |
285 | 285 | PMF_Link::getSystemRelativeUri('index.php') |
286 | - ) . 'index.php?%saction=savevoting', |
|
286 | + ).'index.php?%saction=savevoting', |
|
287 | 287 | $sids |
288 | 288 | ), |
289 | 289 | 'saveVotingID' => $recordId, |
@@ -307,7 +307,7 @@ discard block |
||
307 | 307 | 'defaultContentName' => ($user instanceof PMF_User_CurrentUser) ? $user->getUserData('display_name') : '', |
308 | 308 | 'msgYourComment' => $PMF_LANG['msgYourComment'], |
309 | 309 | 'msgNewContentSubmit' => $PMF_LANG['msgNewContentSubmit'], |
310 | - 'captchaFieldset' => $captchaHelper->renderCaptcha($captcha, 'writecomment',$PMF_LANG['msgCaptcha'], $auth), |
|
310 | + 'captchaFieldset' => $captchaHelper->renderCaptcha($captcha, 'writecomment', $PMF_LANG['msgCaptcha'], $auth), |
|
311 | 311 | 'writeComments' => $faqComment->getComments($recordId, PMF_Comment::COMMENT_TYPE_FAQ), |
312 | 312 | 'msg_about_faq' => $PMF_LANG['msg_about_faq'] |
313 | 313 | ) |
@@ -19,17 +19,17 @@ |
||
19 | 19 | |
20 | 20 | if (!defined('IS_VALID_PHPMYFAQ')) { |
21 | 21 | $protocol = 'http'; |
22 | - if (isset($_SERVER['HTTPS']) && strtoupper($_SERVER['HTTPS']) === 'ON'){ |
|
22 | + if (isset($_SERVER['HTTPS']) && strtoupper($_SERVER['HTTPS']) === 'ON') { |
|
23 | 23 | $protocol = 'https'; |
24 | 24 | } |
25 | - header('Location: ' . $protocol . '://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['SCRIPT_NAME'])); |
|
25 | + header('Location: '.$protocol.'://'.$_SERVER['HTTP_HOST'].dirname($_SERVER['SCRIPT_NAME'])); |
|
26 | 26 | exit(); |
27 | 27 | } |
28 | 28 | |
29 | 29 | $captcha = new PMF_Captcha($faqConfig); |
30 | 30 | $captcha->setSessionId($sids); |
31 | 31 | |
32 | -if (! is_null($showCaptcha)) { |
|
32 | +if (!is_null($showCaptcha)) { |
|
33 | 33 | $captcha->showCaptchaImg(); |
34 | 34 | exit; |
35 | 35 | } |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | $changeFreq = PMF_SITEMAP_GOOGLE_CHANGEFREQ_DAILY; |
71 | 71 | } |
72 | 72 | $node = |
73 | - '<url>' |
|
73 | + '<url>' |
|
74 | 74 | .'<loc>'.PMF_String::htmlspecialchars($location).'</loc>' |
75 | 75 | .'<lastmod>'.$lastmod.'</lastmod>' |
76 | 76 | .'<changefreq>'.$changeFreq.'</changefreq>' |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | |
102 | 102 | // Sitemap header |
103 | 103 | $sitemap = |
104 | - '<?xml version="1.0" encoding="UTF-8"?>' |
|
104 | + '<?xml version="1.0" encoding="UTF-8"?>' |
|
105 | 105 | .'<urlset xmlns="http://www.google.com/schemas/sitemap/0.84"' |
106 | 106 | .' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"' |
107 | 107 | .' xsi:schemaLocation="http://www.google.com/schemas/sitemap/0.84' |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | $visitMin = 0; |
97 | 97 | if (count($items) > 0) { |
98 | 98 | $visitsMax = $items[0]['visits']; |
99 | - $visitMin = $items[count($items)-1]['visits']; |
|
99 | + $visitMin = $items[count($items) - 1]['visits']; |
|
100 | 100 | } |
101 | 101 | |
102 | 102 | // Sitemap header |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | foreach ($items as $item) { |
119 | 119 | $priority = PMF_SITEMAP_GOOGLE_PRIORITY_DEFAULT; |
120 | 120 | if (($visitsMax - $visitMin) > 0) { |
121 | - $priority = sprintf('%.1f', PMF_SITEMAP_GOOGLE_PRIORITY_DEFAULT * (1 + (($item['visits'] - $visitMin)/($visitsMax - $visitMin)))); |
|
121 | + $priority = sprintf('%.1f', PMF_SITEMAP_GOOGLE_PRIORITY_DEFAULT*(1 + (($item['visits'] - $visitMin)/($visitsMax - $visitMin)))); |
|
122 | 122 | } |
123 | 123 | // a. We use plain PMF urls w/o any SEO schema |
124 | 124 | $link = str_replace($_SERVER['SCRIPT_NAME'], '/index.php', $item['url']); |
@@ -1,33 +1,33 @@ |
||
1 | 1 | <?php |
2 | - /** |
|
3 | - * ajax preview |
|
4 | - * @author Logan Cai (cailongqun [at] yahoo [dot] com [dot] cn) |
|
5 | - * @link www.phpletter.com |
|
6 | - * @since 22/April/2007 |
|
7 | - * |
|
8 | - */ |
|
9 | - include_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "inc" . DIRECTORY_SEPARATOR . "config.php"); |
|
10 | - if(!empty($_GET['path']) && file_exists($_GET['path']) && is_file($_GET['path'])) |
|
11 | - { |
|
12 | - include_once(CLASS_IMAGE); |
|
13 | - $image = new Image(true); |
|
14 | - if($image->loadImage($_GET['path'])) |
|
15 | - { |
|
16 | - if($image->resize(CONFIG_IMG_THUMBNAIL_MAX_X, CONFIG_IMG_THUMBNAIL_MAX_Y, true, true)) |
|
17 | - { |
|
18 | - $image->showImage(); |
|
19 | - }else |
|
20 | - { |
|
21 | - echo PREVIEW_NOT_PREVIEW . "."; |
|
22 | - } |
|
23 | - }else |
|
24 | - { |
|
25 | - echo PREVIEW_NOT_PREVIEW . ".."; |
|
26 | - } |
|
2 | + /** |
|
3 | + * ajax preview |
|
4 | + * @author Logan Cai (cailongqun [at] yahoo [dot] com [dot] cn) |
|
5 | + * @link www.phpletter.com |
|
6 | + * @since 22/April/2007 |
|
7 | + * |
|
8 | + */ |
|
9 | + include_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "inc" . DIRECTORY_SEPARATOR . "config.php"); |
|
10 | + if(!empty($_GET['path']) && file_exists($_GET['path']) && is_file($_GET['path'])) |
|
11 | + { |
|
12 | + include_once(CLASS_IMAGE); |
|
13 | + $image = new Image(true); |
|
14 | + if($image->loadImage($_GET['path'])) |
|
15 | + { |
|
16 | + if($image->resize(CONFIG_IMG_THUMBNAIL_MAX_X, CONFIG_IMG_THUMBNAIL_MAX_Y, true, true)) |
|
17 | + { |
|
18 | + $image->showImage(); |
|
19 | + }else |
|
20 | + { |
|
21 | + echo PREVIEW_NOT_PREVIEW . "."; |
|
22 | + } |
|
23 | + }else |
|
24 | + { |
|
25 | + echo PREVIEW_NOT_PREVIEW . ".."; |
|
26 | + } |
|
27 | 27 | |
28 | 28 | |
29 | - }else |
|
30 | - { |
|
31 | - echo PREVIEW_NOT_PREVIEW . "..."; |
|
32 | - } |
|
29 | + }else |
|
30 | + { |
|
31 | + echo PREVIEW_NOT_PREVIEW . "..."; |
|
32 | + } |
|
33 | 33 |
@@ -6,28 +6,28 @@ |
||
6 | 6 | * @since 22/April/2007 |
7 | 7 | * |
8 | 8 | */ |
9 | - include_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "inc" . DIRECTORY_SEPARATOR . "config.php"); |
|
10 | - if(!empty($_GET['path']) && file_exists($_GET['path']) && is_file($_GET['path'])) |
|
9 | + include_once(dirname(__FILE__).DIRECTORY_SEPARATOR."inc".DIRECTORY_SEPARATOR."config.php"); |
|
10 | + if (!empty($_GET['path']) && file_exists($_GET['path']) && is_file($_GET['path'])) |
|
11 | 11 | { |
12 | 12 | include_once(CLASS_IMAGE); |
13 | 13 | $image = new Image(true); |
14 | - if($image->loadImage($_GET['path'])) |
|
14 | + if ($image->loadImage($_GET['path'])) |
|
15 | 15 | { |
16 | - if($image->resize(CONFIG_IMG_THUMBNAIL_MAX_X, CONFIG_IMG_THUMBNAIL_MAX_Y, true, true)) |
|
16 | + if ($image->resize(CONFIG_IMG_THUMBNAIL_MAX_X, CONFIG_IMG_THUMBNAIL_MAX_Y, true, true)) |
|
17 | 17 | { |
18 | 18 | $image->showImage(); |
19 | - }else |
|
19 | + } else |
|
20 | 20 | { |
21 | - echo PREVIEW_NOT_PREVIEW . "."; |
|
21 | + echo PREVIEW_NOT_PREVIEW."."; |
|
22 | 22 | } |
23 | - }else |
|
23 | + } else |
|
24 | 24 | { |
25 | - echo PREVIEW_NOT_PREVIEW . ".."; |
|
25 | + echo PREVIEW_NOT_PREVIEW.".."; |
|
26 | 26 | } |
27 | 27 | |
28 | 28 | |
29 | - }else |
|
29 | + } else |
|
30 | 30 | { |
31 | - echo PREVIEW_NOT_PREVIEW . "..."; |
|
31 | + echo PREVIEW_NOT_PREVIEW."..."; |
|
32 | 32 | } |
33 | 33 |
@@ -16,17 +16,17 @@ |
||
16 | 16 | if($image->resize(CONFIG_IMG_THUMBNAIL_MAX_X, CONFIG_IMG_THUMBNAIL_MAX_Y, true, true)) |
17 | 17 | { |
18 | 18 | $image->showImage(); |
19 | - }else |
|
19 | + } else |
|
20 | 20 | { |
21 | 21 | echo PREVIEW_NOT_PREVIEW . "."; |
22 | 22 | } |
23 | - }else |
|
23 | + } else |
|
24 | 24 | { |
25 | 25 | echo PREVIEW_NOT_PREVIEW . ".."; |
26 | 26 | } |
27 | 27 | |
28 | 28 | |
29 | - }else |
|
29 | + } else |
|
30 | 30 | { |
31 | 31 | echo PREVIEW_NOT_PREVIEW . "..."; |
32 | 32 | } |