aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2020-01-01 17:43:43 +0100
committerMarc Alexander <admin@m-a-styles.de>2020-01-01 17:43:43 +0100
commit43e5337a0ad83e5146d3e322b4e119b65c4ac766 (patch)
tree55d69ae864cda3c695112790837beff4fba826b9
parent1ae812d172e3e3a2398476ca630cf7436434256b (diff)
parent7e5d0b9ec8568ea12bb2d8ef7fc7501ed17dce99 (diff)
downloadforums-43e5337a0ad83e5146d3e322b4e119b65c4ac766.tar
forums-43e5337a0ad83e5146d3e322b4e119b65c4ac766.tar.gz
forums-43e5337a0ad83e5146d3e322b4e119b65c4ac766.tar.bz2
forums-43e5337a0ad83e5146d3e322b4e119b65c4ac766.tar.xz
forums-43e5337a0ad83e5146d3e322b4e119b65c4ac766.zip
Merge pull request #5806 from 3D-I/ticket/16281
[ticket/16281] Fix Ajax refresh-data for extensions' Tab
-rw-r--r--phpBB/adm/style/acp_ext_actions.html7
-rw-r--r--phpBB/includes/acp/acp_extensions.php39
2 files changed, 34 insertions, 12 deletions
diff --git a/phpBB/adm/style/acp_ext_actions.html b/phpBB/adm/style/acp_ext_actions.html
index 6f2341f381..6b59ab7180 100644
--- a/phpBB/adm/style/acp_ext_actions.html
+++ b/phpBB/adm/style/acp_ext_actions.html
@@ -1,6 +1,7 @@
{% for action in enabled.actions %}
-<a href="{{ action.U_ACTION }}"{% if action.L_ACTION_EXPLAIN %} title="{{ action.L_ACTION_EXPLAIN }}"{% endif %}{% if action.COLOR %} style="color: {{ action.COLOR }};"{% endif %} data-ajax="{{ action.ACTION_AJAX }}" data-refresh="true">{{ action.L_ACTION }}</a>{% if not action.S_LAST_ROW %}&nbsp;|&nbsp;{% endif %}
+ <a href="{{ action.U_ACTION }}"{% if action.L_ACTION_EXPLAIN %} title="{{ action.L_ACTION_EXPLAIN }}"{% endif %}{% if action.COLOR %} style="color: {{ action.COLOR }};"{% endif %} data-ajax="{{ action.ACTION_AJAX }}" data-refresh="true">{{ action.L_ACTION }}</a>{% if not action.S_LAST_ROW %}&nbsp;|&nbsp;{% endif %}
{% endfor %}
+
{% for action in disabled.actions %}
-<a href="{{ action.U_ACTION }}"{% if action.L_ACTION_EXPLAIN %} title="{{ action.L_ACTION_EXPLAIN }}"{% endif %}{% if action.COLOR %} style="color: {{ action.COLOR }};"{% endif %} data-ajax="{{ action.ACTION_AJAX }}" data-refresh="true">{{ action.L_ACTION }}</a>{% if not action.S_LAST_ROW %}&nbsp;|&nbsp;{% endif %}
-{% endfor %} \ No newline at end of file
+ <a href="{{ action.U_ACTION }}"{% if action.L_ACTION_EXPLAIN %} title="{{ action.L_ACTION_EXPLAIN }}"{% endif %}{% if action.COLOR %} style="color: {{ action.COLOR }};"{% endif %} data-ajax="{{ action.ACTION_AJAX }}" data-refresh="true">{{ action.L_ACTION }}</a>{% if not action.S_LAST_ROW %}&nbsp;|&nbsp;{% endif %}
+{% endfor %}
diff --git a/phpBB/includes/acp/acp_extensions.php b/phpBB/includes/acp/acp_extensions.php
index 6ac70ce3a8..86966541be 100644
--- a/phpBB/includes/acp/acp_extensions.php
+++ b/phpBB/includes/acp/acp_extensions.php
@@ -243,12 +243,19 @@ class acp_extensions
'DISABLE' => $this->u_action . '&amp;action=disable_pre&amp;ext_name=' . urlencode($ext_name),
]);
- $json_response = new \phpbb\json_response;
- $json_response->send(array(
+ $data = [
'EXT_ENABLE_SUCCESS' => true,
'ACTIONS' => $actions,
- ));
+ 'REFRESH_DATA' => [
+ 'url' => '',
+ 'time' => 0,
+ ],
+ ];
+
+ $json_response = new \phpbb\json_response;
+ $json_response->send($data);
}
+
trigger_error($this->user->lang('EXTENSION_ENABLE_SUCCESS') . adm_back_link($this->u_action), E_USER_NOTICE);
break;
@@ -299,12 +306,19 @@ class acp_extensions
'DELETE_DATA' => $this->u_action . '&amp;action=delete_data_pre&amp;ext_name=' . urlencode($ext_name),
]);
- $json_response = new \phpbb\json_response;
- $json_response->send(array(
+ $data = [
'EXT_DISABLE_SUCCESS' => true,
'ACTIONS' => $actions,
- ));
+ 'REFRESH_DATA' => [
+ 'url' => '',
+ 'time' => 0,
+ ],
+ ];
+
+ $json_response = new \phpbb\json_response;
+ $json_response->send($data);
}
+
trigger_error($this->user->lang('EXTENSION_DISABLE_SUCCESS') . adm_back_link($this->u_action), E_USER_NOTICE);
break;
@@ -361,12 +375,19 @@ class acp_extensions
'ENABLE' => $this->u_action . '&amp;action=enable_pre&amp;ext_name=' . urlencode($ext_name),
]);
- $json_response = new \phpbb\json_response;
- $json_response->send(array(
+ $data = [
'EXT_DELETE_DATA_SUCCESS' => true,
'ACTIONS' => $actions,
- ));
+ 'REFRESH_DATA' => [
+ 'url' => '',
+ 'time' => 0,
+ ],
+ ];
+
+ $json_response = new \phpbb\json_response;
+ $json_response->send($data);
}
+
trigger_error($this->user->lang('EXTENSION_DELETE_DATA_SUCCESS') . adm_back_link($this->u_action), E_USER_NOTICE);
break;