Hi everybody,
I've just installed mass-pm 1.4.7 over phpBB 2.0.11 but when I try rto access my private messages, I get an error :
Parse error: parse error, unexpected T_IF in /[cut the URL]/forum/privmsg.php on line 1147
Line 1147 of privmsg.php is :
- Code: Select all
if( !($result2 = $db->sql_query($sql)) )
contained in :
- Code: Select all
// Start replacement - Custom mass PM MOD
if( !($result2 = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain users PM information', '', __LINE__, __FILE__, $sql);
}
$to_users = $db->sql_fetchrowset($result2);
$n=0;
while ($to_username_array[$n] && !$error)
{
if (strcasecmp($to_users[$n]['username'], str_replace("\'", "'",$to_username_array[$n])))
{
$error = TRUE;
$error_msg .= $lang['No_such_user']." '".str_replace("\'", "'", $to_username_array[$n]);
}
$n++;
}
}
else
{
// End replacement - Custom mass PM MOD
replacing
- Code: Select all
if ( !($result = $db->sql_query($sql)) )
{
$error = TRUE;
$error_msg = $lang['No_such_user'];
}
$to_userdata = $db->sql_fetchrow($result);
}
else
}
Please note that in this same file, I couln't find :
- Code: Select all
$to_username = $HTTP_POST_VARS['username'];
and then, it's
- Code: Select all
$to_username = phpbb_clean_username($HTTP_POST_VARS['username']);
that I replaced by
- Code: Select all
// Start replacement - Custom mass PM MOD
$to_username_array = explode (";", $HTTP_POST_VARS['username']);
usort($to_username_array, create_function('$a,$b','return strcasecmp($a,$b);'));
foreach ($to_username_array as $name) $to_usernames .= "'".htmlspecialchars(trim($name))."',";
$to_usernames[strlen($to_usernames)-1]=" ";
// End replacement - Custom mass PM MOD
May anyone help me ?
Thanks in advance (and please forgive me for my poor english).

