Update to SMF 2.1.6 - Installation Instructions for 2.1.5

Update to SMF 2.1.6
This will update your forum to SMF 2.1.6.

File Edits ALT + Click to collapse all the operations

./SSI.php

Find: Select
* @version 2.1.5
Replace With: Select
* @version 2.1.6
Find: Select
define('SMF_VERSION', '2.1.5');
Replace With: Select
define('SMF_VERSION', '2.1.6');

./cron.php

Find: Select
* @version 2.1.5
Replace With: Select
* @version 2.1.6
Find: Select
define('SMF_VERSION', '2.1.5');
Replace With: Select
define('SMF_VERSION', '2.1.6');

./index.php

Find: Select
* @version 2.1.5
Replace With: Select
* @version 2.1.6
Find: Select
define('SMF_VERSION', '2.1.5');
Replace With: Select
define('SMF_VERSION', '2.1.6');

./proxy.php

Find: Select
* @version 2.1.5
Replace With: Select
* @version 2.1.6
Find: Select
define('SMF_VERSION', '2.1.5');
Replace With: Select
define('SMF_VERSION', '2.1.6');

./Sources/QueryString.php

Find: Select
* @version 2.1.5
Replace With: Select
* @version 2.1.6
Find: Select
'~"' . preg_quote($scripturl, '~') . '\?(?:' . $sid . '(?:;|&|&))((?:board|topic)=[^#"]+?)(#[^"]*?)?"~',
function($m)
{
global $scripturl;
Replace With: Select
'~"' . preg_quote($scripturl, '~') . '\?(?:' . $sid . '(?:;|&|&))((?:board|topic)=[^#"]+?)(#[^"]*?)?"~',
function($m) use ($scripturl, $sid)
{

./Sources/Search.php

Find: Select
* @version 2.1.5
Replace With: Select
* @version 2.1.6
Find: Select
$main_query['group_by'][] = 'm.id_msg, t.id_first_msg, t.id_last_msg';
Replace With: Select
$main_query['group_by'][] = 't.id_topic, m.id_msg, t.id_first_msg, t.id_last_msg';

./Sources/Subs.php

Find: Select
* @version 2.1.5
Replace With: Select
* @version 2.1.6
Find: Select
// Nested tag with quoted value detected, use next end tag
$nested_tag_pos = strpos($message, $quoted == false ? ']' : $quot . ']', $pos1) + strlen($quot);
Replace With: Select
// Nested tag with quoted value detected, use next end tag
$nested_tag_pos = strpos($message, $quoted == false ? ']' : $quot, $pos1) + strlen($quot);
Find: Select
'~^' . preg_quote($scripturl, '~') . '\?(?:' . $sid . '(?:;|&|&))((?:board|topic)=[^#]+?)(#[^"]*?)?$~',
function($m) use ($scripturl)
Replace With: Select
'~^' . preg_quote($scripturl, '~') . '\?(?:' . $sid . '(?:;|&|&))((?:board|topic)=[^#]+?)(#[^"]*?)?$~',
function($m) use ($scripturl, $sid)

Code

auto_1.php
This file should not be able to execute standalone.You may have to run the following queries manually.
Query: Select
<?php
define('REQUIRED_PHP_VERSION', '7.1.0');
if (version_compare(PHP_VERSION, REQUIRED_PHP_VERSION, '<')) {
fatal_error('This update requires a minimum of PHP ' . REQUIRED_PHP_VERSION . ' in order to function. (You are currently running PHP ' . PHP_VERSION . ')');
}

// Update smfVersion.
updateSettings(array('smfVersion' => '2.1.6'));
?>
Advertisement: