Function AlignURLsWithSSLSetting
Align URLs with SSL Setting.
If force_ssl has changed, ensure all URLs are aligned with the new setting. This includes: - $boardurl - $modSettings['smileys_url'] - $modSettings['avatar_url'] - $modSettings['custom_avatar_url'] - if found - theme_url - all entries in the themes table - images_url - all entries in the themes table
This function will NOT overwrite URLs that are not subfolders of $boardurl. The admin must have pointed those somewhere else on purpose, so they must be updated manually.
A word of caution: You can't trust the http/https scheme reflected for these URLs in $globals (e.g., $boardurl) or in $modSettings. This is because SMF may change them in memory to comply with the force_ssl setting - a soft redirect may be in effect... Thus, conditional updates to these values do not work. You gotta just brute force overwrite them based on force_ssl.
Copyright: 2020 Simple Machines and individual contributors
License: BSD
Author: Simple Machines https://www.simplemachines.org
Located at Sources/ManageServer.php
integer |
$new_force_ssl = 0 |
is the current force_ssl setting. |
|
Returns nothing, just does its job |