Advertisement:

Navigation

Readme

This patch file will update your forum to SMF 1.1.10.

File Edits

./index.php

Operation #1
Find: [Select]
* Software Version: SMF 1.1.9 *
Replace With: [Select]
* Software Version: SMF 1.1.10 *
Operation #2
Find: [Select]

$forum_version = 'SMF 1.1.9';
Replace With: [Select]

$forum_version = 'SMF 1.1.10';

./Sources/ManageAttachments.php

Operation #1
Find: [Select]
* Software Version: SMF 1.1.9 *
Replace With: [Select]
* Software Version: SMF 1.1.10 *
Operation #2
Find: [Select]
'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>'
Replace With: [Select]
'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 + \'' . ($modSettings['custom_avatar_url'] ? '' : ';image') . '\', ' . ($row['width'] + 20) . ', ' . ($row['height'] + 20) . ', true);"') . '>' . htmlspecialchars($row['filename']) . '</a>'

./Sources/ManageBans.php

Operation #1
Find: [Select]
* Software Version: SMF 1.1 *
Replace With: [Select]
* Software Version: SMF 1.1.10 *
Operation #2
Find: [Select]
* Copyright 2006 by: Simple Machines LLC (http://www.simplemachines.org) *
Replace With: [Select]
* Copyright 2006-2009 by: Simple Machines LLC (http://www.simplemachines.org) *
Operation #3
Find: [Select]
if (!empty($updates))
foreach ($updates as $newStatus => $members)
updateMemberData($members, array('is_activated' => $newStatus));
Replace With: [Select]
if (!empty($updates))
foreach ($updates as $newStatus => $members)
updateMemberData($members, array('is_activated' => $newStatus));

// Update the amount of members awaiting approval
updateStats('member');

./Sources/ManageRegistration.php

Operation #1
Find: [Select]
* Software Version: SMF 1.1.6 *
Replace With: [Select]
* Software Version: SMF 1.1.10 *
Operation #2
Find: [Select]
'send_welcome_email' => isset($_POST['emailPassword']),
Replace With: [Select]
'send_welcome_email' => isset($_POST['emailPassword']) || empty($_POST['password']),
Operation #3
Find: [Select]

* Copyright 2006-2007 by: Simple Machines LLC (http://www.simplemachines.org) *
Replace With: [Select]

* Copyright 2006-2009 by: Simple Machines LLC (http://www.simplemachines.org) *
This operation isn't vital to the installation of this mod.

Operation #4
Find: [Select]

* Copyright 2006 by: Simple Machines LLC (http://www.simplemachines.org) *
Replace With: [Select]

* Copyright 2006-2009 by: Simple Machines LLC (http://www.simplemachines.org) *
This operation isn't vital to the installation of this mod.

./Sources/Packages.php

Operation #1
Find: [Select]
* Software Version: SMF 1.1.8 *
Replace With: [Select]
* Software Version: SMF 1.1.10 *
Operation #2
Find: [Select]
'type' => $txt['package56'],
'action' => strtr($action['filename'], array($boarddir => '.')),
Replace With: [Select]
'type' => $txt['package56'],
'action' => htmlspecialchars(strtr($action['filename'], array($boarddir => '.'))),

Operation #3
Find: [Select]
'action' => strtr($mod_action['filename'], array($boarddir => '.')),
'description' => $failed ? $txt['package_action_failure'] : $txt['package_action_success']
Replace With: [Select]
'action' => htmlspecialchars(strtr($mod_action['filename'], array($boarddir => '.'))),
'description' => $failed ? $txt['package_action_failure'] : $txt['package_action_success']

Operation #4
Find: [Select]
'action' => strtr($mod_action['filename'], array($boarddir => '.')),
'description' => $txt['package_action_skipping']
Replace With: [Select]
'action' => htmlspecialchars(strtr($mod_action['filename'], array($boarddir => '.'))),
'description' => $txt['package_action_skipping']

Operation #5
Find: [Select]
'action' => strtr($mod_action['filename'], array($boarddir => '.')),
'description' => $txt['package_action_missing']
Replace With: [Select]
'action' => htmlspecialchars(strtr($mod_action['filename'], array($boarddir => '.'))),
'description' => $txt['package_action_missing']

Operation #6
Find: [Select]
'action' => strtr($mod_action['filename'], array($boarddir => '.')),
'description' => $txt['package_action_error']
Replace With: [Select]
'action' => htmlspecialchars(strtr($mod_action['filename'], array($boarddir => '.'))),
'description' => $txt['package_action_error']

Operation #7
Find: [Select]
'type' => $txt['package57'],
'action' => $action['filename']
Replace With: [Select]
'type' => $txt['package57'],
'action' => htmlspecialchars($action['filename'])

Operation #8
Find: [Select]
'type' => $txt['package50'] . ' ' . ($action['type'] == 'create-dir' ? $txt['package55'] : $txt['package54']),
'action' => strtr($action['destination'], array($boarddir => '.'))
Replace With: [Select]
'type' => $txt['package50'] . ' ' . ($action['type'] == 'create-dir' ? $txt['package55'] : $txt['package54']),
'action' => htmlspecialchars(strtr($action['destination'], array($boarddir => '.')))

Operation #9
Find: [Select]
'type' => $txt['package53'] . ' ' . ($action['type'] == 'require-dir' ? $txt['package55'] : $txt['package54']),
'action' => strtr($action['destination'], array($boarddir => '.'))
Replace With: [Select]
'type' => $txt['package53'] . ' ' . ($action['type'] == 'require-dir' ? $txt['package55'] : $txt['package54']),
'action' => htmlspecialchars(strtr($action['destination'], array($boarddir => '.')))

Operation #10
Find: [Select]
'type' => $txt['package51'] . ' ' . ($action['type'] == 'move-dir' ? $txt['package55'] : $txt['package54']),
'action' => strtr($action['source'], array($boarddir => '.')) . ' => ' . strtr($action['destination'], array($boarddir => '.'))
Replace With: [Select]
'type' => $txt['package51'] . ' ' . ($action['type'] == 'move-dir' ? $txt['package55'] : $txt['package54']),
'action' => htmlspecialchars(strtr($action['source'], array($boarddir => '.'))) . ' => ' . htmlspecialchars(strtr($action['destination'], array($boarddir => '.')))

Operation #11
Find: [Select]
'type' => $txt['package52'] . ' ' . ($action['type'] == 'remove-dir' ? $txt['package55'] : $txt['package54']),
'action' => strtr($action['filename'], array($boarddir => '.'))
Replace With: [Select]
'type' => $txt['package52'] . ' ' . ($action['type'] == 'remove-dir' ? $txt['package55'] : $txt['package54']),
'action' => htmlspecialchars(strtr($action['filename'], array($boarddir => '.')))

Operation #12
Find: [Select]

* Copyright 2006-2007 by: Simple Machines LLC (http://www.simplemachines.org) *
Replace With: [Select]

* Copyright 2006-2009 by: Simple Machines LLC (http://www.simplemachines.org) *
This operation isn't vital to the installation of this mod.

Operation #13
Find: [Select]

* Copyright 2006 by: Simple Machines LLC (http://www.simplemachines.org) *
Replace With: [Select]

* Copyright 2006-2009 by: Simple Machines LLC (http://www.simplemachines.org) *
This operation isn't vital to the installation of this mod.

./Sources/PersonalMessage.php

Operation #1
Find: [Select]
* Software Version: SMF 1.1.6 *
Replace With: [Select]
* Software Version: SMF 1.1.10 *
Operation #2
Find: [Select]
$context['post_error'][$error_type] = true;
if (isset($txt['error_' . $error_type]))
$context['post_error']['messages'][] = $txt['error_' . $error_type];
Replace With: [Select]
// There is no compatible language string. So lets work around that.
if ($error_type == 'wrong_verification_code')
$txt['error_wrong_verification_code'] = $txt['visual_verification_failed'];

$context['post_error'][$error_type] = true;
if (isset($txt['error_' . $error_type]))
$context['post_error']['messages'][] = $txt['error_' . $error_type];

Operation #3
Find: [Select]

* Copyright 2006-2007 by: Simple Machines LLC (http://www.simplemachines.org) *
Replace With: [Select]

* Copyright 2006-2009 by: Simple Machines LLC (http://www.simplemachines.org) *
This operation isn't vital to the installation of this mod.

Operation #4
Find: [Select]

* Copyright 2006 by: Simple Machines LLC (http://www.simplemachines.org) *
Replace With: [Select]

* Copyright 2006-2009 by: Simple Machines LLC (http://www.simplemachines.org) *
This operation isn't vital to the installation of this mod.

./Sources/Post.php

Operation #1
Find: [Select]
* Software Version: SMF 1.1.9 *
Replace With: [Select]
* Software Version: SMF 1.1.10 *
Operation #2
Find: [Select]
// Check if it's locked. It isn't locked if no topic is specified.
if (!empty($topic))
Replace With: [Select]
// No message is complete without a topic.
if (empty($topic) && !empty($_REQUEST['msg']))
{
$request = db_query("
SELECT id_topic
FROM {$db_prefix}messages
WHERE id_msg = " . (int) $_REQUEST['msg'], __FILE__, __LINE__);
if (mysql_num_rows($request) != 1)
unset($_REQUEST['msg'], $_POST['msg'], $_GET['msg']);
else
list($topic) = mysql_fetch_row($request);
mysql_free_result($request);
}

// Check if it's locked. It isn't locked if no topic is specified.
if (!empty($topic))

Operation #3
Find: [Select]
// Previewing an edit?
if (isset($_REQUEST['msg']))
{
Replace With: [Select]
// Previewing an edit?
if (isset($_REQUEST['msg']) && !empty($topic))
{
// Get the existing message.
$request = db_query("
SELECT
m.ID_MEMBER, m.modifiedTime, m.smileysEnabled, m.body,
m.posterName, m.posterEmail, m.subject, m.icon,
IFNULL(a.size, -1) AS filesize, a.filename, a.ID_ATTACH,
t.ID_MEMBER_STARTED AS ID_MEMBER_POSTER, m.posterTime
FROM ({$db_prefix}messages AS m, {$db_prefix}topics AS t)
LEFT JOIN {$db_prefix}attachments AS a ON (a.ID_MSG = m.ID_MSG AND a.attachmentType = 0)
WHERE m.ID_MSG = " . (int) $_REQUEST['msg'] . "
AND m.ID_TOPIC = $topic
AND t.ID_TOPIC = $topic", __FILE__, __LINE__);
// The message they were trying to edit was most likely deleted.
// !!! Change this error message?
if (mysql_num_rows($request) == 0)
fatal_lang_error('smf232', false);
$row = mysql_fetch_assoc($request);

$attachment_stuff = array($row);
while ($row2 = mysql_fetch_assoc($request))
$attachment_stuff[] = $row2;
mysql_free_result($request);

if ($row['ID_MEMBER'] == $ID_MEMBER && !allowedTo('modify_any'))
{
// Give an extra five minutes over the disable time threshold, so they can type.
if (!empty($modSettings['edit_disable_time']) && $row['posterTime'] + ($modSettings['edit_disable_time'] + 5) * 60 < time())
fatal_lang_error('modify_post_time_passed', false);
elseif ($row['ID_MEMBER_POSTER'] == $ID_MEMBER && !allowedTo('modify_own'))
isAllowedTo('modify_replies');
else
isAllowedTo('modify_own');
}
elseif ($row['ID_MEMBER_POSTER'] == $ID_MEMBER && !allowedTo('modify_any'))
isAllowedTo('modify_replies');
else
isAllowedTo('modify_any');

Operation #4
Find: [Select]
// Editing a message...
elseif (isset($_REQUEST['msg']))
Replace With: [Select]
// Editing a message...
elseif (isset($_REQUEST['msg']) && !empty($topic))

Operation #5
Find: [Select]
// Posting a new topic.
elseif (empty($topic))
{
Replace With: [Select]
// Posting a new topic.
elseif (empty($topic))
{
// Now don't be silly, new topics will get their own id_msg soon enough.
unset($_REQUEST['msg'], $_POST['msg'], $_GET['msg']);

./Sources/Profile.php

Operation #1
Find: [Select]
* Software Version: SMF 1.1.9 *
Replace With: [Select]
* Software Version: SMF 1.1.10 *
Operation #2
Find: [Select]
'url' => 'http://www.apnic.net/apnic-bin/whois2.pl?searchtext=' . $context['ip'],
Replace With: [Select]
'url' => 'http://wq.apnic.net/apnic-bin/whois.pl?searchtext=' . $context['ip'],
Operation #3
Find: [Select]
'url' => 'http://ws.arin.net/cgi-bin/whois.pl?queryinput=' . $context['ip'],
Replace With: [Select]
'url' => 'http://ws.arin.net/whois/?queryinput=' . $context['ip'],
Operation #4
Find: [Select]
'url' => 'http://www.ripe.net/perl/whois?searchtext=' . $context['ip'],
Replace With: [Select]
'url' => 'http://www.db.ripe.net/whois?searchtext=' . $context['ip'],

./Sources/Register.php

Operation #1
Find: [Select]
* Software Version: SMF 1.1.6 *
Replace With: [Select]
* Software Version: SMF 1.1.10 *
Operation #2
Find: [Select]
if (trim($_POST['realName']) != '' && !isReservedName($_POST['realName'], $memID) && $func['strlen']($_POST['realName']) <= 60)
Replace With: [Select]
if (trim($_POST['realName']) != '' && !isReservedName($_POST['realName']) && $func['strlen']($_POST['realName']) <= 60)
Operation #3
Find: [Select]

* Copyright 2006-2007 by: Simple Machines LLC (http://www.simplemachines.org) *
Replace With: [Select]

* Copyright 2006-2009 by: Simple Machines LLC (http://www.simplemachines.org) *
This operation isn't vital to the installation of this mod.

Operation #4
Find: [Select]

* Copyright 2006 by: Simple Machines LLC (http://www.simplemachines.org) *
Replace With: [Select]

* Copyright 2006-2009 by: Simple Machines LLC (http://www.simplemachines.org) *
This operation isn't vital to the installation of this mod.

./Sources/Subs-Auth.php

Operation #1
Find: [Select]
* Software Version: SMF 1.1.6 *
Replace With: [Select]
* Software Version: SMF 1.1.10 *
Operation #2
Find: [Select]
* Copyright 2006 by: Simple Machines LLC (http://www.simplemachines.org) *
Replace With: [Select]
* Copyright 2006-2009 by: Simple Machines LLC (http://www.simplemachines.org) *
Operation #3
Find: [Select]
// Version 4.3.2 didn't store the cookie of the new session.
if (version_compare(PHP_VERSION, '4.3.2') === 0)
setcookie(session_name(), session_id(), time() + $cookie_length, $cookie_url[1], '', 0);
Replace With: [Select]
// Version 4.3.2 didn't store the cookie of the new session.
if (version_compare(PHP_VERSION, '4.3.2') === 0 || (isset($_COOKIE[session_name()]) && $_COOKIE[session_name()] != session_id()))
setcookie(session_name(), session_id(), time() + $cookie_length, $cookie_url[1], '', 0);

./Themes/default/Register.template.php

Operation #1
Find: [Select]
// Version: 1.1.5; Register
Replace With: [Select]
// Version: 1.1.10; Register
Operation #2
Find: [Select]
if (document.forms.postForm.emailActivate.checked)
Replace With: [Select]
if (document.forms.postForm.emailActivate.checked || document.forms.postForm.password.value == \'\')
Operation #3
Find: [Select]
<input type="password" name="password" id="password_input" size="30" /><br />
Replace With: [Select]
<input type="password" name="password" id="password_input" size="30" onchange="onCheckChange();" /><br />
Operation #4
Find: [Select]
<input type="checkbox" name="emailPassword" id="emailPassword_check" checked="checked"', !empty($modSettings['registration_method']) && $modSettings['registration_method'] == 1 ? ' disabled="disabled"' : '', ' class="check" /><br />
Replace With: [Select]
<input type="checkbox" name="emailPassword" id="emailPassword_check" checked="checked" disabled="disabled" class="check" /><br />