Changeset 9410
- Timestamp:
- 03/27/10 17:06:12 (3 years ago)
- Files:
-
- modules/branches/2.8 (modified) (1 prop)
- modules/branches/2.8/cidlookup (modified) (1 prop)
- modules/branches/2.8/cidlookup/functions.inc.php (modified) (2 diffs)
- modules/branches/2.8/cidlookup/module.xml (modified) (2 diffs)
- modules/branches/2.8/cidlookup/page.cidlookup.php (modified) (3 diffs)
- modules/branches/2.8/cidlookup/uninstall.php (modified) (1 diff)
- modules/branches/2.8/cidlookup/uninstall.sql (deleted)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
modules/branches/2.8
- Property svnmerge-integrated changed from /modules/branches/2.7:1-9395 to /modules/branches/2.7:1-9409
modules/branches/2.8/cidlookup
- Property lastpublish changed from 9010 to 9407
modules/branches/2.8/cidlookup/functions.inc.php
r8116 r9410 232 232 } 233 233 234 function cidlookup_did_list( ) {234 function cidlookup_did_list($id=false) { 235 235 $sql = " 236 236 SELECT cidlookup_id, a.extension extension, a.cidnum cidnum, pricid FROM cidlookup_incoming a … … 238 238 ON a.extension = b.extension AND a.cidnum = b.cidnum 239 239 "; 240 if ($id !== false && ctype_digit($id)) { 241 $sql .= " WHERE cidlookup_id = '$id'"; 242 } 240 243 241 244 $results = sql($sql,"getAll",DB_FETCHMODE_ASSOC); 242 return is_array($results)?$results: null;245 return is_array($results)?$results:array(); 243 246 } 244 247 modules/branches/2.8/cidlookup/module.xml
r9011 r9410 2 2 <rawname>cidlookup</rawname> 3 3 <name>Caller ID Lookup</name> 4 <version>2.7.0. 0</version>4 <version>2.7.0.1</version> 5 5 <publisher>FreePBX</publisher> 6 6 <license>GPLv2+</license> … … 15 15 <module>core ge 2.5.1.2</module> 16 16 </depends> 17 <location>release/2.7/cidlookup-2.7.0. 0.tgz</location>18 <md5sum> 7db9e3bb987370f8230b180230ef48fe</md5sum>17 <location>release/2.7/cidlookup-2.7.0.1.tgz</location> 18 <md5sum>45a30d653996845025a9ba510edde5b5</md5sum> 19 19 <changelog> 20 *2.7.0.1* might effect #3979 20 21 *2.7.0.0* localizations 21 22 *2.6.0.1* #3599, #3821 modules/branches/2.8/cidlookup/page.cidlookup.php
r8968 r9410 69 69 //get details for this source 70 70 $thisItem = cidlookup_get($itemid); 71 } else { 72 $thisItem = Array( 'description' => null, 'sourcetype' => null, 'cache' => null); 73 } 74 75 $delURL = $_SERVER['PHP_SELF'].'?'.$_SERVER['QUERY_STRING'].'&action=delete'; 76 $delButton = " 71 $delButton = " 77 72 <form name=delete action=\"{$_SERVER['PHP_SELF']}\" method=POST> 78 73 <input type=\"hidden\" name=\"display\" value=\"{$dispnum}\"> … … 81 76 <input type=submit value=\""._("Delete CID Lookup source")."\"> 82 77 </form>"; 83 84 ?> 85 86 <h2><?php echo ($itemid ? _("Source:")." ". $itemid : _("Add Source")); ?></h2> 78 $dids_using_arr = cidlookup_did_list($itemid); 79 $dids_using = count($dids_using_arr); 80 if ($dids_using) { 81 $delButton .= '<small>'.sprintf(_("There are %s DIDs using this source that will no longer have lookups if deleted."),$dids_using).'</small>'; 82 } 83 $thisItem_description = isset($thisItem['description']) ? htmlspecialchars($thisItem['description']):''; 84 85 } else { 86 $thisItem = Array( 'description' => '', 'sourcetype' => null, 'cache' => null); 87 } 88 ?> 89 <h2><?php echo ($itemid ? sprintf(_("Source: %s (id %s)"),$thisItem_description,$itemid) : _("Add Source")); ?></h2> 87 90 88 91 <p style="width: 80%"><?php echo ($itemid ? '' : _("A Lookup Source let you specify a source for resolving numeric caller IDs of incoming calls, you can then link an Inbound route to a specific CID source. This way you will have more detailed CDR reports with informations taken directly from your CRM. You can also install the phonebook module to have a small number <-> name association. Pay attention, name lookup may slow down your PBX")); ?></p> … … 103 106 <tr> 104 107 <td><a href="#" class="info"><?php echo _("Source Description:")?><span><?php echo _("Enter a description for this source.")?></span></a></td> 105 <td><input type="text" name="description" value="<?php echo (isset($thisItem['description']) ? $thisItem['description'] : ''); ?>" tabindex="<?php echo ++$tabindex;?>"></td>108 <td><input type="text" name="description" value="<?php echo $thisItem_description; ?>" tabindex="<?php echo ++$tabindex;?>"></td> 106 109 </tr> 107 110 <tr> modules/branches/2.8/cidlookup/uninstall.php
r7903 r9410 16 16 // 17 17 18 needreload();19 18 sql('DROP TABLE IF EXISTS cidlookup'); 19 sql('DROP TABLE IF EXISTS cidlookup_incoming'); 20 20 ?>
