Advertisement:

Navigation

Readme

This patch file will update your forum to SMF 1.1.14.

File Edits

./index.php

Operation #1
Find: [Select]
* =============================================================================== *
* Software Version: SMF 1.1.13 *
Replace With: [Select]
* =============================================================================== *
* Software Version: SMF 1.1.14 *

Operation #2
Find: [Select]
$forum_version = 'SMF 1.1.13';
Replace With: [Select]
$forum_version = 'SMF 1.1.14';

./Sources/Subs-Members.php

Operation #1
Find: [Select]
* =============================================================================== *
* Software Version: SMF 1.1.9 *
Replace With: [Select]
* =============================================================================== *
* Software Version: SMF 1.1.14 *

Operation #2
Find: [Select]
global $user_info, $modSettings, $db_prefix, $func;

$checkName = $func['strtolower']($name);
Replace With: [Select]
global $user_info, $modSettings, $db_prefix, $func, $context;

// No cheating with entities please.
$replaceEntities = create_function('$string', '
$num = substr($string, 0, 1) === \'x\' ? hexdec(substr($string, 1)) : (int) $string;' . (empty($context['utf8']) ? '
return $num < 0x20 ? \'\' : ($num < 0x80 ? chr($num) : \'&#\' . $string . \';\');' : '
return $num < 0x20 || $num > 0x10FFFF || ($num >= 0xD800 && $num <= 0xDFFF) ? \'\' : ($num < 0x80 ? chr($num) : ($num < 0x800 ? chr(192 | $num >> 6) . chr(128 | $num & 63) : ($num < 0x10000 ? chr(224 | $num >> 12) . chr(128 | $num >> 6 & 63) . chr(128 | $num & 63) : chr(240 | $num >> 18) . chr(128 | $num >> 12 & 63) . chr(128 | $num >> 6 & 63) . chr(128 | $num & 63))));')
);

$name = preg_replace('~(&#(\d{1,7}|x[0-9a-fA-F]{1,6});)~e', '$replaceEntities(\'\\2\')', $name);
$checkName = $func['strtolower']($name);

Operation #3
Find: [Select]
// Case sensitive name?
$reservedCheck = empty($modSettings['reserveCase']) ? $func['strtolower']($reserved) : $reserved;
Replace With: [Select]
// The admin might've used entities too, level the playing field.
$reservedCheck = preg_replace('~(&#(\d{1,7}|x[0-9a-fA-F]{1,6});)~e', '$replaceEntities(\'\\2\')', $reserved);

// Case sensitive name?
if (empty($modSettings['reserveCase']))
$reservedCheck = $func['strtolower']($reservedCheck);