Simple Machines Community Forum

SMF Development => Bug Reports => Fixed or Bogus Bugs => Topic started by: rumfa on May 09, 2008, 10:43:40 PM

Title: Very small bug (i think) for 1.1.4 to 1.1.5 update
Post by: rumfa on May 09, 2008, 10:43:40 PM
As many of us, i updated it, but got an error on the sources/subs-post.php file. I cheked it out and found that my file contained:

if (!$previewing)
{
if (allowedTo('post_html'))
$parts[$i] = preg_replace('~\[html\](.+?)\[/html\]~ise', '\'[html]\' . strtr(un_htmlspecialchars(\'$1\'), array("\n" => \'
\', \'  \' => \'  \')) . \'[/html]\'', $parts[$i]);
// We should edit them out, or else if an admin edits the message they will get shown...
else
$parts[$i] = preg_replace('~\[[/]?html\]~i', '', $parts[$i]);


While the update was searching for:
if (!$previewing)
{
if (allowedTo('admin_forum'))
$parts[$i] = preg_replace('~\[html\](.+?)\[/html\]~ise', '\'[html]\' . strtr(un_htmlspecialchars(\'$1\'), array("\n" => \'
\', \'  \' => \'  \')) . \'[/html]\'', $parts[$i]);
// We should edit them out, or else if an admin edits the message they will get shown...
else
$parts[$i] = preg_replace('~\[[/]?html\]~i', '', $parts[$i]);


The difference is in the if (allowedTo('post_html')) and if (allowedTo('admin_forum'))

I had an quite old 1.1.4 package (november 2007), so it could be the reason. I dont know. Now it updated succesfully. By the way..what is the difference between the two codes?
Title: Re: Very small bug (i thinks) for 1.1.4 to 1.1.5 update
Post by: SleePy on May 09, 2008, 10:52:43 PM
That is due to this mod and not a bug
http://custom.simplemachines.org/mods/index.php?mod=411
Title: Re: Very small bug (i thinks) for 1.1.4 to 1.1.5 update
Post by: rumfa on May 09, 2008, 10:54:18 PM
Aha..ok. Not a coder so...:) I nice reminder to the ones getting the errors. Deinstall the html mod, upgrade, and reinstall it..