Changeset 5381

Show
Ignore:
Timestamp:
12/10/07 07:53:24 (1 year ago)
Author:
p_lindheimer
Message:

change API to use grplist array instead of constant implode/expode now that separate table is used

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • contributed_modules/modules/vmblast/functions.inc.php

    r5380 r5381  
    139139        global $db; 
    140140 
    141         $xtns = explode("&",$grplist)
    142         foreach ($xtns as $key => $value) { 
    143                 $xtns[$key] = addslashes(trim($value)); 
     141        $grplist = $grplist
     142        foreach ($grplist as $key => $value) { 
     143                $grplist[$key] = addslashes(trim($value)); 
    144144        } 
    145145                // Sanity check input. 
    146146 
    147147        $compiled = $db->prepare("INSERT INTO vmblast_groups (grpnum, ext) values ('$grpnum',?)"); 
    148         $result   = $db->executeMultiple($compiled,$xtns); 
     148        $result   = $db->executeMultiple($compiled,$grplist); 
    149149        if(DB::IsError($result)) { 
    150150                die_freepbx($result->getDebugInfo()."<br><br>".'error adding to vmblast_groups table');  
     
    188188                die_freepbx($grplist->getDebugInfo()."<br><br>".'selecting from vmblast_groups table');  
    189189        } 
    190         $results['grplist'] = implode('&',$grplist)
     190        $results['grplist'] = $grplist
    191191 
    192192        $sql = "SELECT * FROM admin WHERE variable='default_vmblast_grp' AND value='$grpnum'"; 
  • contributed_modules/modules/vmblast/page.vmblast.php

    r5380 r5381  
    6161                                $conflict_url = framework_display_extension_usage_alert($usage_arr); 
    6262 
    63                         } else if (vmblast_add($account,implode("&",$grplist),$description)) { 
     63                        } else if (vmblast_add($account,$grplist,$description)) { 
    6464                                needreload(); 
    6565                                redirect_standard(); 
     
    7777                if ($action == 'editGRP') { 
    7878                        vmblast_del($account);   
    79                         vmblast_add($account,implode("&",$grplist),$description,$audio_label,$password,$default_group); 
     79                        vmblast_add($account,$grplist,$description,$audio_label,$password,$default_group); 
    8080                        needreload(); 
    8181                        redirect_standard('extdisplay'); 
     
    107107                // We need to populate grplist with the existing extension list. 
    108108                $thisgrp = vmblast_get(ltrim($extdisplay,'GRP-')); 
    109                 $grpliststr = $thisgrp['grplist']; 
    110                 $grplist = explode("&", $grpliststr); 
     109                $grplist     = $thisgrp['grplist']; 
    111110                $description = $thisgrp['description']; 
    112111                $audio_label = $thisgrp['audio_label']; 
Donate



Support
Download
Develop
Forums
News
Documentation
Paid Support
About

Paid Ads