@@ -500,7 +500,7 @@ discard block |
||
500 | 500 | log_error(sprintf($txt['smiley_set_dir_not_found'], $set_names[array_search($set, $context['smiley_sets'])])); |
501 | 501 | |
502 | 502 | $context['smiley_sets'] = array_filter($context['smiley_sets'], function($v) use ($set) |
503 | - { |
|
503 | + { |
|
504 | 504 | return $v != $set; |
505 | 505 | }); |
506 | 506 | } |
@@ -3467,7 +3467,6 @@ discard block |
||
3467 | 3467 | } |
3468 | 3468 | } |
3469 | 3469 | } |
3470 | - |
|
3471 | 3470 | elseif (($value == 'upload' && allowedTo('profile_upload_avatar')) || $downloadedExternalAvatar) |
3472 | 3471 | { |
3473 | 3472 | if ((isset($_FILES['attachment']['name']) && $_FILES['attachment']['name'] != '') || $downloadedExternalAvatar) |
@@ -282,7 +282,7 @@ |
||
282 | 282 | '{db_prefix}log_notify', |
283 | 283 | array('id_member' => 'int', 'id_topic' => 'int', 'id_board' => 'int'), |
284 | 284 | array($user_info['id'], $log['id_topic'], 0), |
285 | - array('id_member','id_topic', 'id_board') |
|
285 | + array('id_member', 'id_topic', 'id_board') |
|
286 | 286 | ); |
287 | 287 | } |
288 | 288 | else |
@@ -310,7 +310,7 @@ |
||
310 | 310 | { |
311 | 311 | /** |
312 | 312 | * Constants for notification types. |
313 | - */ |
|
313 | + */ |
|
314 | 314 | const RECEIVE_NOTIFY_EMAIL = 0x02; |
315 | 315 | const RECEIVE_NOTIFY_ALERT = 0x01; |
316 | 316 |
@@ -93,7 +93,6 @@ |
||
93 | 93 | if ($ts <= 0 || $ts % 15 != 0 || time() - $ts < 0 || time() - $ts > 20) |
94 | 94 | obExit_cron(); |
95 | 95 | } |
96 | - |
|
97 | 96 | else |
98 | 97 | $_SERVER['SERVER_PROTOCOL'] = 'HTTP/1.0'; |
99 | 98 |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | { |
20 | 20 | /** |
21 | 21 | * Constants for reply types. |
22 | - */ |
|
22 | + */ |
|
23 | 23 | const NOTIFY_TYPE_REPLY_AND_MODIFY = 1; |
24 | 24 | const NOTIFY_TYPE_REPLY_AND_TOPIC_START_FOLLOWING = 2; |
25 | 25 | const NOTIFY_TYPE_ONLY_REPLIES = 3; |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | |
28 | 28 | /** |
29 | 29 | * Constants for frequencies. |
30 | - */ |
|
30 | + */ |
|
31 | 31 | const FREQUENCY_NOTHING = 0; |
32 | 32 | const FREQUENCY_EVERYTHING = 1; |
33 | 33 | const FREQUENCY_FIRST_UNREAD_MSG = 2; |
@@ -266,7 +266,6 @@ |
||
266 | 266 | $user_info = $real_user_info; |
267 | 267 | unset($real_user_info); |
268 | 268 | } |
269 | - |
|
270 | 269 | else |
271 | 270 | $user_info = null; |
272 | 271 |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | if ($type == 'edit') |
119 | 119 | { |
120 | 120 | // Filter out members who have already been notified about this post's topic |
121 | - $unnotified = array_filter($watched, function ($member) |
|
121 | + $unnotified = array_filter($watched, function($member) |
|
122 | 122 | { |
123 | 123 | return empty($member['sent']); |
124 | 124 | }); |
@@ -204,8 +204,7 @@ discard block |
||
204 | 204 | if (!empty($member_data['id_topic']) && $type != 'topic' && !empty($prefs[$member_id])) |
205 | 205 | { |
206 | 206 | $pref = !empty($prefs[$member_id]['topic_notify_' . $topicOptions['id']]) ? |
207 | - $prefs[$member_id]['topic_notify_' . $topicOptions['id']] : |
|
208 | - (!empty($prefs[$member_id]['topic_notify']) ? $prefs[$member_id]['topic_notify'] : 0); |
|
207 | + $prefs[$member_id]['topic_notify_' . $topicOptions['id']] : (!empty($prefs[$member_id]['topic_notify']) ? $prefs[$member_id]['topic_notify'] : 0); |
|
209 | 208 | |
210 | 209 | $message_type = 'notification_' . $type; |
211 | 210 | |
@@ -224,8 +223,7 @@ discard block |
||
224 | 223 | elseif ($type == 'topic') |
225 | 224 | { |
226 | 225 | $pref = !empty($prefs[$member_id]['board_notify_' . $topicOptions['board']]) ? |
227 | - $prefs[$member_id]['board_notify_' . $topicOptions['board']] : |
|
228 | - (!empty($prefs[$member_id]['board_notify']) ? $prefs[$member_id]['board_notify'] : 0); |
|
226 | + $prefs[$member_id]['board_notify_' . $topicOptions['board']] : (!empty($prefs[$member_id]['board_notify']) ? $prefs[$member_id]['board_notify'] : 0); |
|
229 | 227 | |
230 | 228 | $content_type = 'board'; |
231 | 229 |
@@ -317,7 +317,7 @@ |
||
317 | 317 | { |
318 | 318 | // PHPBB 3 check this function exists in PHP 5.5 or higher |
319 | 319 | if (function_exists('password_verify')) |
320 | - $other_passwords[] = password_verify($_POST['passwrd'],$user_settings['password_salt']); |
|
320 | + $other_passwords[] = password_verify($_POST['passwrd'], $user_settings['password_salt']); |
|
321 | 321 | |
322 | 322 | // PHP-Fusion |
323 | 323 | $other_passwords[] = hash_hmac('sha256', $_POST['passwrd'], $user_settings['password_salt']); |
@@ -64,8 +64,7 @@ discard block |
||
64 | 64 | && !empty($_SERVER['HTTP_X_SMF_AJAX']) |
65 | 65 | && isset($_REQUEST['ajax']) |
66 | 66 | ) |
67 | - ) |
|
68 | - { |
|
67 | + ) { |
|
69 | 68 | $context['from_ajax'] = true; |
70 | 69 | $context['template_layers'] = array(); |
71 | 70 | } |
@@ -137,8 +136,7 @@ discard block |
||
137 | 136 | && !empty($_SERVER['HTTP_X_SMF_AJAX']) |
138 | 137 | && isset($_REQUEST['ajax']) |
139 | 138 | ) |
140 | - ) |
|
141 | - { |
|
139 | + ) { |
|
142 | 140 | $context['from_ajax'] = true; |
143 | 141 | $context['template_layers'] = array(); |
144 | 142 | } |
@@ -517,8 +515,7 @@ discard block |
||
517 | 515 | && !empty($_SERVER['HTTP_X_SMF_AJAX']) |
518 | 516 | && isset($_REQUEST['ajax']) |
519 | 517 | ) |
520 | - ) |
|
521 | - { |
|
518 | + ) { |
|
522 | 519 | $context['from_ajax'] = true; |
523 | 520 | $context['template_layers'] = array(); |
524 | 521 | } |
@@ -355,8 +355,8 @@ |
||
355 | 355 | elseif (isset($_POST['delall']) && isset($filter)) |
356 | 356 | { |
357 | 357 | // ip need a different placeholder type |
358 | - $filter_type = $filter['variable'] == 'ip'? 'inet' : 'string'; |
|
359 | - $filter_op = $filter['variable'] == 'ip'? '=' : 'LIKE'; |
|
358 | + $filter_type = $filter['variable'] == 'ip' ? 'inet' : 'string'; |
|
359 | + $filter_op = $filter['variable'] == 'ip' ? '=' : 'LIKE'; |
|
360 | 360 | $smcFunc['db_query']('', ' |
361 | 361 | DELETE FROM {db_prefix}log_errors |
362 | 362 | WHERE ' . $filter['variable'] . ' ' . $filter_op . ' {' . $filter_type . ':filter}', |
@@ -1396,7 +1396,9 @@ |
||
1396 | 1396 | |
1397 | 1397 | // Figure out the filename we'll tell the browser. |
1398 | 1398 | $datatypes = file_exists($progressfile) ? array_keys($smcFunc['json_decode'](file_get_contents($progressfile), true)) : array('profile'); |
1399 | - $included_desc = array_map(function ($datatype) use ($txt) { return $txt[$datatype]; }, $datatypes); |
|
1399 | + $included_desc = array_map(function ($datatype) use ($txt) |
|
1400 | + { |
|
1401 | +return $txt[$datatype]; }, $datatypes); |
|
1400 | 1402 | |
1401 | 1403 | $dlfilename = array_merge(array($context['forum_name'], $context['member']['username']), $included_desc); |
1402 | 1404 | $dlfilename = preg_replace('/[^\p{L}\p{M}\p{N}_]+/u', '-', str_replace('"', '', un_htmlspecialchars(strip_tags(implode('_', $dlfilename))))); |
@@ -459,7 +459,7 @@ discard block |
||
459 | 459 | |
460 | 460 | // Figure out the filename we'll tell the browser. |
461 | 461 | $datatypes = file_exists($progressfile) ? array_keys($smcFunc['json_decode'](file_get_contents($progressfile), true)) : array('profile'); |
462 | - $included_desc = array_map(function ($datatype) use ($txt) { return $txt[$datatype]; }, $datatypes); |
|
462 | + $included_desc = array_map(function($datatype) use ($txt) { return $txt[$datatype]; }, $datatypes); |
|
463 | 463 | |
464 | 464 | $dlfilename = array_merge(array($context['forum_name'], $context['member']['username']), $included_desc); |
465 | 465 | $dlfilename = preg_replace('/[^\p{L}\p{M}\p{N}_]+/u', '-', str_replace('"', '', un_htmlspecialchars(strip_tags(implode('_', $dlfilename))))); |
@@ -774,9 +774,9 @@ discard block |
||
774 | 774 | $xslt_variables = array(); |
775 | 775 | |
776 | 776 | // Do not change any of these to HTTPS URLs. For explanation, see comments in the buildXmlFeed() function. |
777 | - $smf_ns = 'htt'.'p:/'.'/ww'.'w.simple'.'machines.o'.'rg/xml/profile'; |
|
778 | - $xslt_ns = 'htt'.'p:/'.'/ww'.'w.w3.o'.'rg/1999/XSL/Transform'; |
|
779 | - $html_ns = 'htt'.'p:/'.'/ww'.'w.w3.o'.'rg/1999/xhtml'; |
|
777 | + $smf_ns = 'htt' . 'p:/' . '/ww' . 'w.simple' . 'machines.o' . 'rg/xml/profile'; |
|
778 | + $xslt_ns = 'htt' . 'p:/' . '/ww' . 'w.w3.o' . 'rg/1999/XSL/Transform'; |
|
779 | + $html_ns = 'htt' . 'p:/' . '/ww' . 'w.w3.o' . 'rg/1999/xhtml'; |
|
780 | 780 | |
781 | 781 | require_once($sourcedir . DIRECTORY_SEPARATOR . 'News.php'); |
782 | 782 | |
@@ -1682,14 +1682,14 @@ discard block |
||
1682 | 1682 | |
1683 | 1683 | if (!empty($context['export_css_header'])) |
1684 | 1684 | { |
1685 | - $stylesheet['css_js'] .= ' |
|
1685 | + $stylesheet['css_js'] .= ' |
|
1686 | 1686 | <style><![CDATA[' . "\n" . implode("\n", $context['export_css_header']) . "\n" . ']]> |
1687 | 1687 | </style>'; |
1688 | 1688 | } |
1689 | 1689 | |
1690 | 1690 | if (!empty($context['export_javascript_vars'])) |
1691 | 1691 | { |
1692 | - $stylesheet['css_js'] .= ' |
|
1692 | + $stylesheet['css_js'] .= ' |
|
1693 | 1693 | <script><![CDATA['; |
1694 | 1694 | |
1695 | 1695 | foreach ($context['export_javascript_vars'] as $var => $val) |
@@ -1725,7 +1725,7 @@ discard block |
||
1725 | 1725 | |
1726 | 1726 | if (!empty($context['export_javascript_inline']['standard'])) |
1727 | 1727 | { |
1728 | - $stylesheet['css_js'] .= ' |
|
1728 | + $stylesheet['css_js'] .= ' |
|
1729 | 1729 | <script><![CDATA[' . "\n" . implode("\n", $context['export_javascript_inline']['standard']) . "\n" . ']]> |
1730 | 1730 | </script>'; |
1731 | 1731 | } |
@@ -1737,7 +1737,7 @@ discard block |
||
1737 | 1737 | |
1738 | 1738 | $stylesheet['css_js'] .= "\n\t" . str_replace("\n", "\n\t", implode("\n", $context['export_javascript_inline']['defer'])); |
1739 | 1739 | |
1740 | - $stylesheet['css_js'] .= "\n" . '});'. "\n" . ']]> |
|
1740 | + $stylesheet['css_js'] .= "\n" . '});' . "\n" . ']]> |
|
1741 | 1741 | </script>'; |
1742 | 1742 | } |
1743 | 1743 | |
@@ -1818,7 +1818,7 @@ discard block |
||
1818 | 1818 | $css_to_minify = array(); |
1819 | 1819 | $normal_css_files = array(); |
1820 | 1820 | |
1821 | - usort($context['css_files'], function ($a, $b) |
|
1821 | + usort($context['css_files'], function($a, $b) |
|
1822 | 1822 | { |
1823 | 1823 | return $a['options']['order_pos'] < $b['options']['order_pos'] ? -1 : ($a['options']['order_pos'] > $b['options']['order_pos'] ? 1 : 0); |
1824 | 1824 | }); |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | |
153 | 153 | $feed_meta = array( |
154 | 154 | 'title' => sprintf($txt['profile_of_username'], $user_profile[$uid]['real_name']), |
155 | - 'desc' => sentence_list(array_map(function ($datatype) use ($txt) { return $txt[$datatype]; }, array_keys($included))), |
|
155 | + 'desc' => sentence_list(array_map(function($datatype) use ($txt) { return $txt[$datatype]; }, array_keys($included))), |
|
156 | 156 | 'author' => $mbname, |
157 | 157 | 'source' => $scripturl . '?action=profile;u=' . $uid, |
158 | 158 | 'self' => '', // Unused, but can't be null. |
@@ -640,7 +640,7 @@ discard block |
||
640 | 640 | 'src' => 'src="' . $currentAttachment['href'] . '" onerror="$(\'.dlattach_' . $currentAttachment['id'] . '\').show(); $(\'.dlattach_' . $currentAttachment['id'] . '\').css({\'position\': \'absolute\'});"', |
641 | 641 | ), |
642 | 642 | $returnContext |
643 | - ) . $hidden_orig_link . '</span>' ; |
|
643 | + ) . $hidden_orig_link . '</span>'; |
|
644 | 644 | } |
645 | 645 | elseif (strpos($currentAttachment['mime_type'], 'video/') === 0) |
646 | 646 | { |
@@ -152,7 +152,9 @@ |
||
152 | 152 | |
153 | 153 | $feed_meta = array( |
154 | 154 | 'title' => sprintf($txt['profile_of_username'], $user_profile[$uid]['real_name']), |
155 | - 'desc' => sentence_list(array_map(function ($datatype) use ($txt) { return $txt[$datatype]; }, array_keys($included))), |
|
155 | + 'desc' => sentence_list(array_map(function ($datatype) use ($txt) |
|
156 | + { |
|
157 | +return $txt[$datatype]; }, array_keys($included))), |
|
156 | 158 | 'author' => $mbname, |
157 | 159 | 'source' => $scripturl . '?action=profile;u=' . $uid, |
158 | 160 | 'self' => '', // Unused, but can't be null. |
@@ -644,13 +644,13 @@ discard block |
||
644 | 644 | 'quickbuttons' => array( |
645 | 645 | 'edit' => array( |
646 | 646 | 'label' => $txt['draft_edit'], |
647 | - 'href' => $scripturl.'?action=post;'.(empty($row['id_topic']) ? 'board='.$row['id_board'] : 'topic='.$row['id_topic']).'.0;id_draft='.$row['id_draft'], |
|
647 | + 'href' => $scripturl . '?action=post;' . (empty($row['id_topic']) ? 'board=' . $row['id_board'] : 'topic=' . $row['id_topic']) . '.0;id_draft=' . $row['id_draft'], |
|
648 | 648 | 'icon' => 'modify_button' |
649 | 649 | ), |
650 | 650 | 'delete' => array( |
651 | 651 | 'label' => $txt['draft_delete'], |
652 | - 'href' => $scripturl.'?action=profile;u='.$context['member']['id'].';area=showdrafts;delete='.$row['id_draft'].';'.$context['session_var'].'='.$context['session_id'], |
|
653 | - 'javascript' => 'data-confirm="'.$txt['draft_remove'].'"', |
|
652 | + 'href' => $scripturl . '?action=profile;u=' . $context['member']['id'] . ';area=showdrafts;delete=' . $row['id_draft'] . ';' . $context['session_var'] . '=' . $context['session_id'], |
|
653 | + 'javascript' => 'data-confirm="' . $txt['draft_remove'] . '"', |
|
654 | 654 | 'class' => 'you_sure', |
655 | 655 | 'icon' => 'remove_button' |
656 | 656 | ), |
@@ -837,13 +837,13 @@ discard block |
||
837 | 837 | 'quickbuttons' => array( |
838 | 838 | 'edit' => array( |
839 | 839 | 'label' => $txt['draft_edit'], |
840 | - 'href' => $scripturl.'?action=pm;sa=showpmdrafts;id_draft='.$row['id_draft'].';'.$context['session_var'].'='.$context['session_id'], |
|
840 | + 'href' => $scripturl . '?action=pm;sa=showpmdrafts;id_draft=' . $row['id_draft'] . ';' . $context['session_var'] . '=' . $context['session_id'], |
|
841 | 841 | 'icon' => 'modify_button' |
842 | 842 | ), |
843 | 843 | 'delete' => array( |
844 | 844 | 'label' => $txt['draft_delete'], |
845 | - 'href' => $scripturl.'?action=pm;sa=showpmdrafts;delete='.$row['id_draft'].';'.$context['session_var'].'='.$context['session_id'], |
|
846 | - 'javascript' => 'data-confirm="'.$txt['draft_remove'].'?"', |
|
845 | + 'href' => $scripturl . '?action=pm;sa=showpmdrafts;delete=' . $row['id_draft'] . ';' . $context['session_var'] . '=' . $context['session_id'], |
|
846 | + 'javascript' => 'data-confirm="' . $txt['draft_remove'] . '?"', |
|
847 | 847 | 'class' => 'you_sure', |
848 | 848 | 'icon' => 'remove_button' |
849 | 849 | ), |