SMF 1.1 December 02, 2006
================================================================================
SMF 1.1.1 December 17, 2006
================================================================================
December 2006
--------------------------------------------------------------------------------
! Fixed multi-language support for Mambo/Joomla bridge login module on non-forum pages. (Mambo/Joomla bridge/mod_smf_login.php)
+ Added register mambot to Mambo 4.6 bridge so that users who register in Mambo are auto-created in SMF. (Mambo 4.6 bridge/SMF_register.php, SMF_register.xml)
! Fixed bridge registration so that it uses Mambo 4.6's new language method. (Mambo 4.6 bridge/smf_registration.html.php)
! The regular expression used for parsing '/me'-lines didn't work properly in older PHP versions. (Subs-Post.php)
! Fixed usage of array before it was declared (Load.php)
! Mambo/Joomla bridge config should go to main admin page if "Cancel" is clicked (Mambo/Joomla bridge/admin.smf.php)
! Fixed a missing global (Mambo 4.6 bridge/smf.php)
+ Changed the SEF handling in the bridge for use with third party Joomla SEF components (Mambo/Joomla bridge/smf.php)
+ Added Kindred's enhancements to the bridged whos online (Mambo/Joomla bridge/smf.php, smf_integration_arrays.php)
! Deleting a member in SMF deleted in Joomla, but not in Joomla's ACL (Mambo/Joomla bridge/smf.php)
! Bridge login module didn't handle language variables correctly. (Mambo/Joomla bridge/mod_smf_login.php)
! Some dates in the installation script were not MySQL STRICT compatible. (install-1.1.sql)
! Log the ban check IP in messages. (Subs-Post.php)
! It was possible for files to be sent with the wrong mime type - reported by Jessica Hope and rotwang. (Display.php)
* Search template looked a little odd on IE. (Search template)
* In prune boards the checkbox for stickies would toggle with the board selection. (Admin template)
! Send annoucements in slightly smaller chunks. (Post.php)
! Make it impossible to make guests too much like administrators. (ManagePermissions.php)
! Aposthophes in smiley directories would cause a SQL error. (ManageSmileys.php)
! Fixed labelling personal messages not being restricted to the current member. (PersonalMessage.php)
! In rare cases search didn't return any results, while it should have. (Search.php)
SMF 1.1 December 02, 2006
================================================================================
$posterOptions['ip'] = empty($posterOptions['ip']) ? $user_info['ip'] : $posterOptions['ip'];
$posterOptions['ip'] = empty($posterOptions['ip']) ? $user_info['ip2'] : $posterOptions['ip'];
if (strpos($user_info['name'], '[') !== false || strpos($user_info['name'], ']') !== false || strpos($user_info['name'], '\'') !== false || strpos($user_info['name'], '"') !== false)
$parts[$i] = preg_replace('~(?:\A|\n)/me(?: | )([^\n\z]*)~i', '[me="' . $user_info['name'] . '"]$1[/me]', $parts[$i]);
else
$parts[$i] = preg_replace('~(?:\A|\n)/me(?: | )([^\n\z]*)~i', '[me=' . $user_info['name'] . ']$1[/me]', $parts[$i]);
if (strpos($user_info['name'], '[') !== false || strpos($user_info['name'], ']') !== false || strpos($user_info['name'], '\'') !== false || strpos($user_info['name'], '"') !== false)
$parts[$i] = preg_replace('~(?:\A|\n)/me(?: | )([^\n\z]*)~i', '[me="' . $user_info['name'] . '"]$1[/me]', $parts[$i]);
else
$parts[$i] = preg_replace('~(?:\A|\n)/me(?: | )([^\n\z]*)~i', '[me=' . $user_info['name'] . ']$1[/me]', $parts[$i]);
$space_chars = $utf8 ? ($context['server']['complex_preg_chars'] ? '\x{C2A0}\x{E28080}-\x{E2808F}\x{E280AF}\x{E2809F}\x{E38080}\x{EFBBBF}' : sprintf('%c%c%c%c%c-%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c', 0xC2, 0xA0, 0xE2, 0x80, 0x80, 0xE2, 0x80, 0x8F, 0xE2, 0x80, 0xAF, 0xE2, 0x80, 0x9F, 0xE3, 0x80, 0x80, 0xEF, 0xBB, 0xBF)) : '\xA0';
$space_chars = $utf8 ? (@version_compare(PHP_VERSION, '4.3.3') != -1 ? '\x{C2A0}\x{E28080}-\x{E2808F}\x{E280AF}\x{E2809F}\x{E38080}\x{EFBBBF}' : sprintf('%c%c%c%c%c-%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c', 0xC2, 0xA0, 0xE2, 0x80, 0x80, 0xE2, 0x80, 0x8F, 0xE2, 0x80, 0xAF, 0xE2, 0x80, 0x9F, 0xE3, 0x80, 0x80, 0xEF, 0xBB, 0xBF)) : '\xA0';
if (!isset($_REQUEST['image']))
{
header('Content-Disposition: attachment; filename="' . $real_filename . '"');
header('Content-Type: application/octet-stream');
}
if (filesize($filename) != 0)
{
$size = @getimagesize($filename);
if (!empty($size) && $size[2] > 0 && $size[2] < 4)
header('Content-Type: image/' . ($size[2] != 1 ? ($size[2] != 2 ? 'png' : 'jpeg') : 'gif'));
// Errr, it's an image.... what kind? A... gif? Yeah that's it, gif! Like JIF, the peanut butter.
elseif (isset($_REQUEST['image']))
header('Content-Type: image/gif');
}
if (filesize($filename) != 0)
{
$size = @getimagesize($filename);
if (!empty($size))
{
// What headers are valid?
$validTypes = array(
1 => 'gif',
2 => 'jpeg',
3 => 'png',
5 => 'psd',
6 => 'bmp',
7 => 'tiff',
8 => 'tiff',
9 => 'jpeg',
14 => 'iff',
);
// Do we have a mime type we can simpy use?
if (!empty($size['mime']))
header('Content-Type: ' . $size['mime']);
elseif (isset($validTypes[$size[2]]))
header('Content-Type: image/' . $validTypes[$size[2]]);
// Otherwise - let's think safety first... it might not be an image...
elseif (isset($_REQUEST['image']))
unset($_REQUEST['image']);
}
// Once again - safe!
elseif (isset($_REQUEST['image']))
unset($_REQUEST['image']);
}
if (!isset($_REQUEST['image']))
{
header('Content-Disposition: attachment; filename="' . $real_filename . '"');
header('Content-Type: application/octet-stream');
}
}
redirectexit('action=permissions;boardid=' . $_REQUEST['boardid']);
}
// Don't allow guests to have certain permissions.
db_query("
DELETE FROM {$db_prefix}permissions
WHERE ID_GROUP = -1 AND
(permission = 'manage_membergroups'
OR permission = 'manage_permissions'
OR permission = 'admin_forum')", __FILE__, __LINE__);
redirectexit('action=permissions;boardid=' . $_REQUEST['boardid']);
'smiley_sets_known' => implode(',', $set_paths),
'smiley_sets_names' => implode("\n", $set_names),
'smiley_sets_default' => in_array($modSettings['smiley_sets_default'], $set_paths) ? $modSettings['smiley_sets_default'] : $set_paths[0],
'smiley_sets_known' => addslashes(implode(',', $set_paths)),
'smiley_sets_names' => addslashes(implode("\n", $set_names)),
'smiley_sets_default' => addslashes(in_array($modSettings['smiley_sets_default'], $set_paths) ? $modSettings['smiley_sets_default'] : $set_paths[0]),
'smiley_sets_known' => $modSettings['smiley_sets_known'] . ',' . $_POST['smiley_sets_path'],
'smiley_sets_names' => $modSettings['smiley_sets_names'] . "\n" . $_POST['smiley_sets_name'],
'smiley_sets_default' => empty($_POST['smiley_sets_default']) ? $modSettings['smiley_sets_default'] : $_POST['smiley_sets_path'],
'smiley_sets_known' => addslashes($modSettings['smiley_sets_known']) . ',' . $_POST['smiley_sets_path'],
'smiley_sets_names' => addslashes($modSettings['smiley_sets_names']) . "\n" . $_POST['smiley_sets_name'],
'smiley_sets_default' => empty($_POST['smiley_sets_default']) ? addslashes($modSettings['smiley_sets_default']) : $_POST['smiley_sets_path'],
$set_paths[$_POST['set']] = $_POST['smiley_sets_path'];
$set_names[$_POST['set']] = $_POST['smiley_sets_name'];
updateSettings(array(
'smiley_sets_known' => implode(',', $set_paths),
'smiley_sets_names' => implode("\n", $set_names),
'smiley_sets_default' => empty($_POST['smiley_sets_default']) ? $modSettings['smiley_sets_default'] : $_POST['smiley_sets_path']
$set_paths[$_POST['set']] = stripslashes($_POST['smiley_sets_path']);
$set_names[$_POST['set']] = stripslashes($_POST['smiley_sets_name']);
updateSettings(array(
'smiley_sets_known' => addslashes(implode(',', $set_paths)),
'smiley_sets_names' => addslashes(implode("\n", $set_names)),
'smiley_sets_default' => empty($_POST['smiley_sets_default']) ? addslashes($modSettings['smiley_sets_default']) : $_POST['smiley_sets_path']
'smiley_sets_known' => $modSettings['smiley_sets_known'] . ',' . $name,
'smiley_sets_names' => $modSettings['smiley_sets_names'] . "\n" . strtok(basename(isset($_FILES['set_gz']) ? $_FILES['set_gz']['name'] : $_REQUEST['set_gz']), '.')
'smiley_sets_known' => addslashes($modSettings['smiley_sets_known'] . ',' . $name),
'smiley_sets_names' => addslashes($modSettings['smiley_sets_names'] . "\n" . strtok(basename(isset($_FILES['set_gz']) ? $_FILES['set_gz']['name'] : $_REQUEST['set_gz']), '.'))