Hi,
On line 609 of privatemsg module, there is a query allowing to collect username of your buddylist. This is very useful because it restrict privatemsg sending only to your buddylist.
But the this option doesnt work with buddylist2 and i need it.
Because i so bad in php, can you just have a look to the db_query on line 609 of the privatemsg. i'm sure you'll find a way to make this db_query compatible with BL2.

The 609 line in question :

  if (module_exists('buddylist')) {
    $result = db_query('SELECT u.name FROM {buddylist} b, {users} u WHERE b.uid = u.uid', $user->uid);
    while ($name = db_fetch_object($result)) {
      $buddyname = check_plain($name->name);
      $contacts[$buddyname] = $buddyname;

Benjamin

Comments

criz’s picture

Hi,
I don't know it exactly, but do you have tried to change the first line in
if (module_exists('buddy_api')) {
?

Just an idea, but as far as I know there are no changes in the database, so the db_query should work...

bneel’s picture

Status: Active » Fixed

simply perfect. I changed lot of suff in this query, but not the module name.
Thanks for your help
Benjamin

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.