Changeset 46

Show
Ignore:
Timestamp:
12/28/04 11:20:08 (7 years ago)
Author:
rcourtna
Message:

ensure DIALOUTIDS global var is not created more than once

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/AMP/amp_conf/htdocs/admin/functions.php

    r44 r46  
    402402  //if no trunks have ever been defined, then create the proper variables with the default zap trunk 
    403403  if (count($unique_trunks) == 0) { 
     404    //If all trunks have been deleted from admin, dialoutids might still exist 
     405    $sql = "DELETE FROM globals WHERE variable = 'DIALOUTIDS'"; 
     406    $result = $db->query($sql); 
     407    if(DB::IsError($result)) { 
     408      die($result->getMessage()); 
     409    } 
    404410    $glofields = array(array('OUT_1','ZAP/g0'), 
    405411              array('DIAL_OUT_1','9'), 
  • trunk/AMP2-UseAmportal/amp_conf/var/www/html/admin/functions.php

    r44 r46  
    402402  //if no trunks have ever been defined, then create the proper variables with the default zap trunk 
    403403  if (count($unique_trunks) == 0) { 
     404    //If all trunks have been deleted from admin, dialoutids might still exist 
     405    $sql = "DELETE FROM globals WHERE variable = 'DIALOUTIDS'"; 
     406    $result = $db->query($sql); 
     407    if(DB::IsError($result)) { 
     408      die($result->getMessage()); 
     409    } 
    404410    $glofields = array(array('OUT_1','ZAP/g0'), 
    405411              array('DIAL_OUT_1','9'),