Changeset 12275
- Timestamp:
- 06/27/11 09:49:42 (2 years ago)
- Files:
-
- modules/branches/2.10/directory/functions.inc.php (modified) (1 diff)
- modules/branches/2.10/queues/functions.inc.php (modified) (3 diffs)
- modules/branches/2.10/queues/page.queues.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
modules/branches/2.10/directory/functions.inc.php
r12271 r12275 3 3 function directory_configpageload_ivr() { 4 4 global $currentcomponent, $display; 5 if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'add' || $_REQUEST['action'] == 'edit') {5 if (isset($_REQUEST['action']) && ($_REQUEST['action'] == 'add' || $_REQUEST['action'] == 'edit')) { 6 6 7 7 //add help text modules/branches/2.10/queues/functions.inc.php
r12263 r12275 1228 1228 $extension = isset($_REQUEST['extension'])?$_REQUEST['extension']:null; 1229 1229 $tech_hardware = isset($_REQUEST['tech_hardware'])?$_REQUEST['tech_hardware']:null; 1230 1231 // We only want to hook 'users' or 'extensions' pages. 1232 if ($pagename != 'users' && $pagename != 'extensions') 1230 $display = isset($_REQUEST['display'])?$_REQUEST['display']:null; 1231 1232 //hook in to ivr's 1233 if ($display == 'ivr') { 1234 $currentcomponent->addprocessfunc('queues_configprocess_ivr'); 1235 // We only want to hook 'users' or 'extensions' pages. 1236 } elseif ($pagename != 'users' && $pagename != 'extensions') { 1233 1237 return true; 1238 } 1234 1239 // On a 'new' user, 'tech_hardware' is set, and there's no extension. Hook into the page. 1235 1240 if ($tech_hardware != null || $pagename == 'users') { … … 1267 1272 //create vars from the request 1268 1273 $action = isset($_REQUEST['action'])?$_REQUEST['action']:null; 1274 $id = isset($_REQUEST['id'])?$_REQUEST['id']:null; 1269 1275 $ext = isset($_REQUEST['extdisplay'])?$_REQUEST['extdisplay']:null; 1270 1276 $extn = isset($_REQUEST['extension'])?$_REQUEST['extension']:null; 1271 1277 $qnostate = isset($_REQUEST['qnostate'])?$_REQUEST['qnostate']:null; 1278 1272 1279 1273 1280 if ($ext==='') { … … 1282 1289 } // if 'del' then core will remove the entire tree 1283 1290 } 1291 1292 function queues_configprocess_ivr() { 1293 $action = isset($_REQUEST['action'])?$_REQUEST['action']:null; 1294 $display = isset($_REQUEST['display'])?$_REQUEST['display']:null; 1295 $id = isset($_REQUEST['id'])?$_REQUEST['id']:null; 1296 1297 1298 if($display == 'ivr' && $action == 'delete') { 1299 queues_ivr_delete_event($id); 1300 } 1301 1302 } 1303 function queues_ivr_delete_event($id = '') { 1304 global $db; 1305 1306 if (!$id) { 1307 sql('UPDATE queues_config SET ivr_id = ""'); 1308 } else { 1309 $sql = 'UPDATE queues_config SET ivr_id = "" WHERE ivr_id = ?'; 1310 $ret = $db->query($sql, array($id)); 1311 } 1312 } 1284 1313 ?> modules/branches/2.10/queues/page.queues.php
r12263 r12275 130 130 131 131 // do if we are submitting a form 132 if(isset($_ POST['action'])){132 if(isset($_REQUEST['action'])){ 133 133 //check if the extension is within range for this user 134 134 if (isset($account) && !checkRange($account)){
