Update to SMF 1.1.16 - Installation Instructions for 1.1.15

Update to SMF 1.1.16
This patch file will update your forum to SMF 1.1.16.

File Edits ALT + Click to collapse all the operations

./index.php

Find: Select
* =============================================================================== *
* Software Version: SMF 1.1.15 *
Replace With: Select
* =============================================================================== *
* Software Version: SMF 1.1.16 *
Find: Select
$forum_version = 'SMF 1.1.15';
Replace With: Select
$forum_version = 'SMF 1.1.16';
Find: Select
foreach (array('db_character_set') as $variable)
if (isset($GLOBALS[$variable]))
unset($GLOBALS[$variable]);
Replace With: Select
foreach (array('db_character_set') as $variable)
if (isset($GLOBALS[$variable]))
unset($GLOBALS[$variable], $GLOBALS[$variable]);

./Sources/Packages.php

Find: Select
* =============================================================================== *
* Software Version: SMF 1.1.11 *
Replace With: Select
* =============================================================================== *
* Software Version: SMF 1.1.16 *
Find: Select
updateSettings(array(
'package_server' => $_POST['pack_server'],
'package_port' => $_POST['pack_port'],
'package_username' => $_POST['pack_user'],
'package_make_backups' => !empty($_POST['package_make_backups'])
));
Replace With: Select
updateSettings(array(
'package_server' => htmlspecialchars($_POST['pack_server'], ENT_QUOTES),
'package_port' => htmlspecialchars($_POST['pack_port'], ENT_QUOTES),
'package_username' => htmlspecialchars($_POST['pack_user'], ENT_QUOTES),
'package_make_backups' => !empty($_POST['package_make_backups'])
));

./Sources/MessageIndex.php

Find: Select
* =============================================================================== *
* Software Version: SMF 1.1 *
Replace With: Select
* =============================================================================== *
* Software Version: SMF 1.1.16 *
Find: Select
// View all the topics, or just a few?
$maxindex = isset($_REQUEST['all']) && !empty($modSettings['enableAllMessages']) ? $board_info['num_topics'] : $modSettings['defaultMaxTopics'];

// Make sure the starting place makes sense and construct the page index.
Replace With: Select
// View all the topics, or just a few?
$maxindex = isset($_REQUEST['all']) && !empty($modSettings['enableAllMessages']) ? $board_info['num_topics'] : $modSettings['defaultMaxTopics'];

// We only know these.
if (isset($_REQUEST['sort']) && !in_array($_REQUEST['sort'], array('subject', 'starter', 'last_poster', 'replies', 'views', 'first_post', 'last_post')))
$_REQUEST['sort'] = 'last_post';

// Make sure the starting place makes sense and construct the page index.
Advertisement: