@@ -21,10 +21,10 @@ discard block |
||
21 | 21 | |
22 | 22 | if (!defined('IS_VALID_PHPMYFAQ')) { |
23 | 23 | $protocol = 'http'; |
24 | - if (isset($_SERVER['HTTPS']) && strtoupper($_SERVER['HTTPS']) === 'ON'){ |
|
24 | + if (isset($_SERVER['HTTPS']) && strtoupper($_SERVER['HTTPS']) === 'ON') { |
|
25 | 25 | $protocol = 'https'; |
26 | 26 | } |
27 | - header('Location: ' . $protocol . '://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['SCRIPT_NAME'])); |
|
27 | + header('Location: '.$protocol.'://'.$_SERVER['HTTP_HOST'].dirname($_SERVER['SCRIPT_NAME'])); |
|
28 | 28 | exit(); |
29 | 29 | } |
30 | 30 | |
@@ -35,13 +35,13 @@ discard block |
||
35 | 35 | $date = new PMF_Date($faqConfig); |
36 | 36 | $perpage = 15; |
37 | 37 | $pages = PMF_Filter::filterInput(INPUT_GET, 'pages', FILTER_VALIDATE_INT); |
38 | - $page = PMF_Filter::filterInput(INPUT_GET, 'page' , FILTER_VALIDATE_INT, 1); |
|
38 | + $page = PMF_Filter::filterInput(INPUT_GET, 'page', FILTER_VALIDATE_INT, 1); |
|
39 | 39 | |
40 | 40 | if (is_null($pages)) { |
41 | - $pages = round(($logging->getNumberOfEntries() + ($perpage / 3)) / $perpage, 0); |
|
41 | + $pages = round(($logging->getNumberOfEntries() + ($perpage/3))/$perpage, 0); |
|
42 | 42 | } |
43 | 43 | |
44 | - $start = ($page - 1) * $perpage; |
|
44 | + $start = ($page - 1)*$perpage; |
|
45 | 45 | $ende = $start + $perpage; |
46 | 46 | |
47 | 47 | $baseUrl = sprintf( |
@@ -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 | |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | <div class="controls"> |
67 | 67 | <?php |
68 | 68 | foreach ($instance->getInstanceConfig($instanceData->id) as $key => $config) { |
69 | - echo '<span class="uneditable-input">' . $key . ': ' . $config . '</span><br/>'; |
|
69 | + echo '<span class="uneditable-input">'.$key.': '.$config.'</span><br/>'; |
|
70 | 70 | } |
71 | 71 | ?> |
72 | 72 | </div> |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | $password = PMF_Filter::filterInput(INPUT_GET, 'password', FILTER_SANITIZE_STRING); |
46 | 46 | |
47 | 47 | $data = array( |
48 | - 'url' => 'http://' . $url . '.' . $_SERVER['SERVER_NAME'], |
|
48 | + 'url' => 'http://'.$url.'.'.$_SERVER['SERVER_NAME'], |
|
49 | 49 | 'instance' => $instance, |
50 | 50 | 'comment' => $comment |
51 | 51 | ); |
@@ -61,12 +61,12 @@ discard block |
||
61 | 61 | |
62 | 62 | if ($faqInstanceClient->createClientFolder($hostname)) { |
63 | 63 | |
64 | - $clientDir = PMF_ROOT_DIR . '/multisite/' . $hostname; |
|
64 | + $clientDir = PMF_ROOT_DIR.'/multisite/'.$hostname; |
|
65 | 65 | $clientSetup = new PMF_Instance_Setup(); |
66 | 66 | $clientSetup->setRootDir($clientDir); |
67 | 67 | |
68 | - $faqInstanceClient->copyConstantsFile($clientDir . '/constants.php'); |
|
69 | - $faqInstanceClient->copyLdapConstantsFile($clientDir . '/constants_ldap.php'); |
|
68 | + $faqInstanceClient->copyConstantsFile($clientDir.'/constants.php'); |
|
69 | + $faqInstanceClient->copyLdapConstantsFile($clientDir.'/constants_ldap.php'); |
|
70 | 70 | |
71 | 71 | $dbSetup = array( |
72 | 72 | 'dbServer' => $DB['server'], |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | ); |
79 | 79 | $clientSetup->createDatabaseFile($dbSetup, ''); |
80 | 80 | |
81 | - $faqInstanceClient->setClientUrl('http://' . $hostname); |
|
81 | + $faqInstanceClient->setClientUrl('http://'.$hostname); |
|
82 | 82 | $faqInstanceClient->createClientTables($dbSetup['dbPrefix']); |
83 | 83 | |
84 | 84 | PMF_Db::setTablePrefix($dbSetup['dbPrefix']); |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | $stopwords->setLanguage($stopwordsLang); |
169 | 169 | if (null !== $stopwordId && -1 < $stopwordId) { |
170 | 170 | echo $stopwords->update($stopwordId, $stopword); |
171 | - } elseif (!$stopwords->match($stopword)){ |
|
171 | + } elseif (!$stopwords->match($stopword)) { |
|
172 | 172 | echo $stopwords->add($stopword); |
173 | 173 | } else { |
174 | 174 |
@@ -19,7 +19,6 @@ |
||
19 | 19 | */ |
20 | 20 | |
21 | 21 | use Symfony\Component\HttpFoundation\JsonResponse; |
22 | - |
|
23 | 22 | use PMF\Helper\ResponseWrapper; |
24 | 23 | if (!defined('IS_VALID_PHPMYFAQ') || !$user->perm->checkRight($user->getUserId(), 'editconfig')) { |
25 | 24 | header('Location: http://'.$_SERVER['HTTP_HOST'].dirname($_SERVER['SCRIPT_NAME'])); |
@@ -19,16 +19,16 @@ |
||
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 | $ajaxAction = PMF_Filter::filterInput(INPUT_GET, 'ajaxaction', FILTER_SANITIZE_STRING); |
30 | 30 | |
31 | -switch($ajaxAction) { |
|
31 | +switch ($ajaxAction) { |
|
32 | 32 | |
33 | 33 | case 'getpermissions': |
34 | 34 |
@@ -19,14 +19,14 @@ 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 | |
29 | -$page = PMF_Filter::filterInput(INPUT_GET, 'page' , FILTER_VALIDATE_INT, 1); |
|
29 | +$page = PMF_Filter::filterInput(INPUT_GET, 'page', FILTER_VALIDATE_INT, 1); |
|
30 | 30 | |
31 | 31 | $glossary = new PMF_Glossary($faqConfig); |
32 | 32 | $glossaryItems = $glossary->getAllGlossaryItems(); |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | if (0 < $numItems) { |
52 | 52 | |
53 | 53 | $output = array(); |
54 | - $visibleItems = array_slice($glossaryItems, ($page - 1) * $itemsPerPage, $itemsPerPage); |
|
54 | + $visibleItems = array_slice($glossaryItems, ($page - 1)*$itemsPerPage, $itemsPerPage); |
|
55 | 55 | |
56 | 56 | foreach ($visibleItems as $item) { |
57 | 57 | $output['item'][] = $item['item']; |
@@ -27,8 +27,8 @@ discard block |
||
27 | 27 | // |
28 | 28 | // Bootstrapping |
29 | 29 | // |
30 | -require PMF_ROOT_DIR . '/inc/Bootstrap.php'; |
|
31 | -require PMF_ROOT_DIR . '/inc/libs/twitteroauth/twitteroauth.php'; |
|
30 | +require PMF_ROOT_DIR.'/inc/Bootstrap.php'; |
|
31 | +require PMF_ROOT_DIR.'/inc/libs/twitteroauth/twitteroauth.php'; |
|
32 | 32 | |
33 | 33 | $connection = new TwitterOAuth( |
34 | 34 | $faqConfig->get('socialnetworks.twitterConsumerKey'), |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | ); |
37 | 37 | |
38 | 38 | $requestToken = $connection->getRequestToken( |
39 | - $faqConfig->get('main.referenceURL') . '/services/twitter/callback.php' |
|
39 | + $faqConfig->get('main.referenceURL').'/services/twitter/callback.php' |
|
40 | 40 | ); |
41 | 41 | |
42 | 42 | $_SESSION['oauth_token'] = $requestToken['oauth_token']; |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | switch ($connection->http_code) { |
46 | 46 | case 200: |
47 | 47 | $url = $connection->getAuthorizeURL($requestToken['oauth_token']); |
48 | - header('Location: ' . $url); |
|
48 | + header('Location: '.$url); |
|
49 | 49 | break; |
50 | 50 | default: |
51 | 51 | print 'Could not connect to Twitter. Refresh the page or try again later.'; |
@@ -27,8 +27,8 @@ |
||
27 | 27 | // |
28 | 28 | // Bootstrapping |
29 | 29 | // |
30 | -require PMF_ROOT_DIR . '/inc/Bootstrap.php'; |
|
31 | -require PMF_ROOT_DIR . '/inc/libs/twitteroauth/twitteroauth.php'; |
|
30 | +require PMF_ROOT_DIR.'/inc/Bootstrap.php'; |
|
31 | +require PMF_ROOT_DIR.'/inc/libs/twitteroauth/twitteroauth.php'; |
|
32 | 32 | |
33 | 33 | $oAuthToken = PMF_Filter::filterInput(INPUT_GET, 'oauth_token', FILTER_SANITIZE_STRING); |
34 | 34 | $oAuthVerifier = PMF_Filter::filterInput(INPUT_GET, 'oauth_verifier', FILTER_SANITIZE_STRING); |
@@ -34,8 +34,8 @@ discard block |
||
34 | 34 | $oAuthVerifier = PMF_Filter::filterInput(INPUT_GET, 'oauth_verifier', FILTER_SANITIZE_STRING); |
35 | 35 | |
36 | 36 | if (!is_null($oAuthToken) && $_SESSION['oauth_token'] !== $oAuthToken) { |
37 | - $_SESSION['oauth_status'] = 'oldtoken'; |
|
38 | - header('Location: ./clearsessions.php'); |
|
37 | + $_SESSION['oauth_status'] = 'oldtoken'; |
|
38 | + header('Location: ./clearsessions.php'); |
|
39 | 39 | } |
40 | 40 | |
41 | 41 | $connection = new TwitterOAuth( |
@@ -52,8 +52,8 @@ discard block |
||
52 | 52 | unset($_SESSION['oauth_token_secret']); |
53 | 53 | |
54 | 54 | if (200 === $connection->http_code) { |
55 | - $_SESSION['status'] = 'verified'; |
|
56 | - header('Location: ./index.php'); |
|
55 | + $_SESSION['status'] = 'verified'; |
|
56 | + header('Location: ./index.php'); |
|
57 | 57 | } else { |
58 | - header('Location: ./clearsessions.php'); |
|
58 | + header('Location: ./clearsessions.php'); |
|
59 | 59 | } |
60 | 60 | \ No newline at end of file |
@@ -27,7 +27,7 @@ |
||
27 | 27 | // |
28 | 28 | // Bootstrapping |
29 | 29 | // |
30 | -require PMF_ROOT_DIR . '/inc/Bootstrap.php'; |
|
30 | +require PMF_ROOT_DIR.'/inc/Bootstrap.php'; |
|
31 | 31 | |
32 | 32 | if ($faqConfig->get('socialnetworks.twitterConsumerKey') === '' || |
33 | 33 | $faqConfig->get('socialnetworks.twitterConsumerSecret') === '') { |
@@ -126,7 +126,7 @@ |
||
126 | 126 | $oLink = new PMF_Link($link, $faqConfig); |
127 | 127 | $oLink->itemTitle = $item['record_title']; |
128 | 128 | $link = $oLink->toString(); |
129 | - } |
|
129 | + } |
|
130 | 130 | } |
131 | 131 | |
132 | 132 | $rss->startElement('item'); |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | // |
26 | 26 | // Bootstrapping |
27 | 27 | // |
28 | -require PMF_ROOT_DIR . '/inc/Bootstrap.php'; |
|
28 | +require PMF_ROOT_DIR.'/inc/Bootstrap.php'; |
|
29 | 29 | |
30 | 30 | // |
31 | 31 | // get language (default: english) |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | PMF_String::init($LANGCODE); |
40 | 40 | |
41 | 41 | // Preload English strings |
42 | -require_once PMF_ROOT_DIR . '/lang/language_en.php'; |
|
42 | +require_once PMF_ROOT_DIR.'/lang/language_en.php'; |
|
43 | 43 | $faqConfig->setLanguage($Language); |
44 | 44 | |
45 | 45 | if ($faqConfig->get('security.enableLoginOnly')) { |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | $rss->startElement('rss'); |
111 | 111 | $rss->writeAttribute('version', '2.0'); |
112 | 112 | $rss->startElement('channel'); |
113 | -$rss->writeElement('title', $faqConfig->get('main.titleFAQ') . ' - '); |
|
113 | +$rss->writeElement('title', $faqConfig->get('main.titleFAQ').' - '); |
|
114 | 114 | $rss->writeElement('description', html_entity_decode($faqConfig->get('main.metaDescription'))); |
115 | 115 | $rss->writeElement('link', $faqConfig->get('main.referenceURL')); |
116 | 116 | |
@@ -129,14 +129,14 @@ discard block |
||
129 | 129 | } |
130 | 130 | |
131 | 131 | $rss->startElement('item'); |
132 | - $rss->writeElement('title', html_entity_decode($item['record_title'] . |
|
133 | - ' (' . $item['visits'] . ' '.$PMF_LANG['msgViews'].')', ENT_COMPAT, 'UTF-8')); |
|
132 | + $rss->writeElement('title', html_entity_decode($item['record_title']. |
|
133 | + ' ('.$item['visits'].' '.$PMF_LANG['msgViews'].')', ENT_COMPAT, 'UTF-8')); |
|
134 | 134 | |
135 | 135 | $rss->startElement('description'); |
136 | 136 | $rss->writeCdata($item['record_preview']); |
137 | 137 | $rss->endElement(); |
138 | 138 | |
139 | - $rss->writeElement('link', $faqConfig->get('main.referenceURL') . $link); |
|
139 | + $rss->writeElement('link', $faqConfig->get('main.referenceURL').$link); |
|
140 | 140 | $rss->writeElement('pubDate', PMF_Date::createRFC822Date($item['record_date'], true)); |
141 | 141 | |
142 | 142 | $rss->endElement(); |