Changeset 6347
- Timestamp:
- 08/11/08 18:01:51 (5 years ago)
- Files:
-
- modules/branches/2.5/core/functions.inc.php (modified) (9 diffs)
- modules/branches/2.5/dictate/functions.inc.php (modified) (1 diff)
- modules/branches/2.5/languages/functions.inc.php (modified) (1 diff)
- modules/branches/2.5/paging/functions.inc.php (modified) (1 diff)
- modules/branches/2.5/vmblast/functions.inc.php (modified) (1 diff)
- modules/branches/2.5/voicemail/functions.inc.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
modules/branches/2.5/core/functions.inc.php
r6345 r6347 4075 4075 if ( is_string($extdisplay) ) { 4076 4076 4077 if (!isset($ _GLOBALS['abort']) || $_GLOBALS['abort'] !== true) {4077 if (!isset($GLOBALS['abort']) || $GLOBALS['abort'] !== true) { 4078 4078 $extenInfo=core_users_get($extdisplay); 4079 4079 extract($extenInfo); … … 4084 4084 if ( $display == 'extensions' ) { 4085 4085 $currentcomponent->addguielem('_top', new gui_pageheading('title', _("Extension").": $extdisplay", false), 0); 4086 if (!isset($ _GLOBALS['abort']) || $_GLOBALS['abort'] !== true) {4086 if (!isset($GLOBALS['abort']) || $GLOBALS['abort'] !== true) { 4087 4087 $tlabel = sprintf(_("Delete Extension %s"),$extdisplay); 4088 4088 $label = '<span><img width="16" height="16" border="0" title="'.$tlabel.'" alt="" src="images/user_delete.png"/> '.$tlabel.'</span>'; … … 4096 4096 } else { 4097 4097 $currentcomponent->addguielem('_top', new gui_pageheading('title', _("User").": $extdisplay", false), 0); 4098 if (!isset($ _GLOBALS['abort']) || $_GLOBALS['abort'] !== true) {4098 if (!isset($GLOBALS['abort']) || $GLOBALS['abort'] !== true) { 4099 4099 $tlabel = sprintf(_("Delete User %s"),$extdisplay); 4100 4100 $label = '<span><img width="16" height="16" border="0" title="'.$tlabel.'" alt="" src="images/user_delete.png"/> '.$tlabel.'</span>'; … … 4241 4241 if (isset($extension) && !checkRange($extension)){ 4242 4242 echo "<script>javascript:alert('". _("Warning! Extension")." ".$extension." "._("is not allowed for your account").".');</script>"; 4243 $ _GLOBALS['abort'] = true;4243 $GLOBALS['abort'] = true; 4244 4244 } else { 4245 4245 //if submitting form, update database … … 4250 4250 $usage_arr = framework_check_extension_usage($_REQUEST['extension']); 4251 4251 if (!empty($usage_arr)) { 4252 $ _GLOBALS['abort'] = true;4252 $GLOBALS['abort'] = true; 4253 4253 $conflict_url = framework_display_extension_usage_alert($usage_arr,true); 4254 4254 global $currentcomponent; 4255 4255 $id=0; 4256 $currentcomponent->addguielem('_top', new gui_link_label('conflict', _("Conflicting Extensions"), _("The following extension numbers are in conflict, you can click on the item(s) below to edit the conflicting entity."), true)); 4256 4257 foreach ($conflict_url as $edit_link) { 4257 4258 $currentcomponent->addguielem('_top', new gui_link('conflict'.$i++, $edit_link['label'], $edit_link['url'])); 4258 4259 } 4260 $msg = ($_REQUEST['display'] == 'users') ? _("Configure user again:") : _("Configure extension again:"); 4261 $currentcomponent->addguielem('_top', new gui_subheading('conflict_end', $msg, false)); 4262 unset($_REQUEST['action']); 4263 redirect_standard_continue(); 4259 4264 } elseif (core_users_add($_REQUEST)) { 4260 4265 needreload(); … … 4265 4270 // this like voicemail! 4266 4271 // 4267 $ _GLOBALS['abort'] = true;4272 $GLOBALS['abort'] = true; 4268 4273 } 4269 4274 break; … … 4283 4288 } else { 4284 4289 // really bad hack - but if core_users_edit fails, want to stop core_devices_edit 4285 $ _GLOBALS['abort'] = true;4290 $GLOBALS['abort'] = true; 4286 4291 } 4287 4292 break; … … 4543 4548 case "add": 4544 4549 // really bad hack - but if core_users_add fails, want to stop core_devices_add 4545 if (!isset($ _GLOBALS['abort']) || $_GLOBALS['abort'] !== true) {4550 if (!isset($GLOBALS['abort']) || $GLOBALS['abort'] !== true) { 4546 4551 if (core_devices_add($deviceid,$tech,$devinfo_dial,$devicetype,$deviceuser,$description,$emergency_cid)) { 4547 4552 needreload(); … … 4559 4564 case "edit": //just delete and re-add 4560 4565 // really bad hack - but if core_users_edit fails, want to stop core_devices_edit 4561 if (!isset($ _GLOBALS['abort']) || $_GLOBALS['abort'] !== true) {4566 if (!isset($GLOBALS['abort']) || $GLOBALS['abort'] !== true) { 4562 4567 core_devices_del($extdisplay,true); 4563 4568 core_devices_add($deviceid,$tech,$devinfo_dial,$devicetype,$deviceuser,$description,$emergency_cid,true); modules/branches/2.5/dictate/functions.inc.php
r5897 r6347 152 152 } 153 153 if ($action == "add" || $action == "edit") { 154 if (!isset($ _GLOBALS['abort']) || $_GLOBALS['abort'] !== true) {154 if (!isset($GLOBALS['abort']) || $GLOBALS['abort'] !== true) { 155 155 dictate_update($extdisplay, $dictenabled, $dictformat, $dictemail); 156 156 } modules/branches/2.5/languages/functions.inc.php
r6123 r6347 183 183 } 184 184 if ($action == "add" || $action == "edit") { 185 if (!isset($ _GLOBALS['abort']) || $_GLOBALS['abort'] !== true) {185 if (!isset($GLOBALS['abort']) || $GLOBALS['abort'] !== true) { 186 186 languages_user_update($extdisplay, $langcode); 187 187 } modules/branches/2.5/paging/functions.inc.php
r6024 r6347 595 595 596 596 if ($action == "add" || $action == "edit") { 597 if (!isset($ _GLOBALS['abort']) || $_GLOBALS['abort'] !== true) {597 if (!isset($GLOBALS['abort']) || $GLOBALS['abort'] !== true) { 598 598 if ($in_default_page_grp !== false) { 599 599 paging_set_default($extdisplay, $in_default_page_grp); modules/branches/2.5/vmblast/functions.inc.php
r5897 r6347 298 298 299 299 if (($action == "add" || $action == "edit") && $vm_enabled) { 300 if (!isset($ _GLOBALS['abort']) || $_GLOBALS['abort'] !== true) {300 if (!isset($GLOBALS['abort']) || $GLOBALS['abort'] !== true) { 301 301 if ($in_default_vmblast_grp !== false) { 302 302 vmblast_set_default($extdisplay, $in_default_vmblast_grp); modules/branches/2.5/voicemail/functions.inc.php
r6309 r6347 242 242 } 243 243 244 if ($tech_hardware != null || $extdisplay != '' || $pagename == 'users') { 244 if ($tech_hardware != null || $extdisplay != '' || $pagename == 'users') { 245 245 // JS function needed for checking voicemail = Enabled 246 246 $js = 'return (theForm.vm.value == "enabled");'; … … 336 336 // ** WARNING ** 337 337 // Mailbox must be processed before adding / deleting users, therefore $sortorder = 1 338 $currentcomponent->addprocessfunc('voicemail_configprocess', 1); 338 // 339 // More hacky-ness from components, since this is called first, we need to determine if 340 // it there is a conclict indpenendent from the user component so we know if we should 341 // redisplay the or not. While we are at it, we won't add the process function if there 342 // is a conflict 343 // 344 if ($_REQUEST['display'] == 'users') { 345 $usage_arr = framework_check_extension_usage($_REQUEST['extension']); 346 if (empty($usage_arr)) { 347 $currentcomponent->addprocessfunc('voicemail_configprocess', 1); 348 } else { 349 voicemail_applyhooks(); 350 } 351 } else { 352 $currentcomponent->addprocessfunc('voicemail_configprocess', 1); 353 } 339 354 } elseif ($extdisplay != '' || $pagename == 'users') { 340 355 // We're now viewing an extension, so we need to display _and_ process. … … 600 615 switch ($action) { 601 616 case "add": 602 if (!isset($ _GLOBALS['abort']) || $_GLOBALS['abort'] !== true) {617 if (!isset($GLOBALS['abort']) || $GLOBALS['abort'] !== true) { 603 618 $usage_arr = framework_check_extension_usage($_REQUEST['extension']); 604 619 if (!empty($usage_arr)) { 605 $ _GLOBALS['abort'] = true;620 $GLOBALS['abort'] = true; 606 621 } else { 607 622 voicemail_mailbox_add($extdisplay, $_REQUEST); … … 618 633 break; 619 634 case "edit": 620 if (!isset($ _GLOBALS['abort']) || $_GLOBALS['abort'] !== true) {635 if (!isset($GLOBALS['abort']) || $GLOBALS['abort'] !== true) { 621 636 voicemail_mailbox_del($extdisplay); 622 637 if ( $vm != 'disabled' )
