diff --git a/Sources/ManageMaintenance.php b/Sources/ManageMaintenance.php index aa5c841d5a..b271082ebd 100644 --- a/Sources/ManageMaintenance.php +++ b/Sources/ManageMaintenance.php @@ -818,7 +818,7 @@ function AdminBoardRecount() validateToken(!isset($_REQUEST['step']) ? 'admin-maint' : 'admin-boardrecount'); $context['not_done_token'] = 'admin-boardrecount'; createToken($context['not_done_token']); - + $context['page_title'] = $txt['not_done_title']; $context['continue_post_data'] = ''; $context['continue_countdown'] = 3; diff --git a/Sources/Profile-View.php b/Sources/Profile-View.php index 962243970d..8481a513b4 100644 --- a/Sources/Profile-View.php +++ b/Sources/Profile-View.php @@ -237,7 +237,7 @@ function fetch_alerts($memID, $to_fetch = false, $limit = 0, $offset = 0, $with_ // Basic sanitation. $memID = (int) $memID; $unread = $to_fetch === false; - + if (empty($limit) || $limit > 1000) $limit = min(!empty($modSettings['alerts_per_page']) && (int) $modSettings['alerts_per_page'] < 1000 ? (int) $modSettings['alerts_per_page'] : 1000, 1000); diff --git a/Sources/Session.php b/Sources/Session.php index bd09b3c97f..cad2e321da 100644 --- a/Sources/Session.php +++ b/Sources/Session.php @@ -68,7 +68,7 @@ function loadSession() @ini_set('session.serialize_handler', 'php_serialize'); if (ini_get('session.serialize_handler') != 'php_serialize') @ini_set('session.serialize_handler', 'php'); - + $context['session_handler'] = new SmfSessionHandler(); session_set_save_handler($context['session_handler'], true); @@ -101,8 +101,12 @@ function loadSession() * Class SmfSessionHandler * * An implementation of the SessionHandler - * Note: To support PHP 8.x ,we use the attribute ReturnTypeWillChange. When 8.1 is the miniumn, this can be removed. - * Note: To support PHP 7.x, we do not use type hints as SessionHandlerInterface does not have them. + * + * Note: To support PHP 8.x, we use the attribute ReturnTypeWillChange. When + * 8.1 is the miniumn, this can be removed. + * + * Note: To support PHP 7.x, we do not use type hints as SessionHandlerInterface + * does not have them. */ class SmfSessionHandler extends SessionHandler implements SessionHandlerInterface, SessionIdInterface { diff --git a/Sources/Subs-Attachments.php b/Sources/Subs-Attachments.php index 603df83ff8..217afe0e8d 100644 --- a/Sources/Subs-Attachments.php +++ b/Sources/Subs-Attachments.php @@ -1403,7 +1403,7 @@ function prepareAttachsByMsg($msgIDs) if (!empty($msgIDs) || !empty($_SESSION['attachments_can_preview'])) { // Where clause - there may or may not be msg ids, & may or may not be attachs to preview, - // depending on post vs edit, inserted or not, preview or not, post error or not, etc. + // depending on post vs edit, inserted or not, preview or not, post error or not, etc. // Either way, they may be needed in a display of a list of posts or in the dropzone 'mock' list of thumbnails. $msg_or_att = ''; if (!empty($msgIDs)) diff --git a/Sources/Subs-Auth.php b/Sources/Subs-Auth.php index 5f797b8981..13684d6bf4 100644 --- a/Sources/Subs-Auth.php +++ b/Sources/Subs-Auth.php @@ -880,7 +880,7 @@ function smf_setcookie($name, $value = '', $expire = 0, $path = '', $domain = '' 'path' => $path, 'domain' => $domain, 'secure' => $secure, - 'httponly' => $httponly, + 'httponly' => $httponly, 'samesite' => $samesite )); } diff --git a/Sources/Subs-Graphics.php b/Sources/Subs-Graphics.php index dbb1a3dd01..96017e61d5 100644 --- a/Sources/Subs-Graphics.php +++ b/Sources/Subs-Graphics.php @@ -630,7 +630,7 @@ function resizeImage($src_img, $destName, $src_width, $src_height, $max_width, $ elseif (!empty($preferred_format) && ($preferred_format == 15) && function_exists('imagewbmp')) $success = imagewbmp($dst_img, $destName); elseif (!empty($preferred_format) && ($preferred_format == 18) && function_exists('imagewebp')) - $success = imagewebp($dst_img, $destName); + $success = imagewebp($dst_img, $destName); elseif (function_exists('imagejpeg')) $success = imagejpeg($dst_img, $destName, !empty($modSettings['avatar_jpeg_quality']) ? $modSettings['avatar_jpeg_quality'] : 82); diff --git a/Sources/Subs-Membergroups.php b/Sources/Subs-Membergroups.php index b5332a3ab8..2ff22dbb01 100644 --- a/Sources/Subs-Membergroups.php +++ b/Sources/Subs-Membergroups.php @@ -544,7 +544,7 @@ function addMembersToGroup($members, $group, $type = 'auto', $permissionCheckDon if ($is_protected == 1) return false; } - + // Do the actual updates. if ($type == 'only_additional') $smcFunc['db_query']('', ' diff --git a/Sources/Subs.php b/Sources/Subs.php index 3e0b7c9df3..0500e9027a 100644 --- a/Sources/Subs.php +++ b/Sources/Subs.php @@ -5853,7 +5853,7 @@ function add_integration_function($hook, $function, $permanent = true, $file = ' // Cleanup enabled/disabled variants before taking action. $current_functions = array_diff($current_functions, array($enabled_call, $disabled_call)); - + $permanent_functions = array_unique(array_merge($current_functions, array($integration_call))); } else diff --git a/Sources/tasks/CreatePost-Notify.php b/Sources/tasks/CreatePost-Notify.php index dfdbd8d78b..ee7cc925bd 100644 --- a/Sources/tasks/CreatePost-Notify.php +++ b/Sources/tasks/CreatePost-Notify.php @@ -142,7 +142,7 @@ public function execute() mem.email_address, mem.lngfile, mem.pm_ignore_list, mem.id_group, mem.id_post_group, mem.additional_groups, mem.time_format, mem.time_offset, mem.timezone, - b.member_groups, t.id_member_started, t.id_member_updated + t.id_member_started, t.id_member_updated FROM {db_prefix}log_notify AS ln INNER JOIN {db_prefix}members AS mem ON (ln.id_member = mem.id_member) LEFT JOIN {db_prefix}topics AS t ON (t.id_topic = ln.id_topic) diff --git a/other/upgrade_2-1_mysql.sql b/other/upgrade_2-1_mysql.sql index ccd2610d7d..bfb5761fa5 100644 --- a/other/upgrade_2-1_mysql.sql +++ b/other/upgrade_2-1_mysql.sql @@ -440,7 +440,7 @@ if (!empty($modSettings['currentAttachmentUploadDir']) && !is_array($modSettings $modSettings['attachmentUploadDir'] = @json_decode($modSettings['attachmentUploadDir'], true); // No need to do this if we already did it previously... Unless requested... -if (empty($modSettings['attachments_21_done']) || !empty($upcontext['reprocess_attachments'])) +if (empty($modSettings['attachments_21_done']) || !empty($upcontext['reprocess_attachments'])) $is_done = false; else $is_done = true;