asterisk2billing.org
http://forum.asterisk2billing.org/

Mistyping bugs in callingcard_cid_sanitize
http://forum.asterisk2billing.org/viewtopic.php?f=22&t=10010
Page 1 of 1

Author:  mangust [ Sat Sep 15, 2012 9:19 am ]
Post subject:  Mistyping bugs in callingcard_cid_sanitize

Two mistyping bugs in callingcard_cid_sanitize.
Resulting function doesnt work for DIDs as expected

in callingcard_cid_sanitize

Sintax errors in

$QUERY .= "SELECT cc_did.did ".
" FROM cc_did ".
" JOIN cc_did_destination ON
cc_did_destination.id_cc_did=cc_did.id ".
" JOIN cc_card ON
cc_did_destination.id_cc_card=cc_card.id ".
" WHERE (cc_did.activated=1 OR
cc_did.activated='t') AND cc_did_destination.activated=1 AND
cc_did.startingdate <= NOW() AND cc_did.expirationdate => NOW()".
" AND cc_card.username='".$this ->
username."' ".
" AND cc_did_destination.validated=1";
$QUERY .= "ORDER BY 1";



instead of "cc_did_destination.validated=1ORDER BY 1" should be
"cc_did_destination.validated=1 ORDER BY 1"

instead of cc_did.expirationdate => NOW() should be cc_did.expirationdate >= NOW()

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/