| 6371 | | if (exten_action != 'edit') { |
|---|
| 6372 | | $.ajax({ |
|---|
| 6373 | | type: 'POST', |
|---|
| 6374 | | url: 'config.php', |
|---|
| 6375 | | data: 'handler=api&function=framework_get_conflict_url_helper&args=' + exten, |
|---|
| 6376 | | dataType: 'json', |
|---|
| 6377 | | cache: false, |
|---|
| 6378 | | async: false, |
|---|
| 6379 | | success: function(data, textStatus, XMLHttpRequest) { |
|---|
| 6380 | | if (data.length !== 0) { |
|---|
| 6381 | | $('#title').after('<div id=\"error\"><h5>"._("Conflicting Extensions")."</h5>' + data + '</div>'); |
|---|
| 6382 | | ajax_result = false; |
|---|
| 6383 | | } |
|---|
| 6384 | | }, |
|---|
| 6385 | | error: function(data) { |
|---|
| 6386 | | console.log('an error was recevied: ' + data); |
|---|
| 6387 | | // TODO: Should we stop the submital and do something here? |
|---|
| | 6371 | $.ajax({ |
|---|
| | 6372 | type: 'POST', |
|---|
| | 6373 | url: 'config.php', |
|---|
| | 6374 | data: 'handler=api&function=framework_get_conflict_url_helper&args=' + exten, |
|---|
| | 6375 | dataType: 'json', |
|---|
| | 6376 | cache: false, |
|---|
| | 6377 | async: false, |
|---|
| | 6378 | success: function(data, textStatus, XMLHttpRequest) { |
|---|
| | 6379 | if (data.length !== 0) { |
|---|
| | 6380 | $('#title').after('<div id=\"error\"><h5>"._("Conflicting Extensions")."</h5>' + data + '</div>'); |
|---|
| | 6381 | ajax_result = false; |
|---|
| 6548 | | $conflict_url = array(); |
|---|
| 6549 | | $usage_arr = framework_check_extension_usage($_REQUEST['extension']); |
|---|
| 6550 | | if (!empty($usage_arr)) { |
|---|
| 6551 | | $GLOBALS['abort'] = true; |
|---|
| 6552 | | $conflict_url = framework_display_extension_usage_alert($usage_arr,true); |
|---|
| 6553 | | global $currentcomponent; |
|---|
| 6554 | | $id=0; |
|---|
| 6555 | | $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)); |
|---|
| 6556 | | foreach ($conflict_url as $edit_link) { |
|---|
| 6557 | | $currentcomponent->addguielem('_top', new gui_link('conflict'.$id++, $edit_link['label'], $edit_link['url'])); |
|---|
| 6558 | | } |
|---|
| 6559 | | $msg = ($_REQUEST['display'] == 'users') ? _("Configure user again:") : _("Configure extension again:"); |
|---|
| 6560 | | $currentcomponent->addguielem('_top', new gui_subheading('conflict_end', $msg, false)); |
|---|
| 6561 | | unset($_REQUEST['action']); |
|---|
| 6562 | | redirect_standard_continue(); |
|---|
| 6563 | | } elseif (core_users_add($_REQUEST)) { |
|---|
| | 6548 | if (core_users_add($_REQUEST)) { |
|---|