News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Very small bug (i think) for 1.1.4 to 1.1.5 update

Started by rumfa, May 09, 2008, 10:43:40 PM

Previous topic - Next topic

rumfa

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?

SleePy

Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

rumfa

Aha..ok. Not a coder so...:) I nice reminder to the ones getting the errors. Deinstall the html mod, upgrade, and reinstall it..

Advertisement: