Import buddy/ignorelist fails for IPB 1.2 Issue Tools
issueid=21870 Wed 18th Apr '07 7:19am
vBulletin Team
Import buddy/ignorelist fails for IPB 1.2

ImpEx: 1.80
source: IPB 1.2 (will probably fail on others also)

Module: 010 - Import banlist

If the banlist/ignorelist for the target user is empty (ie. IS NULL) then the import will fail as the MySQL CONCAT will always return NULL if any of the parameters is NULL

In ImpExDatabase_360.php, line ~789:
PHP Code:
    // add to buddy list
    
if ($user['buddylist'] != '')
    {
     
$sql[] = "buddylist = CONCAT(buddylist, ' $user[buddylist]')";
    }
    
// add to ignore list
    
if ($user['ignorelist'] != '')
    {
     
$sql[] = "ignorelist = CONCAT(ignorelist,' $user[ignorelist]')";
    } 
Replace by:
PHP Code:
    // add to buddy list
    
if ($user['buddylist'] != '')
    {
     
$sql[] = "buddylist = IF(buddylist IS NULL, LTRIM('$user[buddylist]'),CONCAT(buddylist, ' $user[buddylist]'))";
    }
    
// add to ignore list
    
if ($user['ignorelist'] != '')
    {
     
$sql[] = "ignorelist = IF(ignorelist IS NULL, LTRIM('$user[ignorelist]'), CONCAT(ignorelist, ' $user[ignorelist]'))";
    } 
Issue Details
Project ImpEx
Category Unknown
Status Fixed (Closed)
Priority 5 - Medium
Affected Version Unknown
Fixed Version (none)
Users able to reproduce bug 0
Users unable to reproduce bug 0
Assigned Users (none)
Tags (none)

Tue 24th Apr '07 3:12pm
ImpEx Developer
 
In 1.81
Reply
Reply