Small Bug in admin/update.php and lib/update_trigger_lib.php

Roster modified to work with multiple guilds, or characters with no guild
WoWRoster v2.0.0 and later now includes this feature

Small Bug in admin/update.php and lib/update_trigger_lib.php

Postby [PUPPETS]Gonzo » Tue Aug 22, 2006 2:15 am

I have several Chars with the same name on different realms and noticed, that only one signature per charname was generated. It showed up, that in start_update_trigger the realmname was unchecked. I fixed it by:

admin/update.php Line 198, change
Code: Select all
$output .= start_update_trigger($char_name,'char');
to
$output .= start_update_trigger($char_name,'char',$realm_name);


in lib/update_trigger_lib.php, Line 36, change
Code: Select all
function start_update_trigger($name,$mode)
to
function start_update_trigger($name,$mode,$realm)


and after "global" add
Code: Select all
$realm=$wowdb->escape($realm);


change the line containing
Code: Select all
$query = "SELECT `member_id` FROM `".ROSTER_MEMBERSTABLE."` WHERE `name` = '$name'";
to
$query = "SELECT `member_id` FROM `".ROSTER_MEMBERSTABLE."` WHERE `name` = '$name' and `server` = '$realm'";


-> Done. Now your upload calls the update_trigger for all your chars.
Last edited by [PUPPETS]Gonzo on Tue Aug 22, 2006 2:41 am, edited 1 time in total.
User avatar
[PUPPETS]Gonzo
WR.net Apprentice
WR.net Apprentice
 
Posts: 50
Joined: Tue Aug 22, 2006 12:46 am
Location: Frankfurt, Germany

Small Bug in admin/update.php and lib/update_trigger_lib.php

Postby Grayma11er » Thu Aug 24, 2006 6:59 am

When you say "after "global" add"... what "global" are you referring too? There are two functions that call to a global function...
Do I change the first global in the function start_update_trigger from:
Code: Select all
global $wowdb, $roster_conf, $wordings;
to
global $wowdb, $roster_conf, $wordings; $realm=$wowdb->escape($realm);


Thanks for any advise on this.
Grayma11er
WR.net Apprentice
WR.net Apprentice
 
Posts: 8
Joined: Thu Aug 24, 2006 5:57 am

Re: Small Bug in admin/update.php and lib/update_trigger_lib

Postby [PUPPETS]Gonzo » Thu Aug 24, 2006 10:36 am

Grayma11er wrote:When you say "after "global" add"... what "global" are you referring too? There are two functions that call to a global function...
Do I change the first global in the function start_update_trigger from:
Code: Select all
global $wowdb, $roster_conf, $wordings;
to
global $wowdb, $roster_conf, $wordings; $realm=$wowdb->escape($realm);


Thanks for any advise on this.


I add my code after the global of function start_update_trigger
User avatar
[PUPPETS]Gonzo
WR.net Apprentice
WR.net Apprentice
 
Posts: 50
Joined: Tue Aug 22, 2006 12:46 am
Location: Frankfurt, Germany


Return to Public Roster

Who is online

Users browsing this forum: No registered users and 0 guests

cron