@@ -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 |
@@ -100,8 +100,8 @@ discard block |
||
100 | 100 | echo PMF_Language::languageOptions( |
101 | 101 | str_replace( |
102 | 102 | array( |
103 | - 'language_', |
|
104 | - '.php' |
|
103 | + 'language_', |
|
104 | + '.php' |
|
105 | 105 | ), |
106 | 106 | '', |
107 | 107 | $faqConfig->get('main.language') |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | } else { |
113 | 113 | echo '<option value="language_en.php">English</option>'; |
114 | 114 | } |
115 | - break; |
|
115 | + break; |
|
116 | 116 | |
117 | 117 | case 'records.orderby': |
118 | 118 | echo PMF_Configuration::sortingOptions($faqConfig->get($key)); |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | ? ' selected' |
150 | 150 | : ''; |
151 | 151 | printf('<option value="%d"%s>%s</option>', |
152 | - $i, $selected, $item); |
|
152 | + $i, $selected, $item); |
|
153 | 153 | } |
154 | 154 | break; |
155 | 155 |
@@ -20,14 +20,14 @@ 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 | |
30 | -require PMF_ROOT_DIR . '/inc/libs/twitteroauth/twitteroauth.php'; |
|
30 | +require PMF_ROOT_DIR.'/inc/libs/twitteroauth/twitteroauth.php'; |
|
31 | 31 | |
32 | 32 | if (!empty($_SESSION['access_token'])) { |
33 | 33 | $connection = new TwitterOAuth( |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | $templates = $faqSystem->getAvailableTemplates(); |
137 | 137 | |
138 | 138 | foreach ($templates as $template => $selected) { |
139 | - printf ("<option%s>%s</option>", |
|
139 | + printf("<option%s>%s</option>", |
|
140 | 140 | ($selected === true ? ' selected' : ''), |
141 | 141 | $template |
142 | 142 | ); |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | break; |
145 | 145 | |
146 | 146 | case "records.attachmentsStorageType": |
147 | - foreach($PMF_LANG['att_storage_type'] as $i => $item) { |
|
147 | + foreach ($PMF_LANG['att_storage_type'] as $i => $item) { |
|
148 | 148 | $selected = $faqConfig->get($key) == $i |
149 | 149 | ? ' selected' |
150 | 150 | : ''; |
@@ -231,18 +231,18 @@ discard block |
||
231 | 231 | |
232 | 232 | echo '<a target="_blank" href="https://dev.twitter.com/apps/new">Create Twitter App for your FAQ</a>'; |
233 | 233 | echo "<br />\n"; |
234 | - echo "Your Callback URL is: " .$faqConfig->get('main.referenceURL') . "/services/twitter/callback.php"; |
|
234 | + echo "Your Callback URL is: ".$faqConfig->get('main.referenceURL')."/services/twitter/callback.php"; |
|
235 | 235 | } |
236 | 236 | |
237 | 237 | if (!isset($content)) { |
238 | 238 | echo '<br><a target="_blank" href="../services/twitter/redirect.php">'; |
239 | 239 | echo '<img src="../assets/img/twitter.signin.png" alt="Sign in with Twitter"/></a>'; |
240 | 240 | } elseif (isset($content)) { |
241 | - echo $content->screen_name . "<br />\n"; |
|
242 | - echo "<img src='" . $content->profile_image_url_https . "'><br />\n"; |
|
243 | - echo "Follower: " . $content->followers_count . "<br />\n"; |
|
244 | - echo "Status Count: " . $content->statuses_count . "<br />\n"; |
|
245 | - echo "Status: " . $content->status->text; |
|
241 | + echo $content->screen_name."<br />\n"; |
|
242 | + echo "<img src='".$content->profile_image_url_https."'><br />\n"; |
|
243 | + echo "Follower: ".$content->followers_count."<br />\n"; |
|
244 | + echo "Status Count: ".$content->statuses_count."<br />\n"; |
|
245 | + echo "Status: ".$content->status->text; |
|
246 | 246 | } |
247 | 247 | echo '</div></div>'; |
248 | 248 | } |
@@ -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 | ?> |
@@ -53,12 +53,12 @@ discard block |
||
53 | 53 | $definition = PMF_Filter::filterInput(INPUT_POST, 'definition', FILTER_SANITIZE_SPECIAL_CHARS); |
54 | 54 | if ($glossary->addGlossaryItem($item, $definition)) { |
55 | 55 | echo '<p class="alert alert-success"><a href="#" class="close" data-dismiss="alert">×</a>'; |
56 | - echo $PMF_LANG['ad_glossary_save_success'] . '</p>'; |
|
56 | + echo $PMF_LANG['ad_glossary_save_success'].'</p>'; |
|
57 | 57 | } else { |
58 | 58 | echo '<p class="alert alert-danger"><a href="#" class="close" data-dismiss="alert">×</a>'; |
59 | 59 | echo $PMF_LANG['ad_glossary_save_error']; |
60 | 60 | echo '<br />'.$PMF_LANG["ad_adus_dberr"].'<br />'; |
61 | - echo $faqConfig->getDb()->error() . '</p>'; |
|
61 | + echo $faqConfig->getDb()->error().'</p>'; |
|
62 | 62 | } |
63 | 63 | } |
64 | 64 | |
@@ -68,12 +68,12 @@ discard block |
||
68 | 68 | $definition = PMF_Filter::filterInput(INPUT_POST, 'definition', FILTER_SANITIZE_SPECIAL_CHARS); |
69 | 69 | if ($glossary->updateGlossaryItem($id, $item, $definition)) { |
70 | 70 | echo '<p class="alert alert-success"><a href="#" class="close" data-dismiss="alert">×</a>'; |
71 | - echo $PMF_LANG['ad_glossary_update_success'] . '</p>'; |
|
71 | + echo $PMF_LANG['ad_glossary_update_success'].'</p>'; |
|
72 | 72 | } else { |
73 | 73 | echo '<p class="alert alert-danger"><a href="#" class="close" data-dismiss="alert">×</a>'; |
74 | 74 | echo $PMF_LANG['ad_glossary_update_error']; |
75 | 75 | echo '<br />'.$PMF_LANG["ad_adus_dberr"].'<br />'; |
76 | - echo $faqConfig->getDb()->error() . '</p>'; |
|
76 | + echo $faqConfig->getDb()->error().'</p>'; |
|
77 | 77 | } |
78 | 78 | } |
79 | 79 | |
@@ -81,12 +81,12 @@ discard block |
||
81 | 81 | $id = PMF_Filter::filterInput(INPUT_GET, 'id', FILTER_VALIDATE_INT); |
82 | 82 | if ($glossary->deleteGlossaryItem($id)) { |
83 | 83 | echo '<p class="alert alert-success"><a href="#" class="close" data-dismiss="alert">×</a>'; |
84 | - echo $PMF_LANG['ad_glossary_delete_success'] . '</p>'; |
|
84 | + echo $PMF_LANG['ad_glossary_delete_success'].'</p>'; |
|
85 | 85 | } else { |
86 | 86 | echo '<p class="alert alert-danger"><a href="#" class="close" data-dismiss="alert">×</a>'; |
87 | 87 | echo $PMF_LANG['ad_glossary_delete_error']; |
88 | 88 | echo '<br />'.$PMF_LANG["ad_adus_dberr"].'<br />'; |
89 | - echo $faqConfig->getDb()->error() . '</p>'; |
|
89 | + echo $faqConfig->getDb()->error().'</p>'; |
|
90 | 90 | } |
91 | 91 | } |
92 | 92 |
@@ -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 |
@@ -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 | |
@@ -212,7 +212,7 @@ discard block |
||
212 | 212 | $groupAction = 'add'; |
213 | 213 | $message = '<p class="alert alert-error">'; |
214 | 214 | foreach ($messages as $err) { |
215 | - $message .= $err . '<br />'; |
|
215 | + $message .= $err.'<br />'; |
|
216 | 216 | } |
217 | 217 | $message .= '</p>'; |
218 | 218 | } |
@@ -200,8 +200,9 @@ discard block |
||
200 | 200 | 'auto_join' => $group_auto_join |
201 | 201 | ); |
202 | 202 | |
203 | - if ($user->perm->addGroup($group_data) <= 0) |
|
204 | - $messages[] = $PMF_LANG['ad_adus_dberr']; |
|
203 | + if ($user->perm->addGroup($group_data) <= 0) { |
|
204 | + $messages[] = $PMF_LANG['ad_adus_dberr']; |
|
205 | + } |
|
205 | 206 | } |
206 | 207 | // no errors, show list |
207 | 208 | if (count($messages) == 0) { |
@@ -218,8 +219,9 @@ discard block |
||
218 | 219 | } |
219 | 220 | } |
220 | 221 | |
221 | -if (!isset($message)) |
|
222 | +if (!isset($message)) { |
|
222 | 223 | $message = ''; |
224 | +} |
|
223 | 225 | |
224 | 226 | // show new group form |
225 | 227 | if ($groupAction == 'add' && $user->perm->checkRight($user->getUserId(), 'addgroup')) { |
@@ -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 | ?> |
@@ -56,18 +56,18 @@ discard block |
||
56 | 56 | <thead> |
57 | 57 | <tr> |
58 | 58 | <?php |
59 | - ($useCategory) ? printf('<th>%s</th>', $PMF_LANG['ad_stat_report_category']) : ''; |
|
60 | - ($useSubcategory) ? printf('<th>%s</th>', $PMF_LANG['ad_stat_report_sub_category']) : ''; |
|
61 | - ($useTranslation) ? printf('<th>%s</th>', $PMF_LANG['ad_stat_report_translations']) : ''; |
|
62 | - ($useLanguage) ? printf('<th>%s</th>', $PMF_LANG['ad_stat_report_language']) : ''; |
|
63 | - ($useId) ? printf('<th>%s</th>', $PMF_LANG['ad_stat_report_id']) : ''; |
|
64 | - ($useSticky) ? printf('<th>%s</th>', $PMF_LANG['ad_stat_report_sticky']) : ''; |
|
65 | - ($useTitle) ? printf('<th>%s</th>', $PMF_LANG['ad_stat_report_title']) : ''; |
|
59 | + ($useCategory) ? printf('<th>%s</th>', $PMF_LANG['ad_stat_report_category']) : ''; |
|
60 | + ($useSubcategory) ? printf('<th>%s</th>', $PMF_LANG['ad_stat_report_sub_category']) : ''; |
|
61 | + ($useTranslation) ? printf('<th>%s</th>', $PMF_LANG['ad_stat_report_translations']) : ''; |
|
62 | + ($useLanguage) ? printf('<th>%s</th>', $PMF_LANG['ad_stat_report_language']) : ''; |
|
63 | + ($useId) ? printf('<th>%s</th>', $PMF_LANG['ad_stat_report_id']) : ''; |
|
64 | + ($useSticky) ? printf('<th>%s</th>', $PMF_LANG['ad_stat_report_sticky']) : ''; |
|
65 | + ($useTitle) ? printf('<th>%s</th>', $PMF_LANG['ad_stat_report_title']) : ''; |
|
66 | 66 | ($useCreationDate) ? printf('<th>%s</th>', $PMF_LANG['ad_stat_report_creation_date']) : ''; |
67 | - ($useOwner) ? printf('<th>%s</th>', $PMF_LANG['ad_stat_report_owner']) : ''; |
|
67 | + ($useOwner) ? printf('<th>%s</th>', $PMF_LANG['ad_stat_report_owner']) : ''; |
|
68 | 68 | ($useLastModified) ? printf('<th>%s</th>', $PMF_LANG['ad_stat_report_last_modified_person']) : ''; |
69 | - ($useUrl) ? printf('<th>%s</th>', $PMF_LANG['ad_stat_report_url']) : ''; |
|
70 | - ($useVisits) ? printf('<th>%s</th>', $PMF_LANG['ad_stat_report_visits']) : ''; |
|
69 | + ($useUrl) ? printf('<th>%s</th>', $PMF_LANG['ad_stat_report_url']) : ''; |
|
70 | + ($useVisits) ? printf('<th>%s</th>', $PMF_LANG['ad_stat_report_visits']) : ''; |
|
71 | 71 | ?> |
72 | 72 | </tr> |
73 | 73 | </thead> |