Advertisement:

Navigation

Readme

This patch file will update your forum to SMF 1.1.4.

File Edits

./index.php

Operation #1
Find: [Select]
* Software Version: SMF 1.1.3 *
Replace With: [Select]
* Software Version: SMF 1.1.4 *
Operation #2
Find: [Select]
$forum_version = 'SMF 1.1.3';
Replace With: [Select]
$forum_version = 'SMF 1.1.4';
Operation #3
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

Operation #1
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;attach=' . $attachment['ID_ATTACH'],
'link' => '<a href="' . $scripturl . '?action=dlattach;topic=' . $topic . '.0;attach=' . $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;attach=' . $attachment['ID_ATTACH'],
'link' => '<a href="' . $scripturl . '?action=dlattach;topic=' . $topic . '.0;attach=' . $attachment['ID_ATTACH'] . '">' . htmlspecialchars($attachment['filename']) . '</a>',

Operation #2
Find: [Select]
* Software Version: SMF 1.1.2 *
Replace With: [Select]
* Software Version: SMF 1.1.4 *
This operation isn't vital to the installation of this mod.

Operation #3
Find: [Select]
* Software Version: SMF 1.1.3 *
Replace With: [Select]
* Software Version: SMF 1.1.4 *
This operation isn't vital to the installation of this mod.

./Sources/ManageAttachments.php

Operation #1
Find: [Select]
* Software Version: SMF 1.1 *
Replace With: [Select]
* Software Version: SMF 1.1.4 *
Operation #2
Find: [Select]
'name' => $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);"') . '>' . $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/ManageMembergroups.php

Operation #1
Find: [Select]
* Software Version: SMF 1.1.2 *
Replace With: [Select]
* Software Version: SMF 1.1.4 *
Operation #2
Find: [Select]
$_REQUEST['toAdd'] = strtr($func['htmlspecialchars'](stripslashes($_REQUEST['toAdd']), ENT_QUOTES), array('&quot;' => '"'));
Replace With: [Select]
$_REQUEST['toAdd'] = strtr(addslashes($func['htmlspecialchars'](stripslashes($_REQUEST['toAdd']), ENT_QUOTES)), array('&quot;' => '"'));

./Sources/ManageNews.php

Operation #1
Find: [Select]
* Software Version: SMF 1.1.3 *
Replace With: [Select]
* Software Version: SMF 1.1.4 *
Operation #2
Find: [Select]
$condition = '
Replace With: [Select]
$condition .= '

./Sources/PersonalMessage.php

Operation #1
Find: [Select]
* Software Version: SMF 1.1.3 *
Replace With: [Select]
* Software Version: SMF 1.1.4 *
Operation #2
Find: [Select]
$userString = strtr($func['htmlspecialchars'](stripslashes($search_params['userspec']), ENT_QUOTES), array('&quot;' => '"'));
Replace With: [Select]
$userString = strtr(addslashes($func['htmlspecialchars'](stripslashes($search_params['userspec']), ENT_QUOTES)), array('&quot;' => '"'));

./Sources/Post.php

Operation #1
Find: [Select]
* Software Version: SMF 1.1.3 *
Replace With: [Select]
* Software Version: SMF 1.1.4 *
Operation #2
Find: [Select]
$context['preview_subject'] = '<i>' . $txt[24] . '</i>';
Replace With: [Select]
$context['preview_subject'] = '<i>' . $txt[24] . '</i>';

// Protect any CDATA blocks.
if (isset($_REQUEST['xml']))
$context['preview_message'] = strtr($context['preview_message'], array(']]>' => ']]]]><![CDATA[>'));

Operation #3
Find: [Select]
$context['event']['title'] = isset($_REQUEST['evtitle']) ? $_REQUEST['evtitle'] : '';
Replace With: [Select]
$context['event']['title'] = isset($_REQUEST['evtitle']) ? htmlspecialchars(stripslashes($_REQUEST['evtitle'])) : '';
Operation #4
Find: [Select]
if (allowedTo('moderate_forum'))
Replace With: [Select]
if (allowedTo('moderate_forum') && !empty($topic))

./Sources/Profile.php

Operation #1
Find: [Select]
* Software Version: SMF 1.1.3 *
Replace With: [Select]
* Software Version: SMF 1.1.4 *
Operation #2
Find: [Select]
$_POST['new_buddy'] = strtr($func['htmlspecialchars'](stripslashes($_POST['new_buddy']), ENT_QUOTES), array('&quot;' => '"'));
Replace With: [Select]
$_POST['new_buddy'] = strtr(addslashes($func['htmlspecialchars'](stripslashes($_POST['new_buddy']), ENT_QUOTES)), array('&quot;' => '"'));

./Sources/QueryString.php

Operation #1
Find: [Select]
* Software Version: SMF 1.1.3 *
Replace With: [Select]
* Software Version: SMF 1.1.4 *
Operation #2
Find: [Select]
foreach (array_merge(array_keys($_REQUEST), array_keys($_FILES)) as $key)
Replace With: [Select]
foreach (array_merge(array_keys($_POST), array_keys($_GET), array_keys($_FILES)) as $key)
Operation #3
Find: [Select]
$_GET = htmlspecialchars__recursive($_GET);
Replace With: [Select]
$_GET = addslashes__recursive(htmlspecialchars__recursive($_GET));

./Sources/Search.php

Operation #1
Find: [Select]
* Software Version: SMF 1.1.2 *
Replace With: [Select]
* Software Version: SMF 1.1.4 *
Operation #2
Find: [Select]
$userString = strtr($func['htmlspecialchars'](stripslashes($search_params['userspec']), ENT_QUOTES), array('&quot;' => '"'));
Replace With: [Select]
$userString = strtr(addslashes($func['htmlspecialchars'](stripslashes($search_params['userspec']), ENT_QUOTES)), array('&quot;' => '"'));

./Sources/Subs-Boards.php

Operation #1
Find: [Select]
* Software Version: SMF 1.1 *
Replace With: [Select]
* Software Version: SMF 1.1.4 *
Operation #2
Find: [Select]
$moderator_string = strtr($func['htmlspecialchars'](stripslashes($boardOptions['moderator_string']), ENT_QUOTES), array('&quot;' => '"'));
Replace With: [Select]
$moderator_string = strtr(addslashes($func['htmlspecialchars'](stripslashes($boardOptions['moderator_string']), ENT_QUOTES)), array('&quot;' => '"'));

./Sources/Subs-Post.php

Operation #1
Find: [Select]
* Software Version: SMF 1.1.2 *
Replace With: [Select]
* Software Version: SMF 1.1.4 *
Operation #2
Find: [Select]
$parts[$i] = preg_replace('~\[([/]?)(list|li|table|tr|td)([^\]]*)\]~e', '"[$1" . strtolower("$2") . "$3]"', $parts[$i]);
Replace With: [Select]
$parts[$i] = preg_replace('~\[([/]?)(list|li|table|tr|td)([^\]]*)\]~ie', '\'[$1\' . strtolower(\'$2\') . \'$3]\'', $parts[$i]);
Operation #3
Find: [Select]
$headers .= 'Date: ' . gmdate('D, d M Y H:i:s') . ' +0000' . $line_break;
Replace With: [Select]
$headers .= 'Date: ' . gmdate('D, d M Y H:i:s') . ' -0000' . $line_break;
Operation #4
Find: [Select]
return array($charset, preg_replace('~([\x80-' . ($context['server']['complex_preg_chars'] ? '\x{10FFFF}' : pack('C*', 0xF7, 0xBF, 0xBF, 0xBF)) . '])~eu', '$entityConvert("\1")', $string), '7bit');
Replace With: [Select]
return array($charset, preg_replace('~([\x80-' . ($context['server']['complex_preg_chars'] ? '\x{10FFFF}' : pack('C*', 0xF7, 0xBF, 0xBF, 0xBF)) . '])~eu', '$entityConvert(\'\1\')', $string), '7bit');
Operation #5
Find: [Select]
if (!is_array($setboards))
Replace With: [Select]
// Please - let's be sane.
if (empty($setboards))
return false;

if (!is_array($setboards))

./Sources/Subs.php

Operation #1
Find: [Select]
* Software Version: SMF 1.1.3 *
Replace With: [Select]
* Software Version: SMF 1.1.4 *
Operation #2
Find: [Select]
$clean .= '%s';
Replace With: [Select]
$clean .= ' %s ';
Operation #3
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)
Operation #4
Find: [Select]
if ($refresh)
Replace With: [Select]
if ($refresh && !WIRELESS)
Operation #5
Find: [Select]
elseif (strpos($test, 'invalid option') && !isset($modSettings['host_to_dis']))
Replace With: [Select]
elseif ((strpos($test, 'invalid option') || strpos($test, 'Invalid query name 1')) && !isset($modSettings['host_to_dis']))