Update to SMF 1.1.13 - Installation Instructions for 1.1.12

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

File Edits ALT + Click to collapse all the operations

./index.php

Find: Select
* =============================================================================== *
* Software Version: SMF 1.1.12 *
Replace With: Select
* =============================================================================== *
* Software Version: SMF 1.1.13 *
Find: Select
$forum_version = 'SMF 1.1.12';
Replace With: Select
$forum_version = 'SMF 1.1.13';

./Sources/Search.php

Find: Select
* =============================================================================== *
* Software Version: SMF 1.1.5 *
Replace With: Select
* =============================================================================== *
* Software Version: SMF 1.1.13 *
Find: Select
FROM ({$db_prefix}topics AS t, {$db_prefix}" . ($createTemporary ? 'tmp_' : '') . "log_search_topics AS lst)
WHERE lst.ID_TOPIC = t.ID_TOPIC" . (empty($modSettings['search_max_results']) ? '' : "
LIMIT " . ($modSettings['search_max_results'] - $_SESSION['search_cache']['num_results'])), __FILE__, __LINE__);
Replace With: Select
FROM ({$db_prefix}topics AS t, {$db_prefix}" . ($createTemporary ? 'tmp_' : '') . "log_search_topics AS lst)
WHERE " . ($createTemporary ? '' : 'lst.ID_SEARCH = ' . $_SESSION['search_cache']['ID_SEARCH'] . ' AND ') . 'lst.ID_TOPIC = t.ID_TOPIC' . (empty($modSettings['search_max_results']) ? '' : "
LIMIT " . ($modSettings['search_max_results'] - $_SESSION['search_cache']['num_results'])), __FILE__, __LINE__);

./Sources/ManageNews.php

Find: Select
* =============================================================================== *
* Software Version: SMF 1.1.5 *
Replace With: Select
* =============================================================================== *
* Software Version: SMF 1.1.13 *
Find: Select
if (trim($news) == '')
unset($_POST['news'][$i]);
else
preparsecode($_POST['news'][$i]);
Replace With: Select
if (trim($news) == '')
unset($_POST['news'][$i]);
else
{
$_POST['news'][$i] = $func['htmlspecialchars']($_POST['news'][$i], ENT_QUOTES);
preparsecode($_POST['news'][$i]);
}
Find: Select
'unparsed' => $func['htmlspecialchars'](un_preparsecode($line)),
Replace With: Select
'unparsed' => un_preparsecode($line),

./ssi_examples.php

Find: Select
<?php

require(dirname(__FILE__) . '/SSI.php');
Replace With: Select
<?php

/* Define $ssi_guest_access variable just before including SSI.php to handle guest access to your script.
false: (default) fallback to forum setting
true: allow guest access to the script regardless
*/
$ssi_guest_access = false;

require(dirname(__FILE__) . '/SSI.php');

./SSI.php

Find: Select
* =============================================================================== *
* Software Version: SMF 1.1.7 *
Replace With: Select
* =============================================================================== *
* Software Version: SMF 1.1.13 *
Find: Select
// Load the stuff like the menu bar, etc.
if (isset($ssi_layers))
Replace With: Select
// Do we allow guests in here?
if (empty($ssi_guest_access) && empty($modSettings['allow_guestAccess']) && $user_info['is_guest'] && basename($_SERVER['PHP_SELF']) != 'SSI.php')
{
require_once($sourcedir . '/Subs-Auth.php');
KickGuest();
obExit(null, true);
}

// Load the stuff like the menu bar, etc.
if (isset($ssi_layers))
Find: Select
// Call a function passed by GET.
if (isset($_GET['ssi_function']) && function_exists('ssi_' . $_GET['ssi_function']))
Replace With: Select
// Call a function passed by GET.
if (isset($_GET['ssi_function']) && function_exists('ssi_' . $_GET['ssi_function']) && (!empty($modSettings['allow_guestAccess']) || !$user_info['is_guest']))

./Sources/QueryString.php

Find: Select
* =============================================================================== *
* Software Version: SMF 1.1.9 *
Replace With: Select
* =============================================================================== *
* Software Version: SMF 1.1.13 *
Find: Select
// Now make absolutely sure it's a number.
$board = (int) $_REQUEST['board'];
Replace With: Select
// Now make absolutely sure it's a number.
$board = (int) $_REQUEST['board'];
$_REQUEST['start'] = isset($_REQUEST['start']) ? (int) $_REQUEST['start'] : 0;
Find: Select
// There should be a $_REQUEST['start'], some at least. If you need to default to other than 0, use $_GET['start'].
if (empty($_REQUEST['start']) || $_REQUEST['start'] < 0)
Replace With: Select
// There should be a $_REQUEST['start'], some at least. If you need to default to other than 0, use $_GET['start'].
if (empty($_REQUEST['start']) || $_REQUEST['start'] < 0 || (int) $_REQUEST['start'] > 2147473647)

./Sources/Subs.php

Find: Select
* =============================================================================== *
* Software Version: SMF 1.1.11 *
Replace With: Select
* =============================================================================== *
* Software Version: SMF 1.1.13 *
Find: Select
// Save whether $start was less than 0 or not.
$start_invalid = $start < 0;
Replace With: Select
// Save whether $start was less than 0 or not.
$start = (int) $start;
$start_invalid = $start < 0;

./Themes/default/languages/index.english.php

This operation isn't vital to the installation of this mod.
Find: Select
// Version: 1.1.9; index
Replace With: Select
// Version: 1.1.13; index
This operation isn't vital to the installation of this mod.
Find: Select
$forum_copyright = '<a href="http://www.simplemachines.org/" title="Simple Machines Forum" target="_blank">Powered by ' . $forum_version . '</a> |
<a href="http://www.simplemachines.org/about/copyright.php" title="Free Forum Software" target="_blank">SMF &copy; 2006-2009, Simple Machines LLC</a>';
Replace With: Select
$forum_copyright = '<a href="http://www.simplemachines.org/" title="Simple Machines Forum" target="_blank">Powered by ' . $forum_version . '</a> |
<a href="http://www.simplemachines.org/about/copyright.php" title="Free Forum Software" target="_blank">SMF &copy; 2006-2011, Simple Machines LLC</a>';

./Themes/default/languages/Admin.english.php

This operation isn't vital to the installation of this mod.
Find: Select
// Version: 1.1; Admin
Replace With: Select
// Version: 1.1.13; Admin
This operation isn't vital to the installation of this mod.
Find: Select
$txt[670] = 'Please place one news item per box. Some BBC tags, such as <span title="Are you bold?">[b]</span>, <span title="I tall icks!!">[i]</span> and <span title="Brackets are great, no?">[u]</span> are allowed in your news, as well as smileys and HTML. Clear a news item\'s text box to remove it.';
Replace With: Select
$txt[670] = 'Please place one news item per box. BBC tags, such as <span title="Are you bold?">[b]</span>, <span title="I tall icks!!">[i]</span> and <span title="Brackets are great, no?">[u]</span> are allowed in your news, as well as smileys. Clear a news item\'s text box to remove it.';
Advertisement: