@@ -23,10 +23,10 @@ discard block |
||
23 | 23 | |
24 | 24 | if (!defined('IS_VALID_PHPMYFAQ')) { |
25 | 25 | $protocol = 'http'; |
26 | - if (isset($_SERVER['HTTPS']) && strtoupper($_SERVER['HTTPS']) === 'ON'){ |
|
26 | + if (isset($_SERVER['HTTPS']) && strtoupper($_SERVER['HTTPS']) === 'ON') { |
|
27 | 27 | $protocol = 'https'; |
28 | 28 | } |
29 | - header('Location: ' . $protocol . '://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['SCRIPT_NAME'])); |
|
29 | + header('Location: '.$protocol.'://'.$_SERVER['HTTP_HOST'].dirname($_SERVER['SCRIPT_NAME'])); |
|
30 | 30 | exit(); |
31 | 31 | } |
32 | 32 | |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | $newsId = PMF_Filter::filterInput(INPUT_GET, 'newsid', FILTER_VALIDATE_INT); |
44 | 44 | |
45 | 45 | if (is_null($newsId)) { |
46 | - RedirectResponse::create('http://'.$_SERVER['HTTP_HOST'] . dirname($_SERVER['SCRIPT_NAME'])) |
|
46 | + RedirectResponse::create('http://'.$_SERVER['HTTP_HOST'].dirname($_SERVER['SCRIPT_NAME'])) |
|
47 | 47 | ->send(); |
48 | 48 | exit; |
49 | 49 | } |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | } |
56 | 56 | |
57 | 57 | // Define the header of the page |
58 | -$newsMainHeader = $faqConfig->get('main.titleFAQ') . $PMF_LANG['msgNews']; |
|
58 | +$newsMainHeader = $faqConfig->get('main.titleFAQ').$PMF_LANG['msgNews']; |
|
59 | 59 | if ($faqConfig->get('main.enableRssFeeds')) { |
60 | 60 | $newsFeed = ' <a href="feed/news/rss.php" target="_blank"><i class="fa fa-rss"></i></a>'; |
61 | 61 | } else { |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | 'writeContent' => $newsContent, |
128 | 128 | 'writeDateMsg' => $newsDate, |
129 | 129 | 'msgAboutThisNews' => $PMF_LANG['msgAboutThisNews'], |
130 | - 'writeAuthor' => ($news['active'] && (!$expired)) ? $PMF_LANG['msgAuthor'] . ': ' . $news['authorName'] : '', |
|
130 | + 'writeAuthor' => ($news['active'] && (!$expired)) ? $PMF_LANG['msgAuthor'].': '.$news['authorName'] : '', |
|
131 | 131 | 'editThisEntry' => $editThisEntry, |
132 | 132 | 'writeCommentMsg' => $commentMessage, |
133 | 133 | 'msgWriteComment' => $PMF_LANG['newsWriteComment'], |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | |
28 | 28 | define('COPYRIGHT', '© 2001-2014 <a href="http://www.phpmyfaq.de/">phpMyFAQ Team</a> | Follow us on <a href="http://twitter.com/phpMyFAQ">Twitter</a> | All rights reserved.'); |
29 | 29 | define('PMF_ROOT_DIR', dirname(dirname(__FILE__))); |
30 | -define('PMF_INCLUDE_DIR', PMF_ROOT_DIR . '/inc'); |
|
30 | +define('PMF_INCLUDE_DIR', PMF_ROOT_DIR.'/inc'); |
|
31 | 31 | define('IS_VALID_PHPMYFAQ', null); |
32 | 32 | |
33 | 33 | if (version_compare(PHP_VERSION, '5.4.4') < 0) { |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | |
37 | 37 | use Symfony\Component\ClassLoader\UniversalClassLoader; |
38 | 38 | |
39 | -if (! defined('DEBUG')) { |
|
39 | +if (!defined('DEBUG')) { |
|
40 | 40 | define('DEBUG', true); |
41 | 41 | } |
42 | 42 | |
@@ -47,17 +47,17 @@ discard block |
||
47 | 47 | session_name('phpmyfaq-setup'); |
48 | 48 | session_start(); |
49 | 49 | |
50 | -require PMF_ROOT_DIR . '/config/constants.php'; |
|
50 | +require PMF_ROOT_DIR.'/config/constants.php'; |
|
51 | 51 | |
52 | 52 | // |
53 | 53 | // Setting up PSR-0 autoloader for Symfony Components |
54 | 54 | // |
55 | -require PMF_INCLUDE_DIR . '/libs/Symfony/Component/ClassLoader/UniversalClassLoader.php'; |
|
55 | +require PMF_INCLUDE_DIR.'/libs/Symfony/Component/ClassLoader/UniversalClassLoader.php'; |
|
56 | 56 | |
57 | 57 | $loader = new UniversalClassLoader(); |
58 | -$loader->registerNamespace('Symfony', PMF_INCLUDE_DIR . '/libs'); |
|
58 | +$loader->registerNamespace('Symfony', PMF_INCLUDE_DIR.'/libs'); |
|
59 | 59 | $loader->registerPrefix('PMF_', PMF_INCLUDE_DIR); |
60 | -$loader->registerPrefix('Twig_', PMF_INCLUDE_DIR . '/libs'); |
|
60 | +$loader->registerPrefix('Twig_', PMF_INCLUDE_DIR.'/libs'); |
|
61 | 61 | $loader->register(); |
62 | 62 | |
63 | 63 | // |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | // Initializing Twig |
73 | 73 | // |
74 | 74 | $twig = new Twig_Environment( |
75 | - new Twig_Loader_Filesystem(PMF_ROOT_DIR . '/setup/assets/twig') |
|
75 | + new Twig_Loader_Filesystem(PMF_ROOT_DIR.'/setup/assets/twig') |
|
76 | 76 | ); |
77 | 77 | |
78 | 78 | $tplLayoutVars = array( |
@@ -88,10 +88,10 @@ discard block |
||
88 | 88 | // not yet POSTed |
89 | 89 | if (!isset($_POST['sql_server']) && !isset($_POST['sql_user']) && !isset($_POST['sql_db'])) { |
90 | 90 | |
91 | - $databases= $system->getSupportedSafeDatabases(true); |
|
91 | + $databases = $system->getSupportedSafeDatabases(true); |
|
92 | 92 | // Whether the only supported RDBMS is sqlite and/or sqlite3 (in any order): |
93 | - $onlySqlite= count($databases)<=2 && strpos(strtolower($databases[0]), 'sqlite')!==FALSE |
|
94 | - && ( count($databases)===1 || strpos(strtolower($databases[1]), 'sqlite')!==FALSE ); |
|
93 | + $onlySqlite = count($databases) <= 2 && strpos(strtolower($databases[0]), 'sqlite') !== FALSE |
|
94 | + && (count($databases) === 1 || strpos(strtolower($databases[1]), 'sqlite') !== FALSE); |
|
95 | 95 | $tplDatabaseVars = array( |
96 | 96 | 'databases' => $databases, |
97 | 97 | 'dirname' => dirname(__DIR__), |
@@ -18,7 +18,6 @@ |
||
18 | 18 | */ |
19 | 19 | |
20 | 20 | use Symfony\Component\HttpFoundation\JsonResponse; |
21 | - |
|
22 | 21 | use PMF\Helper\ResponseWrapper; |
23 | 22 | |
24 | 23 | define('IS_VALID_PHPMYFAQ', null); |
@@ -49,9 +49,9 @@ discard block |
||
49 | 49 | |
50 | 50 | // Set language |
51 | 51 | if (PMF_Language::isASupportedLanguage($language)) { |
52 | - require PMF_LANGUAGE_DIR . '/language_' . $language . '.php'; |
|
52 | + require PMF_LANGUAGE_DIR.'/language_'.$language.'.php'; |
|
53 | 53 | } else { |
54 | - require PMF_LANGUAGE_DIR . '/language_en.php'; |
|
54 | + require PMF_LANGUAGE_DIR.'/language_en.php'; |
|
55 | 55 | } |
56 | 56 | $faqConfig->setLanguage($Language); |
57 | 57 | |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | |
86 | 86 | $searchString = PMF_Filter::filterInput(INPUT_GET, 'q', FILTER_SANITIZE_STRIPPED); |
87 | 87 | $searchResults = $search->search($searchString, false); |
88 | - $url = $faqConfig->get('main.referenceURL') . '/index.php?action=artikel&cat=%d&id=%d&artlang=%s'; |
|
88 | + $url = $faqConfig->get('main.referenceURL').'/index.php?action=artikel&cat=%d&id=%d&artlang=%s'; |
|
89 | 89 | |
90 | 90 | $faqSearchResult->reviewResultset($searchResults); |
91 | 91 |
@@ -19,10 +19,10 @@ |
||
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 |
@@ -19,10 +19,10 @@ |
||
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 |
@@ -19,10 +19,10 @@ |
||
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 |
@@ -19,10 +19,10 @@ |
||
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 |
@@ -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 | |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | if (!is_null($question) && !is_null($categories)) { |
110 | 110 | // Save entry |
111 | 111 | $logging = new PMF_Logging($faqConfig); |
112 | - $logging->logAdmin($user, 'Beitragsave ' . $recordId); |
|
112 | + $logging->logAdmin($user, 'Beitragsave '.$recordId); |
|
113 | 113 | |
114 | 114 | printf( |
115 | 115 | '<header><h2 class="page-header"><i class="fa fa-pencil"></i> %s</h2></header>', |
@@ -137,8 +137,8 @@ discard block |
||
137 | 137 | 'email' => $email, |
138 | 138 | 'comment' => (!is_null($comment) ? 'y' : 'n'), |
139 | 139 | 'date' => empty($date) ? date('YmdHis') : str_replace(array('-', ':', ' '), '', $date), |
140 | - 'dateStart' => (empty($dateStart) ? '00000000000000' : str_replace('-', '', $dateStart) . '000000'), |
|
141 | - 'dateEnd' => (empty($dateEnd) ? '99991231235959' : str_replace('-', '', $dateEnd) . '235959'), |
|
140 | + 'dateStart' => (empty($dateStart) ? '00000000000000' : str_replace('-', '', $dateStart).'000000'), |
|
141 | + 'dateEnd' => (empty($dateEnd) ? '99991231235959' : str_replace('-', '', $dateEnd).'235959'), |
|
142 | 142 | 'linkState' => '', |
143 | 143 | 'linkDateCheck' => 0); |
144 | 144 | |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | } else { |
163 | 163 | printf( |
164 | 164 | '<p class="alert alert-danger">%s</p>', |
165 | - print $PMF_LANG['ad_entry_savedfail'] . $faqConfig->getDb()->error() |
|
165 | + print $PMF_LANG['ad_entry_savedfail'].$faqConfig->getDb()->error() |
|
166 | 166 | ); |
167 | 167 | } |
168 | 168 |
@@ -19,10 +19,10 @@ |
||
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 | ?> |