@@ -172,23 +172,23 @@ discard block |
||
172 | 172 | // Additional classes are given for events, holidays, and birthdays. |
173 | 173 | if (!empty($day['events']) && !empty($calendar_data['highlight']['events'])) |
174 | 174 | { |
175 | - if ($is_mini === true && in_array($calendar_data['highlight']['events'], array(1,3))) |
|
175 | + if ($is_mini === true && in_array($calendar_data['highlight']['events'], array(1, 3))) |
|
176 | 176 | $classes[] = 'events'; |
177 | - elseif ($is_mini === false && in_array($calendar_data['highlight']['events'], array(2,3))) |
|
177 | + elseif ($is_mini === false && in_array($calendar_data['highlight']['events'], array(2, 3))) |
|
178 | 178 | $classes[] = 'events'; |
179 | 179 | } |
180 | 180 | if (!empty($day['holidays']) && !empty($calendar_data['highlight']['holidays'])) |
181 | 181 | { |
182 | - if ($is_mini === true && in_array($calendar_data['highlight']['holidays'], array(1,3))) |
|
182 | + if ($is_mini === true && in_array($calendar_data['highlight']['holidays'], array(1, 3))) |
|
183 | 183 | $classes[] = 'holidays'; |
184 | - elseif ($is_mini === false && in_array($calendar_data['highlight']['holidays'], array(2,3))) |
|
184 | + elseif ($is_mini === false && in_array($calendar_data['highlight']['holidays'], array(2, 3))) |
|
185 | 185 | $classes[] = 'holidays'; |
186 | 186 | } |
187 | 187 | if (!empty($day['birthdays']) && !empty($calendar_data['highlight']['birthdays'])) |
188 | 188 | { |
189 | - if ($is_mini === true && in_array($calendar_data['highlight']['birthdays'], array(1,3))) |
|
189 | + if ($is_mini === true && in_array($calendar_data['highlight']['birthdays'], array(1, 3))) |
|
190 | 190 | $classes[] = 'birthdays'; |
191 | - elseif ($is_mini === false && in_array($calendar_data['highlight']['birthdays'], array(2,3))) |
|
191 | + elseif ($is_mini === false && in_array($calendar_data['highlight']['birthdays'], array(2, 3))) |
|
192 | 192 | $classes[] = 'birthdays'; |
193 | 193 | } |
194 | 194 | } |
@@ -252,7 +252,7 @@ discard block |
||
252 | 252 | if (!empty($day['events'])) |
253 | 253 | { |
254 | 254 | // Sort events by start time (all day events will be listed first) |
255 | - uasort($day['events'], function ($a, $b) { |
|
255 | + uasort($day['events'], function($a, $b) { |
|
256 | 256 | if ($a['start_timestamp'] == $b['start_timestamp']) |
257 | 257 | return 0; |
258 | 258 | return ($a['start_timestamp'] < $b['start_timestamp']) ? -1 : 1; |
@@ -318,7 +318,7 @@ discard block |
||
318 | 318 | elseif ($is_mini === false) |
319 | 319 | { |
320 | 320 | if (empty($current_month_started) && !empty($context['calendar_grid_prev'])) |
321 | - echo '<a href="', $scripturl, '?action=calendar;year=', $context['calendar_grid_prev']['current_year'], ';month=', $context['calendar_grid_prev']['current_month'], '">', $context['calendar_grid_prev']['last_of_month'] - $calendar_data['shift']-- + 1, '</a>'; |
|
321 | + echo '<a href="', $scripturl, '?action=calendar;year=', $context['calendar_grid_prev']['current_year'], ';month=', $context['calendar_grid_prev']['current_month'], '">', $context['calendar_grid_prev']['last_of_month'] - $calendar_data['shift']-- +1, '</a>'; |
|
322 | 322 | elseif (!empty($current_month_started) && !empty($context['calendar_grid_next'])) |
323 | 323 | echo '<a href="', $scripturl, '?action=calendar;year=', $context['calendar_grid_next']['current_year'], ';month=', $context['calendar_grid_next']['current_month'], '">', $current_month_started + 1 == $count ? (!empty($calendar_data['short_month_titles']) ? $txt['months_short'][$context['calendar_grid_next']['current_month']] . ' ' : $txt['months_titles'][$context['calendar_grid_next']['current_month']] . ' ') : '', $final_count++, '</a>'; |
324 | 324 | } |
@@ -435,7 +435,7 @@ discard block |
||
435 | 435 | if (!empty($day['events'])) |
436 | 436 | { |
437 | 437 | // Sort events by start time (all day events will be listed first) |
438 | - uasort($day['events'], function ($a, $b) { |
|
438 | + uasort($day['events'], function($a, $b) { |
|
439 | 439 | if ($a['start_timestamp'] == $b['start_timestamp']) |
440 | 440 | return 0; |
441 | 441 | return ($a['start_timestamp'] < $b['start_timestamp']) ? -1 : 1; |
@@ -638,7 +638,7 @@ discard block |
||
638 | 638 | <div> |
639 | 639 | <span class="label">', $txt['calendar_post_in'], '</span> |
640 | 640 | <input type="checkbox" style="vertical-align: middle;" class="input_check" name="link_to_board"', (!empty($context['event']['board']) ? ' checked' : ''), ' onclick="toggleLinked(this.form);"> |
641 | - <select name="board"', empty($context['event']['board']) ? ' disabled' : '' , '>'; |
|
641 | + <select name="board"', empty($context['event']['board']) ? ' disabled' : '', '>'; |
|
642 | 642 | foreach ($context['event']['categories'] as $category) |
643 | 643 | { |
644 | 644 | echo ' |
@@ -259,8 +259,8 @@ discard block |
||
259 | 259 | $time_string = str_replace(array('%I', '%H', '%S', '%r', '%R', '%T'), array('%l', '%k', '', '%l:%M %p', '%k:%M', '%l:%M'), $matches[0]); |
260 | 260 | |
261 | 261 | $js_time_string = str_replace( |
262 | - array('%H', '%k', '%I', '%l', '%M', '%p', '%P', '%r', '%R', '%S', '%T', '%X'), |
|
263 | - array('H', 'G', 'h', 'g', 'i', 'A', 'a', 'h:i:s A', 'H:i', 's', 'H:i:s', 'H:i:s'), |
|
262 | + array('%H', '%k', '%I', '%l', '%M', '%p', '%P', '%r', '%R', '%S', '%T', '%X'), |
|
263 | + array('H', 'G', 'h', 'g', 'i', 'A', 'a', 'h:i:s A', 'H:i', 's', 'H:i:s', 'H:i:s'), |
|
264 | 264 | $time_string |
265 | 265 | ); |
266 | 266 | |
@@ -855,7 +855,7 @@ discard block |
||
855 | 855 | { |
856 | 856 | // It goes 0 = outside, 1 = begin tag, 2 = inside, 3 = close tag, repeat. |
857 | 857 | if ($i % 4 == 0) |
858 | - $parts[$i] = preg_replace_callback('~\[html\](.+?)\[/html\]~is', function ($m) |
|
858 | + $parts[$i] = preg_replace_callback('~\[html\](.+?)\[/html\]~is', function($m) |
|
859 | 859 | { |
860 | 860 | return '[html]' . preg_replace('~<br\s?/?' . '>~i', '<br /><br>', "$m[1]") . '[/html]'; |
861 | 861 | }, $parts[$i]); |
@@ -952,7 +952,7 @@ discard block |
||
952 | 952 | { |
953 | 953 | // Since, they don't belong here. Let's inform the user that they exist.. |
954 | 954 | if (!empty($topic)) |
955 | - $delete_url = $scripturl . '?action=post' .(!empty($_REQUEST['msg']) ? (';msg=' . $_REQUEST['msg']) : '') . (!empty($_REQUEST['last_msg']) ? (';last_msg=' . $_REQUEST['last_msg']) : '') . ';topic=' . $topic . ';delete_temp'; |
|
955 | + $delete_url = $scripturl . '?action=post' . (!empty($_REQUEST['msg']) ? (';msg=' . $_REQUEST['msg']) : '') . (!empty($_REQUEST['last_msg']) ? (';last_msg=' . $_REQUEST['last_msg']) : '') . ';topic=' . $topic . ';delete_temp'; |
|
956 | 956 | else |
957 | 957 | $delete_url = $scripturl . '?action=post;board=' . $board . ';delete_temp'; |
958 | 958 | |
@@ -960,7 +960,7 @@ discard block |
||
960 | 960 | $file_list = array(); |
961 | 961 | foreach ($_SESSION['temp_attachments'] as $attachID => $attachment) |
962 | 962 | if (strpos($attachID, 'post_tmp_' . $user_info['id']) !== false) |
963 | - $file_list[] = $attachment['name']; |
|
963 | + $file_list[] = $attachment['name']; |
|
964 | 964 | |
965 | 965 | $_SESSION['temp_attachments']['post']['files'] = $file_list; |
966 | 966 | $file_list = '<div class="attachments">' . implode('<br>', $file_list) . '</div>'; |
@@ -968,7 +968,7 @@ discard block |
||
968 | 968 | if (!empty($_SESSION['temp_attachments']['post']['msg'])) |
969 | 969 | { |
970 | 970 | // We have a message id, so we can link back to the old topic they were trying to edit.. |
971 | - $goback_url = $scripturl . '?action=post' .(!empty($_SESSION['temp_attachments']['post']['msg']) ? (';msg=' . $_SESSION['temp_attachments']['post']['msg']) : '') . (!empty($_SESSION['temp_attachments']['post']['last_msg']) ? (';last_msg=' . $_SESSION['temp_attachments']['post']['last_msg']) : '') . ';topic=' . $_SESSION['temp_attachments']['post']['topic'] . ';additionalOptions'; |
|
971 | + $goback_url = $scripturl . '?action=post' . (!empty($_SESSION['temp_attachments']['post']['msg']) ? (';msg=' . $_SESSION['temp_attachments']['post']['msg']) : '') . (!empty($_SESSION['temp_attachments']['post']['last_msg']) ? (';last_msg=' . $_SESSION['temp_attachments']['post']['last_msg']) : '') . ';topic=' . $_SESSION['temp_attachments']['post']['topic'] . ';additionalOptions'; |
|
972 | 972 | |
973 | 973 | $post_errors[] = array('temp_attachments_found', array($delete_url, $goback_url, $file_list)); |
974 | 974 | $context['ignore_temp_attachments'] = true; |
@@ -1255,55 +1255,55 @@ discard block |
||
1255 | 1255 | foreach ($context['current_attachments'] as $key => $mock) |
1256 | 1256 | addInlineJavaScript(' |
1257 | 1257 | current_attachments.push({ |
1258 | - name: '. JavaScriptEscape($mock['name']) .', |
|
1259 | - size: '. $mock['size'] .', |
|
1260 | - attachID: '. $mock['attachID'] .', |
|
1261 | - approved: '. $mock['approved'] .', |
|
1262 | - type: '. JavaScriptEscape(!empty($mock['mime_type']) ? $mock['mime_type'] : '') .', |
|
1263 | - thumbID: '. (!empty($mock['thumb']) ? $mock['thumb'] : 0) .' |
|
1258 | + name: '. JavaScriptEscape($mock['name']) . ', |
|
1259 | + size: '. $mock['size'] . ', |
|
1260 | + attachID: '. $mock['attachID'] . ', |
|
1261 | + approved: '. $mock['approved'] . ', |
|
1262 | + type: '. JavaScriptEscape(!empty($mock['mime_type']) ? $mock['mime_type'] : '') . ', |
|
1263 | + thumbID: '. (!empty($mock['thumb']) ? $mock['thumb'] : 0) . ' |
|
1264 | 1264 | });', true); |
1265 | 1265 | } |
1266 | 1266 | |
1267 | 1267 | // File Upload. |
1268 | 1268 | if ($context['can_post_attachment']) |
1269 | 1269 | { |
1270 | - $acceptedFiles = implode(',', array_map(function($val) use($smcFunc) { return '.'. $smcFunc['htmltrim']($val);} , explode(',', $context['allowed_extensions']))); |
|
1270 | + $acceptedFiles = implode(',', array_map(function($val) use($smcFunc) { return '.' . $smcFunc['htmltrim']($val); } , explode(',', $context['allowed_extensions']))); |
|
1271 | 1271 | |
1272 | 1272 | loadJavaScriptFile('dropzone.min.js', array('defer' => true), 'smf_dropzone'); |
1273 | 1273 | loadJavaScriptFile('smf_fileUpload.js', array('defer' => true), 'smf_fileUpload'); |
1274 | 1274 | addInlineJavaScript(' |
1275 | 1275 | $(function() { |
1276 | 1276 | smf_fileUpload({ |
1277 | - dictDefaultMessage : '. JavaScriptEscape($txt['attach_drop_zone']) .', |
|
1278 | - dictFallbackMessage : '. JavaScriptEscape($txt['attach_drop_zone_no']) .', |
|
1279 | - dictCancelUpload : '. JavaScriptEscape($txt['modify_cancel']) .', |
|
1280 | - genericError: '. JavaScriptEscape($txt['attach_php_error']) .', |
|
1281 | - text_attachLeft: '. JavaScriptEscape($txt['attached_attachedLeft']) .', |
|
1282 | - text_deleteAttach: '. JavaScriptEscape($txt['attached_file_delete']) .', |
|
1283 | - text_attachDeleted: '. JavaScriptEscape($txt['attached_file_deleted']) .', |
|
1284 | - text_insertBBC: '. JavaScriptEscape($txt['attached_insertBBC']) .', |
|
1285 | - text_attachUploaded: '. JavaScriptEscape($txt['attached_file_uploaded']) .', |
|
1286 | - text_attach_unlimited: '. JavaScriptEscape($txt['attach_drop_unlimited']) .', |
|
1287 | - dictMaxFilesExceeded: '. JavaScriptEscape($txt['more_attachments_error']) .', |
|
1288 | - dictInvalidFileType: '. JavaScriptEscape(sprintf($txt['cant_upload_type'], $context['allowed_extensions'])) .', |
|
1289 | - dictFileTooBig: '. JavaScriptEscape(sprintf($txt['file_too_big'], comma_format($modSettings['attachmentSizeLimit'], 0))) .', |
|
1290 | - maxTotalSize: '. JavaScriptEscape($txt['attach_max_total_file_size_current']) .', |
|
1291 | - acceptedFiles: '. JavaScriptEscape($acceptedFiles) .', |
|
1292 | - maxFilesize: '. (!empty($modSettings['attachmentSizeLimit']) ? $modSettings['attachmentSizeLimit'] : 'null') .', |
|
1293 | - thumbnailWidth: '.(!empty($modSettings['attachmentThumbWidth']) ? $modSettings['attachmentThumbWidth'] : 'null') .', |
|
1294 | - thumbnailHeight: '.(!empty($modSettings['attachmentThumbHeight']) ? $modSettings['attachmentThumbHeight'] : 'null') .', |
|
1295 | - maxFiles: '. (!empty($context['num_allowed_attachments']) ? $context['num_allowed_attachments'] : 'null') .', |
|
1296 | - text_totalMaxSize: '. JavaScriptEscape($txt['attach_max_total_file_size_current']) .', |
|
1297 | - text_max_size_progress: '. JavaScriptEscape($txt['attach_max_size_progress']) .', |
|
1298 | - limitMultiFileUploadSize:'. round(max($modSettings['attachmentPostLimit'] - ($context['attachments']['total_size'] / 1024), 0)) * 1024 .', |
|
1299 | - maxLimitReferenceUploadSize: '. $modSettings['attachmentPostLimit'] * 1024 .', |
|
1277 | + dictDefaultMessage : '. JavaScriptEscape($txt['attach_drop_zone']) . ', |
|
1278 | + dictFallbackMessage : '. JavaScriptEscape($txt['attach_drop_zone_no']) . ', |
|
1279 | + dictCancelUpload : '. JavaScriptEscape($txt['modify_cancel']) . ', |
|
1280 | + genericError: '. JavaScriptEscape($txt['attach_php_error']) . ', |
|
1281 | + text_attachLeft: '. JavaScriptEscape($txt['attached_attachedLeft']) . ', |
|
1282 | + text_deleteAttach: '. JavaScriptEscape($txt['attached_file_delete']) . ', |
|
1283 | + text_attachDeleted: '. JavaScriptEscape($txt['attached_file_deleted']) . ', |
|
1284 | + text_insertBBC: '. JavaScriptEscape($txt['attached_insertBBC']) . ', |
|
1285 | + text_attachUploaded: '. JavaScriptEscape($txt['attached_file_uploaded']) . ', |
|
1286 | + text_attach_unlimited: '. JavaScriptEscape($txt['attach_drop_unlimited']) . ', |
|
1287 | + dictMaxFilesExceeded: '. JavaScriptEscape($txt['more_attachments_error']) . ', |
|
1288 | + dictInvalidFileType: '. JavaScriptEscape(sprintf($txt['cant_upload_type'], $context['allowed_extensions'])) . ', |
|
1289 | + dictFileTooBig: '. JavaScriptEscape(sprintf($txt['file_too_big'], comma_format($modSettings['attachmentSizeLimit'], 0))) . ', |
|
1290 | + maxTotalSize: '. JavaScriptEscape($txt['attach_max_total_file_size_current']) . ', |
|
1291 | + acceptedFiles: '. JavaScriptEscape($acceptedFiles) . ', |
|
1292 | + maxFilesize: '. (!empty($modSettings['attachmentSizeLimit']) ? $modSettings['attachmentSizeLimit'] : 'null') . ', |
|
1293 | + thumbnailWidth: '.(!empty($modSettings['attachmentThumbWidth']) ? $modSettings['attachmentThumbWidth'] : 'null') . ', |
|
1294 | + thumbnailHeight: '.(!empty($modSettings['attachmentThumbHeight']) ? $modSettings['attachmentThumbHeight'] : 'null') . ', |
|
1295 | + maxFiles: '. (!empty($context['num_allowed_attachments']) ? $context['num_allowed_attachments'] : 'null') . ', |
|
1296 | + text_totalMaxSize: '. JavaScriptEscape($txt['attach_max_total_file_size_current']) . ', |
|
1297 | + text_max_size_progress: '. JavaScriptEscape($txt['attach_max_size_progress']) . ', |
|
1298 | + limitMultiFileUploadSize:'. round(max($modSettings['attachmentPostLimit'] - ($context['attachments']['total_size'] / 1024), 0)) * 1024 . ', |
|
1299 | + maxLimitReferenceUploadSize: '. $modSettings['attachmentPostLimit'] * 1024 . ', |
|
1300 | 1300 | }); |
1301 | 1301 | });', true); |
1302 | 1302 | } |
1303 | 1303 | |
1304 | 1304 | // Knowing the current board ID might be handy. |
1305 | 1305 | addInlineJavaScript(' |
1306 | - var current_board = '. (empty($context['current_board']) ? 'null' : $context['current_board']) .';', false); |
|
1306 | + var current_board = '. (empty($context['current_board']) ? 'null' : $context['current_board']) . ';', false); |
|
1307 | 1307 | |
1308 | 1308 | // Finally, load the template. |
1309 | 1309 | if (!isset($_REQUEST['xml'])) |
@@ -1721,7 +1721,7 @@ discard block |
||
1721 | 1721 | } |
1722 | 1722 | |
1723 | 1723 | // Coming from the quickReply? |
1724 | - if(isset($_POST['quickReply'])) |
|
1724 | + if (isset($_POST['quickReply'])) |
|
1725 | 1725 | $_POST['message'] = $_POST['quickReply']; |
1726 | 1726 | |
1727 | 1727 | // Check the subject and message. |
@@ -2510,7 +2510,7 @@ discard block |
||
2510 | 2510 | FROM {db_prefix}messages AS m |
2511 | 2511 | LEFT JOIN {db_prefix}members AS mem ON (mem.id_member = m.id_member) |
2512 | 2512 | WHERE m.id_topic = {int:current_topic}' . (isset($_REQUEST['msg']) ? ' |
2513 | - AND m.id_msg < {int:id_msg}' : '') .(!$modSettings['postmod_active'] || allowedTo('approve_posts') ? '' : ' |
|
2513 | + AND m.id_msg < {int:id_msg}' : '') . (!$modSettings['postmod_active'] || allowedTo('approve_posts') ? '' : ' |
|
2514 | 2514 | AND m.approved = {int:approved}') . ' |
2515 | 2515 | ORDER BY m.id_msg DESC' . $limit, |
2516 | 2516 | array( |
@@ -240,8 +240,8 @@ |
||
240 | 240 | $time_string = str_replace(array('%I', '%H', '%S', '%r', '%R', '%T'), array('%l', '%k', '', '%l:%M %p', '%k:%M', '%l:%M'), $matches[0]); |
241 | 241 | |
242 | 242 | $js_time_string = str_replace( |
243 | - array('%H', '%k', '%I', '%l', '%M', '%p', '%P', '%r', '%R', '%S', '%T', '%X'), |
|
244 | - array('H', 'G', 'h', 'g', 'i', 'A', 'a', 'h:i:s A', 'H:i', 's', 'H:i:s', 'H:i:s'), |
|
243 | + array('%H', '%k', '%I', '%l', '%M', '%p', '%P', '%r', '%R', '%S', '%T', '%X'), |
|
244 | + array('H', 'G', 'h', 'g', 'i', 'A', 'a', 'h:i:s A', 'H:i', 's', 'H:i:s', 'H:i:s'), |
|
245 | 245 | $time_string |
246 | 246 | ); |
247 | 247 |