This patch file will update your forum to SMF 1.0.12.

File Edits ALT + Click to collapse all the operations

./index.php

Find: Select
* Software Version: SMF 1.0.11 *
Replace With: Select
* Software Version: SMF 1.0.12 *
Find: Select
$forum_version = 'SMF 1.0.11';
Replace With: Select
$forum_version = 'SMF 1.0.12';
Find: Select
if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'login2')
{
require_once($sourcedir . '/LogInOut.php');
return 'Login2';
Replace With: Select
if (isset($_REQUEST['action']) && ($_REQUEST['action'] == 'login2' || $_REQUEST['action'] == 'logout'))
{
require_once($sourcedir . '/LogInOut.php');
return $_REQUEST['action'] == 'login2' ? 'Login2' : 'Logout';

./Sources/Display.php

Find: Select
* Software Version: SMF 1.0.10 *
Replace With: Select
* Software Version: SMF 1.0.12 *
Find: Select
'name' => $attachment['filename'],
'downloads' => $attachment['downloads'],
'size' => round($attachment['filesize'] / 1024, 2) . ' ' . $txt['smf211'],
'byte_size' => $attachment['filesize'],
'href' => $scripturl . '?action=dlattach;topic=' . $topic . '.0;id=' . $attachment['ID_ATTACH'],
'link' => '<a href="' . $scripturl . '?action=dlattach;topic=' . $topic . '.0;id=' . $attachment['ID_ATTACH'] . '">' . $attachment['filename'] . '</a>',
Replace With: Select
'name' => htmlspecialchars($attachment['filename']),
'downloads' => $attachment['downloads'],
'size' => round($attachment['filesize'] / 1024, 2) . ' ' . $txt['smf211'],
'byte_size' => $attachment['filesize'],
'href' => $scripturl . '?action=dlattach;topic=' . $topic . '.0;id=' . $attachment['ID_ATTACH'],
'link' => '<a href="' . $scripturl . '?action=dlattach;topic=' . $topic . '.0;id=' . $attachment['ID_ATTACH'] . '">' . htmlspecialchars($attachment['filename']) . '</a>',

./Sources/ManageAttachments.php

Find: Select
* Software Version: SMF 1.0.10 *
Replace With: Select
* Software Version: SMF 1.0.12 *
Find: Select
'name' => $row['filename'],
'downloads' => $row['downloads'],
'href' => $scripturl . '?action=dlattach;' . ($context['browse_avatars'] ? 'type=avatar;' : 'topic=' . $row['ID_TOPIC'] . '.0;') . 'id=' . $row['ID_ATTACH'],
'link' => '<a href="' . $scripturl . '?action=dlattach;' . ($context['browse_avatars'] ? 'type=avatar;' : 'topic=' . $row['ID_TOPIC'] . '.0;') . 'id=' . $row['ID_ATTACH'] . '">' . $row['filename'] . '</a>'
Replace With: Select
'name' => htmlspecialchars($row['filename']),
'downloads' => $row['downloads'],
'href' => $row['attachmentType'] == 1 ? $modSettings['custom_avatar_url'] . '/' . $row['filename'] : ($scripturl . '?action=dlattach;' . ($context['browse_type'] == 'avatars' ? 'type=avatar;' : 'topic=' . $row['ID_TOPIC'] . '.0;') . 'id=' . $row['ID_ATTACH']),
'link' => '<a href="' . ($row['attachmentType'] == 1 ? $modSettings['custom_avatar_url'] . '/' . $row['filename'] : ($scripturl . '?action=dlattach;' . ($context['browse_type'] == 'avatars' ? 'type=avatar;' : 'topic=' . $row['ID_TOPIC'] . '.0;') . 'id=' . $row['ID_ATTACH'])) . '"' . (empty($row['width']) || empty($row['height']) ? '' : ' onclick="return reqWin(this.href + \';image\', ' . ($row['width'] + 20) . ', ' . ($row['height'] + 20) . ', true);"') . '>' . htmlspecialchars($row['filename']) . '</a>'

./Sources/Post.php

Find: Select
* Software Version: SMF 1.0.10 *
Replace With: Select
* Software Version: SMF 1.0.12 *
Find: Select
$context['event']['title'] = isset($_REQUEST['evtitle']) ? $_REQUEST['evtitle'] : '';
Replace With: Select
$context['event']['title'] = isset($_REQUEST['evtitle']) ? htmlspecialchars(stripslashes($_REQUEST['evtitle'])) : '';
Find: Select
if (allowedTo('moderate_forum'))
Replace With: Select
if (allowedTo('moderate_forum') && !empty($topic))

./Sources/QueryString.php

Find: Select
* Software Version: SMF 1.0.11 *
Replace With: Select
* Software Version: SMF 1.0.12 *
Find: Select
foreach (array_merge(array_keys($_REQUEST), array_keys($_COOKIE), array_keys($_FILES)) as $key)
Replace With: Select
foreach (array_merge(array_keys($_POST), array_keys($_GET), array_keys($_FILES)) as $key)
Find: Select
$_GET = htmlspecialchars__recursive($_GET);
Replace With: Select
$_GET = addslashes__recursive(htmlspecialchars__recursive($_GET));

./Sources/Subs-Post.php

Find: Select
* Software Version: SMF 1.0.10 *
Replace With: Select
* Software Version: SMF 1.0.12 *
Find: Select
$headers .= 'Date: ' . gmdate('D, d M Y H:i:s') . ' +0000' . "\r\n";
Replace With: Select
$headers .= 'Date: ' . gmdate('D, d M Y H:i:s') . ' -0000' . "\r\n";

./Sources/Subs.php

Find: Select
* Software Version: SMF 1.0.10 *
Replace With: Select
* Software Version: SMF 1.0.12 *
Find: Select
$clean .= '%s';
Replace With: Select
$clean .= ' %s ';
Find: Select
elseif (strpos($clean, 'set password') !== false && preg_match('~(^|[^a-z])set password($|[^[a-z])~s', $clean) != 0)
Replace With: Select
elseif (strpos($clean, 'sleep') !== false && preg_match('~(^|[^a-z])sleep($|[^[a-z])~s', $clean) != 0)
Find: Select
if (!is_array($setboards))
Replace With: Select
// Please - let's be sane.
if (empty($setboards))
return false;

if (!is_array($setboards))
Advertisement: