Changeset 5617

Show
Ignore:
Timestamp:
01/26/08 19:16:40 (7 months ago)
Author:
p_lindheimer
Message:

see forum post: http://freepbx.org/forum/freepbx/users/custom-contexts-broken-in-freepbx-2-3-1-3

Files:

Legend:

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

    r5055 r5617  
    5151                                                        $db->query($sql); 
    5252                        } 
    53                                                 $sql = "INSERT INTO customcontexts_includes_list (context, include, description, sort) VALUES ('$section', '$include', '$include', $i)"; 
     53                                                $sql = "INSERT IGNORE INTO customcontexts_includes_list (context, include, description, sort) VALUES ('$section', '$include', '$include', $i)"; 
    5454                                                $db->query($sql); 
    5555                                        } 
     
    223223function customcontexts_getcontexts() { 
    224224        global $db; 
     225        $tmparray = array(); 
    225226        $sql = "select context, description from customcontexts_contexts order by description"; 
    226227        $results = $db->getAll($sql); 
    227         if(DB::IsError($results))  
    228                 $results = null; 
    229         foreach ($results as $val) 
     228        if(DB::IsError($results)) { 
     229                $results = array(); 
     230        } 
     231        foreach ($results as $val) { 
    230232                $tmparray[] = array($val[0], $val[1]); 
     233        } 
    231234        return $tmparray; 
    232235} 
     
    235238function customcontexts_gettimegroups() { 
    236239        global $db; 
     240        $tmparray = array(); 
    237241        $sql = "select id, description from customcontexts_timegroups order by description"; 
    238242        $results = $db->getAll($sql); 
    239         if(DB::IsError($results))  
    240                 $results = null; 
    241         foreach ($results as $val) 
     243        if(DB::IsError($results)) { 
     244                $results = array(); 
     245        } 
     246        foreach ($results as $val) { 
    242247                $tmparray[] = array($val[0], $val[1]); 
     248        } 
    243249        return $tmparray; 
    244250} 
     
    247253function customcontexts_gettimes($timegroup) { 
    248254        global $db; 
     255        $tmparray = array(); 
    249256        $sql = "select id, time from customcontexts_timegroups_detail where timegroupid = $timegroup"; 
    250257        $results = $db->getAll($sql); 
    251         if(DB::IsError($results))  
    252                 $results = null; 
    253         foreach ($results as $val) 
     258        if(DB::IsError($results)) { 
     259                $results = array(); 
     260        } 
     261        foreach ($results as $val) { 
    254262                $tmparray[] = array($val[0], $val[1]); 
     263        } 
    255264        return $tmparray; 
    256265} 
  • contributed_modules/modules/customcontexts/module.xml

    r5056 r5617  
    22        <rawname>customcontexts</rawname> 
    33        <name>Custom Contexts</name> 
    4         <version>0.3.3</version> 
     4        <version>0.3.4</version> 
    55        <type>setup</type> 
    66        <category>Advanced</category> 
     
    2424        </depends> 
    2525        <changelog> 
     26                                                                *0.3.4* see http://freepbx.org/forum/freepbx/users/custom-contexts-broken-in-freepbx-2-3-1-3 
    2627                *0.3.3* Added Set All option to quickly allow/deny all. 
    2728                        Fixed bug which caused routes to be denied after rename/sort/or delete other route. 
Donate



Support
Download
Develop
Forums
News
Documentation
Paid Support
About

Paid Ads