diff --git a/agc_2-X/branches/agc_2.0.4/www/agc/vdc_db_query.php b/agc_2-X/branches/agc_2.0.4/www/agc/vdc_db_query.php index 2cf95474..253ec880 100644 --- a/agc_2-X/branches/agc_2.0.4/www/agc/vdc_db_query.php +++ b/agc_2-X/branches/agc_2.0.4/www/agc/vdc_db_query.php @@ -611,7 +611,7 @@ if ($ACTION == 'manDiaLnextCaLL') else { ### grab the next lead in the hopper for this campaign and reserve it for the user - $stmt = "UPDATE vicidial_hopper set status='QUEUE', user='$user' where campaign_id='$campaign' and status='READY' order by hopper_id LIMIT 1"; + $stmt = "UPDATE vicidial_hopper set status='QUEUE', user='$user' where campaign_id='$campaign' and status='READY' order by priority desc,hopper_id LIMIT 1"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); $affected_rows = mysql_affected_rows($link); @@ -668,7 +668,7 @@ if ($ACTION == 'manDiaLnextCaLL') $alt_phone = trim("$row[26]"); $email = trim("$row[27]"); $security = trim("$row[28]"); - $comments = trim("$row[29]"); + $comments = stripslashes(trim("$row[29]")); $called_count = trim("$row[30]"); } @@ -1631,7 +1631,7 @@ if ($ACTION == 'VDADcheckINCOMING') $alt_phone = trim("$row[26]"); $email = trim("$row[27]"); $security = trim("$row[28]"); - $comments = trim("$row[29]"); + $comments = stripslashes(trim("$row[29]")); $called_count = trim("$row[30]"); } diff --git a/agc_2-X/trunk/www/agc/vdc_db_query.php b/agc_2-X/trunk/www/agc/vdc_db_query.php index e4334888..3f177e7b 100644 --- a/agc_2-X/trunk/www/agc/vdc_db_query.php +++ b/agc_2-X/trunk/www/agc/vdc_db_query.php @@ -635,7 +635,7 @@ if ($ACTION == 'manDiaLnextCaLL') else { ### grab the next lead in the hopper for this campaign and reserve it for the user - $stmt = "UPDATE vicidial_hopper set status='QUEUE', user='$user' where campaign_id='$campaign' and status='READY' order by hopper_id LIMIT 1"; + $stmt = "UPDATE vicidial_hopper set status='QUEUE', user='$user' where campaign_id='$campaign' and status='READY' order by priority desc,hopper_id LIMIT 1"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); $affected_rows = mysql_affected_rows($link); @@ -693,7 +693,7 @@ if ($ACTION == 'manDiaLnextCaLL') $alt_phone = trim("$row[26]"); $email = trim("$row[27]"); $security = trim("$row[28]"); - $comments = trim("$row[29]"); + $comments = stripslashes(trim("$row[29]")); $called_count = trim("$row[30]"); } @@ -1851,7 +1851,7 @@ if ($ACTION == 'VDADcheckINCOMING') $alt_phone = trim("$row[26]"); $email = trim("$row[27]"); $security = trim("$row[28]"); - $comments = trim("$row[29]"); + $comments = stripslashes(trim("$row[29]")); $called_count = trim("$row[30]"); }