[SOLVED] Parse error after installation

Makes it posble for admin to specify witch type of users may mass PM any usergroup
Also PM users can be a list of usernames, so PM can be sendt to any number of users

Moderator: Moderators

Forum rules
The content in this forum is dated Dec. 21 2005 and can be used as Archive only. This Forum is LOCKED and READ ONLY !

[SOLVED] Parse error after installation

Postby quinn on Sun 10. Apr, 2005 14:28

[Edit : solved when reinstalled]

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).
quinn
Poster
Poster
 
Posts: 1
Joined: Sun 10. Apr, 2005 12:19

Return to Custom mass PM [2.0.6/EM]

Who is online

Users browsing this forum: No registered users and 1 guest

cron