Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Wed Sep 18, 2019 1:24 pm
Hosted Voice Broadcast


All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: API SQL querry bug
PostPosted: Fri Jan 30, 2009 12:34 pm 
Offline

Joined: Fri Jan 30, 2009 12:16 pm
Posts: 2
lines 261 & 262 in file soap-card-server.php


$param_add_fields = "name, accountcode, regexten, amaflags, callerid, context, dtmfmode, host, type, username, allow, secret";
$param_add_value = "'$cardnum', '$cardnum', '$cardnum', '$amaflags', '$cardnum', '$context', '$dtmfmode','$host', '$type', '$cardnum', '$allow', '".$uipass."', '$id_cc_card', '$nat', '$qualify'";


should be

$param_add_fields = "name, accountcode, regexten, amaflags, callerid, context, dtmfmode, host, type, username, allow, secret, id_cc_card, nat, qualify";
$param_add_value = "'$cardnum', '$cardnum', '$cardnum', '$amaflags', '$cardnum', '$context', '$dtmfmode','$host', '$type', '$cardnum', '$allow', '$uipass', '$id_cc_card', '$nat', '$qualify'";




also line 179

"zipcode, phone, fax, userpass, simultaccess, currency, typepaid, creditlimit, language, runservice, enableexpire, expirationdate, expiredays, uipass, sip_buddy, iax_buddy";

should be

"zipcode, phone, fax, userpass, simultaccess, currency, typepaid, creditlimit, language, runservice, enableexpire, expirationdate, expiredays, uipass, iax_buddy, sip_buddy";


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 30, 2009 3:40 pm 
Offline
User avatar

Joined: Mon Apr 30, 2007 6:43 am
Posts: 1060
Location: Canada
True. But just to make it clear for those who are learning PHP, the '$uipass' part IS NOT a bug. It is just a preference in the way you want to evaluate the $uipass variable inside the $param_add_value string. Someone else could have done the following ...

Code:
$param_add_value = "'{$cardnum}', '{$cardnum}', '{$cardnum}', '{$amaflags}', ..."


... which is what I prefer. It makes the variables stick out more.

Anyway, I have filed an official bug report and it will be taken care of.

Thank for reporting it.

Cheers.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 30, 2009 7:41 pm 
Offline
User avatar

Joined: Mon Apr 30, 2007 6:43 am
Posts: 1060
Location: Canada
I have fixed it here http://www.asterisk2billing.org/cgi-bin ... F&new=1408


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 
VoIP Billing solution


All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group