Advertisement:

Navigation

Readme

This patch file will update your forum to SMF 1.1.11.

File Edits

./index.php

Operation #1
Find: [Select]
* Software Version: SMF 1.1.10 *
Replace With: [Select]
* Software Version: SMF 1.1.11 *
Operation #2
Find: [Select]
$forum_version = 'SMF 1.1.10';
Replace With: [Select]
$forum_version = 'SMF 1.1.11';

./Sources/BoardIndex.php

Operation #1
Find: [Select]
* Software Version: SMF 1.1 *
Replace With: [Select]
* Software Version: SMF 1.1.11 *
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]
'collapse_href' => isset($row_board['canCollapse']) ? $scripturl . '?action=collapse;c=' . $row_board['ID_CAT'] . ';sa=' . ($row_board['isCollapsed'] > 0 ? 'expand' : 'collapse;') . '#' . $row_board['ID_CAT'] : '',
Replace With: [Select]
'collapse_href' => isset($row_board['canCollapse']) ? $scripturl . '?action=collapse;c=' . $row_board['ID_CAT'] . ';sa=' . ($row_board['isCollapsed'] > 0 ? 'expand' : 'collapse') . ';sesc=' . $context['session_id'] . '#' . $row_board['ID_CAT'] : '',

./Sources/Display.php

Operation #1
Find: [Select]
* Software Version: SMF 1.1.9 *
Replace With: [Select]
* Software Version: SMF 1.1.11 *
Operation #2
Find: [Select]
function Download()
{
global $txt, $modSettings, $db_prefix, $user_info, $scripturl, $context, $sourcedir;
Replace With: [Select]
function Download()
{
global $txt, $modSettings, $db_prefix, $user_info, $scripturl, $context, $sourcedir, $topic;

Operation #3
Find: [Select]
isAllowedTo('view_attachments');

// Make sure this attachment is on this board.
Replace With: [Select]
// This checks only the current board for $board/$topic's permissions.
isAllowedTo('view_attachments');

// Make sure this attachment is on this board.

Operation #4
Find: [Select]
$request = db_query("
SELECT a.filename, a.ID_ATTACH, a.attachmentType, a.file_hash
FROM ({$db_prefix}boards AS b, {$db_prefix}messages AS m, {$db_prefix}attachments AS a)
Replace With: [Select]
// NOTE: We must verify that $topic is the attachment's topic, or else the permission check above is broken.
$request = db_query("
SELECT a.filename, a.ID_ATTACH, a.attachmentType, a.file_hash
FROM ({$db_prefix}boards AS b, {$db_prefix}messages AS m, {$db_prefix}attachments AS a)

Operation #5
Find: [Select]
AND a.ID_ATTACH = $_REQUEST[attach]
LIMIT 1", __FILE__, __LINE__);
}
Replace With: [Select]
AND m.ID_TOPIC = $topic
AND a.ID_ATTACH = $_REQUEST[attach]
LIMIT 1", __FILE__, __LINE__);
}

./Sources/Load.php

Operation #1
Find: [Select]
* Software Version: SMF 1.1.9 *
Replace With: [Select]
* Software Version: SMF 1.1.11 *
Operation #2
Find: [Select]
// This isn't meant to be reliable, it's just meant to catch most bots to prevent PHPSESSID from showing up.
Replace With: [Select]
// 1.1.x doesn't detect IE8, so render as IE7.
$context['html_headers'] .= '<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />';

// This isn't meant to be reliable, it's just meant to catch most bots to prevent PHPSESSID from showing up.

./Sources/ManageAttachments.php

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

Operation #3
Find: [Select]
a.filename, a.file_hash, a.attachmentType, a.ID_ATTACH, a.ID_MEMBER" . ($query_type == 'messages' ? ', m.ID_MSG' : ', a.ID_MSG') . ",
IFNULL(thumb.ID_ATTACH, 0) AS ID_THUMB, thumb.filename AS thumb_filename, thumb_parent.ID_ATTACH AS ID_PARENT
Replace With: [Select]
a.filename, a.file_hash, a.attachmentType, a.ID_ATTACH, a.ID_MEMBER" . ($query_type == 'messages' ? ', m.ID_MSG' : ', a.ID_MSG') . ",
IFNULL(thumb.ID_ATTACH, 0) AS ID_THUMB, thumb.filename AS thumb_filename, thumb_parent.ID_ATTACH AS ID_PARENT,
thumb.file_hash as thumb_file_hash

Operation #4
Find: [Select]
if (!empty($row['ID_THUMB']) && $autoThumbRemoval)
{
$thumb_filename = getAttachmentFilename($row['thumb_filename'], $row['ID_THUMB'], false, $row['file_hash']);
Replace With: [Select]
if (!empty($row['ID_THUMB']) && $autoThumbRemoval)
{
$thumb_filename = getAttachmentFilename($row['thumb_filename'], $row['ID_THUMB'], false, $row['thumb_file_hash']);

./Sources/ManageCalendar.php

Operation #1
Find: [Select]
* Software Version: SMF 1.1 *
Replace With: [Select]
* Software Version: SMF 1.1.11 *
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]

// Submitting?
if (isset($_POST['sc']) && (isset($_REQUEST['delete']) || $_REQUEST['title'] != ''))
Replace With: [Select]

// Cast this for safety...
if (isset($_REQUEST['holiday']))
$_REQUEST['holiday'] = (int) $_REQUEST['holiday'];

// Submitting?
if (isset($_POST['sc']) && (isset($_REQUEST['delete']) || $_REQUEST['title'] != ''))

./Sources/ManageMembers.php

Operation #1
Find: [Select]
* Software Version: SMF 1.1.6 *
Replace With: [Select]
* Software Version: SMF 1.1.11 *
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]
// Check input after a member search has been submitted.
if ($context['sub_action'] == 'query' && empty($_REQUEST['params']))
Replace With: [Select]
// Build a search for a specific group or post group.
if ($context['sub_action'] === 'query')
{
if (isset($_GET['group']))
$_POST['membergroups'] = array(
array((int) $_GET['group']),
array((int) $_GET['group']),
);
elseif (isset($_GET['pgroup']))
$_POST['postgroups'] = array((int) $_GET['pgroup']);
}

if ($context['sub_action'] == 'query' && !empty($_REQUEST['params']) && empty($_POST))
{
$search_params = base64_decode(stripslashes($_REQUEST['params']));
$_POST += addslashes__recursive(@unserialize($search_params));
}

// Check input after a member search has been submitted.
if ($context['sub_action'] == 'query')

Operation #4
Find: [Select]
}
// If the query information was already packed in the URL, decode it.
// !!! Change this.
elseif ($context['sub_action'] == 'query')
$where = base64_decode(strtr($_REQUEST['params'], array(' ' => '+')));

// Construct the additional URL part with the query info in it.
$context['params_url'] = $context['sub_action'] == 'query' ? ';sa=query;params=' . base64_encode($where) : '';
Replace With: [Select]

$search_params = base64_encode(serialize(stripslashes__recursive($_POST)));
}
else
$search_params = null;

// Construct the additional URL part with the query info in it.
$context['params_url'] = $context['sub_action'] == 'query' ? ';sa=query;params=' . $search_params : '';

./Sources/ManagePermissions.php

Operation #1
Find: [Select]
* Software Version: SMF 1.1.5 *
Replace With: [Select]
* Software Version: SMF 1.1.11 *
Operation #2
Find: [Select]
'can_search' => true,
'href' => $scripturl . '?action=viewmembers;sa=query;params=' . base64_encode('ID_GROUP = 0'),
Replace With: [Select]
'can_search' => true,
'href' => $scripturl . '?action=viewmembers;sa=query;group=0',

Operation #3
Find: [Select]
'can_search' => $row['ID_GROUP'] != 3,
'href' => $scripturl . '?action=viewmembers;sa=query;params=' . base64_encode($row['minPosts'] == -1 ? "ID_GROUP = $row[ID_GROUP] OR FIND_IN_SET($row[ID_GROUP], additionalGroups)" : "ID_POST_GROUP = $row[ID_GROUP]"),
Replace With: [Select]
'can_search' => $row['ID_GROUP'] != 3,
'href' => $scripturl . '?action=viewmembers;sa=query' . ($row['minPosts'] == -1 ? ';group=' . (int) $row['ID_GROUP'] : ';pgroup=' . (int) $row['ID_GROUP']),

Operation #4
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 #5
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.

Operation #6
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 #7
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/ManageSmileys.php

Operation #1
Find: [Select]
* Software Version: SMF 1.1.1 *
Replace With: [Select]
* Software Version: SMF 1.1.11 *
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]
'path' => $set,
'name' => $set_names[$i],
'selected' => $set == $modSettings['smiley_sets_default']
);
}
Replace With: [Select]
'path' => htmlspecialchars($set),
'name' => htmlspecialchars($set_names[$i]),
'selected' => $set == $modSettings['smiley_sets_default']
);
}

Operation #4
Find: [Select]
'path' => $set,
'name' => $set_names[$i],
'selected' => $set == $modSettings['smiley_sets_default']
);

// Importing any smileys from an existing set?
Replace With: [Select]
'path' => htmlspecialchars($set),
'name' => htmlspecialchars($set_names[$i]),
'selected' => $set == $modSettings['smiley_sets_default']
);

// Importing any smileys from an existing set?

Operation #5
Find: [Select]
ImportSmileys($context['smiley_sets'][$_GET['set']]['path']);
Replace With: [Select]
ImportSmileys(un_htmlspecialchars($context['smiley_sets'][$_GET['set']]['path']));
Operation #6
Find: [Select]
'path' => $set,
'name' => $set_names[$i],
'selected' => $set == $modSettings['smiley_sets_default']
);

// Submitting a form?
Replace With: [Select]
'path' => htmlspecialchars($set),
'name' => htmlspecialchars($set_names[$i]),
'selected' => $set == $modSettings['smiley_sets_default']
);

// Submitting a form?

Operation #7
Find: [Select]
if (!is_writable($context['smileys_dir'] . '/' . $set['path']))
Replace With: [Select]
if (!is_writable($context['smileys_dir'] . '/' . un_htmlspecialchars($set['path'])))
Operation #8
Find: [Select]
while (isset($context['smiley_sets'][$i]) && file_exists($context['smileys_dir'] . '/' . $context['smiley_sets'][$i]['path'] . '/' . $destName))
Replace With: [Select]
while (isset($context['smiley_sets'][$i]) && file_exists($context['smileys_dir'] . '/' . un_htmlspecialchars($context['smiley_sets'][$i]['path']) . '/' . $destName))
Operation #9
Find: [Select]
$smileyLocation = $context['smileys_dir'] . '/' . $context['smiley_sets'][$i]['path'] . '/' . $destName;
move_uploaded_file($_FILES['uploadSmiley']['tmp_name'], $smileyLocation);
@chmod($smileyLocation, 0644);

// Now, we want to move it from there to all the other sets.
for ($n = count($context['smiley_sets']); $i < $n; $i++)
{
$currentPath = $context['smileys_dir'] . '/' . $context['smiley_sets'][$i]['path'] . '/' . $destName;
Replace With: [Select]
$smileyLocation = $context['smileys_dir'] . '/' . un_htmlspecialchars($context['smiley_sets'][$i]['path']) . '/' . $destName;
move_uploaded_file($_FILES['uploadSmiley']['tmp_name'], $smileyLocation);
@chmod($smileyLocation, 0644);

// Now, we want to move it from there to all the other sets.
for ($n = count($context['smiley_sets']); $i < $n; $i++)
{
$currentPath = $context['smileys_dir'] . '/' . un_htmlspecialchars($context['smiley_sets'][$i]['path']) . '/' . $destName;

Operation #10
Find: [Select]
if (!isset($_FILES['individual_' . $set['name']]['name']) || $_FILES['individual_' . $set['name']]['name'] == '')
Replace With: [Select]
$set['name'] = un_htmlspecialchars($set['name']);
$set['path'] = un_htmlspecialchars($set['path']);

if (!isset($_FILES['individual_' . $set['name']]['name']) || $_FILES['individual_' . $set['name']]['name'] == '')

Operation #11
Find: [Select]
if (!file_exists($context['smileys_dir'] . '/' . $smiley_set['path']))
continue;

$dir = dir($context['smileys_dir'] . '/' . $smiley_set['path']);
Replace With: [Select]
if (!file_exists($context['smileys_dir'] . '/' . un_htmlspecialchars($smiley_set['path'])))
continue;

$dir = dir($context['smileys_dir'] . '/' . un_htmlspecialchars($smiley_set['path']));

Operation #12
Find: [Select]
'path' => $set,
'name' => $set_names[$i],
'selected' => $set == $modSettings['smiley_sets_default']
);

// Prepare overview of all (custom) smileys.
Replace With: [Select]
'path' => htmlspecialchars($set),
'name' => htmlspecialchars($set_names[$i]),
'selected' => $set == $modSettings['smiley_sets_default']
);

// Prepare overview of all (custom) smileys.

Operation #13
Find: [Select]
if (!file_exists($modSettings['smileys_dir'] . '/' . $smiley_set['path'] . '/' . $smiley['filename']))
Replace With: [Select]
if (!file_exists($modSettings['smileys_dir'] . '/' . un_htmlspecialchars($smiley_set['path']) . '/' . $smiley['filename']))
Operation #14
Find: [Select]
'path' => $set,
'name' => $set_names[$i],
'selected' => $set == $modSettings['smiley_sets_default']
);

$context['selected_set'] = $modSettings['smiley_sets_default'];
Replace With: [Select]
'path' => htmlspecialchars($set),
'name' => htmlspecialchars($set_names[$i]),
'selected' => $set == $modSettings['smiley_sets_default']
);

$context['selected_set'] = $modSettings['smiley_sets_default'];

Operation #15
Find: [Select]
if (!file_exists($context['smileys_dir'] . '/' . $smiley_set['path']))
continue;

$dir = dir($context['smileys_dir'] . '/' . $smiley_set['path']);
Replace With: [Select]
if (!file_exists($context['smileys_dir'] . '/' . un_htmlspecialchars($smiley_set['path'])))
continue;

$dir = dir($context['smileys_dir'] . '/' . un_htmlspecialchars($smiley_set['path']));

./Sources/Modlog.php

Operation #1
Find: [Select]
* Software Version: SMF 1.1 *
Replace With: [Select]
* Software Version: SMF 1.1.11 *
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 we have no search, a broken search, or a new search - then create a new array.
if (!isset($search_params['string']) || (!empty($_REQUEST['search']) && $search_params['string'] != $_REQUEST['search']))
{
// This array houses all the valid search types.
$searchTypes = array(
'action' => array('sql' => 'lm.action', 'label' => $txt['modlog_action']),
'member' => array('sql' => 'mem.realName', 'label' => $txt['modlog_member']),
'group' => array('sql' => 'mg.groupName', 'label' => $txt['modlog_position']),
'ip' => array('sql' => 'lm.ip', 'label' => $txt['modlog_ip'])
);

$search_params = array(
'string' => empty($_REQUEST['search']) ? '' : $_REQUEST['search'],
'type' => isset($_REQUEST['search_type']) && isset($searchTypes[$_REQUEST['search_type']]) ? $_REQUEST['search_type'] : isset($searchTypes[$context['order']]) ? $context['order'] : 'member',
'type_sql' => isset($_REQUEST['search_type']) && isset($searchTypes[$_REQUEST['search_type']]) ? $searchTypes[$_REQUEST['search_type']]['sql'] : isset($searchTypes[$context['order']]) ? $context['columns'][$context['order']]['sql'] : 'mem.realName',
'type_label' => isset($_REQUEST['search_type']) && isset($searchTypes[$_REQUEST['search_type']]) ? $searchTypes[$_REQUEST['search_type']]['label'] : isset($searchTypes[$context['order']]) ? $context['columns'][$context['order']]['label'] : $txt['modlog_member'],
);
}
Replace With: [Select]
// This array houses all the valid search types.
$searchTypes = array(
'action' => array('sql' => 'lm.action', 'label' => $txt['modlog_action']),
'member' => array('sql' => 'mem.realName', 'label' => $txt['modlog_member']),
'group' => array('sql' => 'mg.groupName', 'label' => $txt['modlog_position']),
'ip' => array('sql' => 'lm.ip', 'label' => $txt['modlog_ip'])
);

if (!isset($search_params['string']) || (!empty($_REQUEST['search']) && $search_params['string'] != $_REQUEST['search']))
$search_params_string = empty($_REQUEST['search']) ? '' : $_REQUEST['search'];
else
$search_params_string = $search_params['string'];

if (isset($_REQUEST['search_type']) || empty($search_params['type']) || !isset($searchTypes[$search_params['type']]))
$search_params_type = isset($_REQUEST['search_type']) && isset($searchTypes[$_REQUEST['search_type']]) ? $_REQUEST['search_type'] : (isset($searchTypes[$context['order']]) ? $context['order'] : 'member');
else
$search_params_type = $search_params['type'];

$search_params_column = $searchTypes[$search_params_type]['sql'];
$search_params = array(
'string' => $search_params_string,
'type' => $search_params_type,
);

Operation #4
Find: [Select]
'label' => $search_params['type_label']
Replace With: [Select]
'label' => $searchTypes[$search_params_type]['label'],
Operation #5
Find: [Select]
WHERE INSTR($search_params[type_sql], '$search_params[string]')" : ''), __FILE__, __LINE__);
Replace With: [Select]
WHERE INSTR($search_params_column, '$search_params[string]')" : ''), __FILE__, __LINE__);
Operation #6
Find: [Select]
WHERE INSTR($search_params[type_sql], '$search_params[string]')" : '') . "
Replace With: [Select]
WHERE INSTR($search_params_column, '$search_params[string]')" : '') . "

./Sources/PackageGet.php

Operation #1
Find: [Select]
* Software Version: SMF 1.1.9 *
Replace With: [Select]
* Software Version: SMF 1.1.11 *
Operation #2
Find: [Select]
'name' => $row['name'],
'url' => $row['url'],
Replace With: [Select]
'name' => htmlspecialchars($row['name']),
'url' => htmlspecialchars($row['url']),

Operation #3
Find: [Select]
function PackageServerRemove()
{
global $db_prefix;
Replace With: [Select]
function PackageServerRemove()
{
global $db_prefix;

checkSession('get');

./Sources/Packages.php

Operation #1
Find: [Select]
* Software Version: SMF 1.1.10 *
Replace With: [Select]
* Software Version: SMF 1.1.11 *
Operation #2
Find: [Select]
$_GET['package'] = preg_replace('~[\.]+~', '.', strtr($_GET['package'], '/', '_'));

// Can't delete what's not there.
if (file_exists($boarddir . '/Packages/' . $_GET['package']))
Replace With: [Select]
$_GET['package'] = preg_replace('~[\.]+~', '.', strtr($_GET['package'], array('/' => '_', '\\' => '_')));

// Can't delete what's not there.
if (file_exists($boarddir . '/Packages/' . $_GET['package']) && (substr($_GET['package'], -4) == '.zip' || substr($_GET['package'], -4) == '.tgz' || substr($_GET['package'], -7) == '.tar.gz' || is_dir($boarddir . '/Packages/' . $_GET['package'])) && $_GET['package'] != 'backups' && substr($_GET['package'], 0, 1) != '.')

Operation #3
Find: [Select]
if (isset($_POST['submit']))
{
Replace With: [Select]
if (isset($_POST['submit']))
{
checkSession('post');

Operation #4
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 #5
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/Poll.php

Operation #1
Find: [Select]
* Software Version: SMF 1.1 *
Replace With: [Select]
* Software Version: SMF 1.1.11 *
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]
elseif (!empty($row['changeVote']))
{
Replace With: [Select]
elseif (!empty($row['changeVote']))
{
checkSession('request');

Operation #4
Find: [Select]
// Check permissions.
if (!allowedTo('poll_remove_any'))
Replace With: [Select]
checkSession('get');

// Check permissions.
if (!allowedTo('poll_remove_any'))

./Sources/Post.php

Operation #1
Find: [Select]
* Software Version: SMF 1.1.10 *
Replace With: [Select]
* Software Version: SMF 1.1.11 *
Operation #2
Find: [Select]
'name' => $row['filename'],
Replace With: [Select]
'name' => htmlspecialchars($row['filename']),
Operation #3
Find: [Select]
'name' => $attachment['filename'],
Replace With: [Select]
'name' => htmlspecialchars($attachment['filename']),

./Sources/Profile.php

Operation #1
Find: [Select]
* Software Version: SMF 1.1.10 *
Replace With: [Select]
* Software Version: SMF 1.1.11 *
Operation #2
Find: [Select]
if (strlen($_POST['websiteUrl']) < 8)
Replace With: [Select]
if (strlen($_POST['websiteUrl']) < 8 || (substr($_POST['websiteUrl'], 0, 7) !== 'http://' && substr($_POST['websiteUrl'], 0, 8) !== 'https://'))
Operation #3
Find: [Select]
'id' => $set,
'name' => $set_names[$i],
'selected' => $set == $context['member']['smiley_set']['id']
);

if ($context['smiley_sets'][$i]['selected'])
$context['member']['smiley_set']['name'] = $set_names[$i];
Replace With: [Select]
'id' => htmlspecialchars($set),
'name' => htmlspecialchars($set_names[$i]),
'selected' => $set == $context['member']['smiley_set']['id']
);

if ($context['smiley_sets'][$i]['selected'])
$context['member']['smiley_set']['name'] = htmlspecialchars($set_names[$i]);

./Sources/SplitTopics.php

Operation #1
Find: [Select]
* Software Version: SMF 1.1.6 *
Replace With: [Select]
* Software Version: SMF 1.1.11 *
Operation #2
Find: [Select]

// Handle URLs from MergeIndex.
Replace With: [Select]
checkSession('request');

// Handle URLs from MergeIndex.

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.php

Operation #1
Find: [Select]
* Software Version: SMF 1.1.9 *
Replace With: [Select]
* Software Version: SMF 1.1.11 *
Operation #2
Find: [Select]
'tag' => 'ftp',
'type' => 'unparsed_content',
'content' => '<a href="$1" target="_blank">$1</a>',
'validate' => create_function('&$tag, &$data, $disabled', '$data = strtr($data, array(\'<br />\' => \'\'));'),
Replace With: [Select]
'tag' => 'ftp',
'type' => 'unparsed_content',
'content' => '<a href="$1" target="_blank">$1</a>',
'validate' => create_function('&$tag, &$data, $disabled', '
$data = strtr($data, array(\'<br />\' => \'\'));
if (strpos($data, \'ftp://\') !== 0 && strpos($data, \'ftps://\') !== 0)
$data = \'ftp://\' . $data;
'),

Operation #3
Find: [Select]
'tag' => 'ftp',
'type' => 'unparsed_equals',
'before' => '<a href="$1" target="_blank">',
'after' => '</a>',
Replace With: [Select]
'tag' => 'ftp',
'type' => 'unparsed_equals',
'before' => '<a href="$1" target="_blank">',
'after' => '</a>',
'validate' => create_function('&$tag, &$data, $disabled', '
if (strpos($data, \'ftp://\') !== 0 && strpos($data, \'ftps://\') !== 0)
$data = \'ftp://\' . $data;
'),

Operation #4
Find: [Select]
'validate' => create_function('&$tag, &$data, $disabled', '
if (isset($disabled[\'url\']))
$tag[\'content\'] = \'$1\';'),
'disabled_content' => '<a href="$1" target="_blank">$1</a>',
Replace With: [Select]
'validate' => create_function('&$tag, &$data, $disabled', '
if (isset($disabled[\'url\']))
$tag[\'content\'] = \'$1\';
elseif (strpos($data[0], \'http://\') !== 0 && strpos($data[0], \'https://\') !== 0)
$data[0] = \'http://\' . $data[0];
'),
'disabled_content' => '<a href="$1" target="_blank">$1</a>',

Operation #5
Find: [Select]
'content' => '<img src="$1" alt="{alt}"{width}{height} border="0" />',
'validate' => create_function('&$tag, &$data, $disabled', '$data = strtr($data, array(\'<br />\' => \'\'));'),
Replace With: [Select]
'content' => '<img src="$1" alt="{alt}"{width}{height} border="0" />',
'validate' => create_function('&$tag, &$data, $disabled', '
$data = strtr($data, array(\'<br />\' => \'\'));
if (strpos($data, \'http://\') !== 0 && strpos($data, \'https://\') !== 0)
$data = \'http://\' . $data;
'),

Operation #6
Find: [Select]
'content' => '<img src="$1" alt="" border="0" />',
'validate' => create_function('&$tag, &$data, $disabled', '$data = strtr($data, array(\'<br />\' => \'\'));'),
Replace With: [Select]
'content' => '<img src="$1" alt="" border="0" />',
'validate' => create_function('&$tag, &$data, $disabled', '
$data = strtr($data, array(\'<br />\' => \'\'));
if (strpos($data, \'http://\') !== 0 && strpos($data, \'https://\') !== 0)
$data = \'http://\' . $data;
'),

Operation #7
Find: [Select]
'content' => '<a href="$1">$1</a>',
'validate' => create_function('&$tag, &$data, $disabled', '$data = strtr($data, array(\'<br />\' => \'\'));'),
Replace With: [Select]
'content' => '<a href="$1">$1</a>',
'validate' => create_function('&$tag, &$data, $disabled', '
$data = strtr($data, array(\'<br />\' => \'\'));
if (strpos($data, \'http://\') !== 0 && strpos($data, \'https://\') !== 0)
$data = \'http://\' . $data;
'),

Operation #8
Find: [Select]
'tag' => 'iurl',
'type' => 'unparsed_equals',
'before' => '<a href="$1">',
'after' => '</a>',
'validate' => create_function('&$tag, &$data, $disabled', '
if (substr($data, 0, 1) == \'#\')
$data = \'#post_\' . substr($data, 1);'),
Replace With: [Select]
'tag' => 'iurl',
'type' => 'unparsed_equals',
'before' => '<a href="$1">',
'after' => '</a>',
'validate' => create_function('&$tag, &$data, $disabled', '
if (substr($data, 0, 1) == \'#\')
$data = \'#post_\' . substr($data, 1);
elseif (strpos($data, \'http://\') !== 0 && strpos($data, \'https://\') !== 0)
$data = \'http://\' . $data;
'),

Operation #9
Find: [Select]
'tag' => 'url',
'type' => 'unparsed_content',
'content' => '<a href="$1" target="_blank">$1</a>',
'validate' => create_function('&$tag, &$data, $disabled', '$data = strtr($data, array(\'<br />\' => \'\'));'),
Replace With: [Select]
'tag' => 'url',
'type' => 'unparsed_content',
'content' => '<a href="$1" target="_blank">$1</a>',
'validate' => create_function('&$tag, &$data, $disabled', '
$data = strtr($data, array(\'<br />\' => \'\'));
if (strpos($data, \'http://\') !== 0 && strpos($data, \'https://\') !== 0)
$data = \'http://\' . $data;
'),

Operation #10
Find: [Select]
'tag' => 'url',
'type' => 'unparsed_equals',
'before' => '<a href="$1" target="_blank">',
'after' => '</a>',
Replace With: [Select]
'tag' => 'url',
'type' => 'unparsed_equals',
'before' => '<a href="$1" target="_blank">',
'after' => '</a>',
'validate' => create_function('&$tag, &$data, $disabled', '
if (strpos($data, \'http://\') !== 0 && strpos($data, \'https://\') !== 0)
$data = \'http://\' . $data;
'),

Operation #11
Find: [Select]
$data = preg_replace('~&lt;a\s+href=(?:&quot;)?((?:http://|ftp://|https://|ftps://|mailto:).+?)(?:&quot;)?&gt;~i', '[url=$1]', $data);
Replace With: [Select]
$data = preg_replace('~&lt;a\s+href=((?:&quot;)?)((?:https?://|ftps?://|mailto:)\S+?)\\1&gt;~i', '[url=$2]', $data);
Operation #12
Find: [Select]
preg_match_all('~&lt;img\s+src=(?:&quot;)?((?:http://|ftp://|https://|ftps://).+?)(?:&quot;)?(?:\s+alt=(?:&quot;)?(.*?)(?:&quot;)?)?(?:\s?/)?&gt;~i', $data, $matches, PREG_PATTERN_ORDER);
Replace With: [Select]
preg_match_all('~&lt;img\s+src=((?:&quot;)?)((?:https?://|ftps?://)\S+?)\\1(?:\s+alt=(&quot;.*?&quot;|\S*?))?(?:\s?/)?&gt;~i', $data, $matches, PREG_PATTERN_ORDER);
Operation #13
Find: [Select]
foreach ($matches[1] as $match => $imgtag)
{
// No alt?
if (!isset($matches[2][$match]))
$matches[2][$match] = '';
Replace With: [Select]
foreach ($matches[2] as $match => $imgtag)
{
$alt = empty($matches[3][$match]) ? '' : ' alt=' . preg_replace('~^&quot;|&quot;$~', '', $matches[3][$match]);

Operation #14
Find: [Select]
$replaces[$matches[0][$match]] = '<img src="' . $imgtag . '" width="' . $width . '" height="' . $height . '" alt="' . $matches[2][$match] . '" border="0" />';
}
else
$replaces[$matches[0][$match]] = '<img src="' . $imgtag . '" alt="' . $matches[2][$match] . '" border="0" />';
Replace With: [Select]
$replaces[$matches[0][$match]] = '[img width=' . $width . ' height=' . $height . $alt . ']' . $imgtag . '[/img]';
}
else
$replaces[$matches[0][$match]] = '[img' . $alt . ']' . $imgtag . '[/img]';

Operation #15
Find: [Select]
$data = preg_replace(array('~(?<=[\s>\.(;\'"]|^)((?:http|https|ftp|ftps)://[\w\-_%@:|]+(?:\.[\w\-_%]+)*(?::\d+)?(?:/[\w\-_\~%\.@,\?&;=#+:\'\\\\]*|[\(\{][\w\-_\~%\.@,\?&;=#(){}+:\'\\\\]*)*[/\w\-_\~%@\?;=#}\\\\])~i', '~(?<=[\s>(\'<]|^)(www(?:\.[\w\-_]+)+(?::\d+)?(?:/[\w\-_\~%\.@,\?&;=#+:\'\\\\]*|[\(\{][\w\-_\~%\.@,\?&;=#(){}+:\'\\\\]*)*[/\w\-_\~%@\?;=#}\\\\])~i'), array('[url]$1[/url]', '[url=http://$1]$1[/url]'), $data);
Replace With: [Select]

// Only do this if the preg survives.
if (is_string($result = preg_replace(array(
'~(?<=[\s>\.(;\'"]|^)((?:http|https|ftp|ftps)://[\w\-_%@:|]+(?:\.[\w\-_%]+)*(?::\d+)?(?:/[\w\-_\~%\.@,\?&;=#(){}+:\'\\\\]*)*[/\w\-_\~%@\?;=#}\\\\])~i',
'~(?<=[\s>(\'<]|^)(www(?:\.[\w\-_]+)+(?::\d+)?(?:/[\w\-_\~%\.@,\?&;=#(){}+:\'\\\\]*)*[/\w\-_\~%@\?;=#}\\\\])~i'
), array(
'[url]$1[/url]',
'[url=http://$1]$1[/url]'
), $data)))
$data = $result;

Operation #16
Find: [Select]
$smileytocache[] = '<img src="' . $modSettings['smileys_url'] . '/' . $user_info['smiley_set'] . '/' . $smileysto[$i] . '" alt="' . strtr(htmlspecialchars($smileysdescs[$i]), array(':' => '&#58;', '(' => '&#40;', ')' => '&#41;', '$' => '&#36;', '[' => '&#091;')) . '" border="0" />';
Replace With: [Select]
$smileytocache[] = '<img src="' . htmlspecialchars($modSettings['smileys_url'] . '/' . $user_info['smiley_set'] . '/' . $smileysto[$i]) . '" alt="' . strtr(htmlspecialchars($smileysdescs[$i]), array(':' => '&#58;', '(' => '&#40;', ')' => '&#41;', '$' => '&#36;', '[' => '&#091;')) . '" border="0" />';

./Sources/Subs-Auth.php

Operation #1
Find: [Select]
* Software Version: SMF 1.1.10 *
Replace With: [Select]
* Software Version: SMF 1.1.11 *
Operation #2
Find: [Select]
$context['get_data'] .= $k . '=' . $v . ';';
// If it changed, put it out there, but with an ampersand.
elseif ($temp[$k] != $_GET[$k])
$context['get_data'] .= $k . '=' . $v . '&amp;';
Replace With: [Select]
$context['get_data'] .= urlencode($k) . '=' . urlencode($v) . ';';
// If it changed, put it out there, but with an ampersand.
elseif ($temp[$k] != $_GET[$k])
$context['get_data'] .= urlencode($k) . '=' . urlencode($v) . '&amp;';

Operation #3
Find: [Select]
foreach ($_GET as $k => $v)
$context['get_data'] .= $k . '=' . $v . ';';
Replace With: [Select]
foreach ($_GET as $k => $v)
$context['get_data'] .= urlencode($k) . '=' . urlencode($v) . ';';

Operation #4
Find: [Select]
<input type="hidden" name="' . $k . '" value="' . strtr(stripslashes($v), array('"' => '&quot;', '<' => '&lt;', '>' => '&gt;')) . '" />';
Replace With: [Select]
<input type="hidden" name="' . htmlspecialchars($k) . '" value="' . strtr(stripslashes($v), array('"' => '&quot;', '<' => '&lt;', '>' => '&gt;')) . '" />';

./Sources/Subs-Boards.php

Operation #1
Find: [Select]
* Software Version: SMF 1.1.5 *
Replace With: [Select]
* Software Version: SMF 1.1.11 *
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]
$_REQUEST['c'] = (int) $_REQUEST['c'];
Replace With: [Select]
checkSession('request');

$_REQUEST['c'] = (int) $_REQUEST['c'];

./Sources/Subs-Graphics.php

Operation #1
Find: [Select]
* Software Version: SMF 1.1.9 *
Replace With: [Select]
* Software Version: SMF 1.1.11 *
Operation #2
Find: [Select]
// Ask for more memory: we need it for this, and it'll only happen once!
@ini_set('memory_limit', '48M');
Replace With: [Select]
// Ask for more memory: we need it for this, and it'll only happen once!
@ini_set('memory_limit', '90M');

./Sources/Themes.php

Operation #1
Find: [Select]
* Software Version: SMF 1.1.7 *
Replace With: [Select]
* Software Version: SMF 1.1.11 *
Operation #2
Find: [Select]
$context['smiley_sets'][$set] = $set_names[$i];
Replace With: [Select]
$context['smiley_sets'][$set] = htmlspecialchars($set_names[$i]);
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.

./Themes/default/Packages.template.php

Operation #1
Find: [Select]
// Version: 1.1.8; Packages
Replace With: [Select]
// Version: 1.1.11; Packages
Operation #2
Find: [Select]
<a href="' . $scripturl . '?action=packageget;sa=remove;server=' . $server['id'] . '">[ ' . $txt['smf138'] . ' ]</a>
Replace With: [Select]
<a href="' . $scripturl . '?action=packageget;sa=remove;server=' . $server['id'] . ';sesc=', $context['session_id'], '">[ ' . $txt['smf138'] . ' ]</a>

./Themes/default/SplitTopics.template.php

Operation #1
Find: [Select]
// Version: 1.1; SplitTopics
Replace With: [Select]
// Version: 1.1.11; SplitTopics
Operation #2
Find: [Select]
<input type="hidden" name="sa" value="execute" />
Replace With: [Select]
<input type="hidden" name="sa" value="execute" />
<input type="hidden" name="sc" value="', $context['session_id'], '" />

./Sources/ManageRegistration.php

Operation #1
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 #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) *
This operation isn't vital to the installation of this mod.

./Sources/PersonalMessage.php

Operation #1
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 #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) *
This operation isn't vital to the installation of this mod.

./Sources/Register.php

Operation #1
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 #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) *
This operation isn't vital to the installation of this mod.