From d8dac3f80eee2c99cfb927a02d2b89b1e750d86e Mon Sep 17 00:00:00 2001 From: 3D-I <480857+3D-I@users.noreply.github.com> Date: Tue, 31 Dec 2019 23:29:52 +0100 Subject: [ticket/16281] Fix Ajax refresh-data for extensions' Tab PHPBB3-16281 --- phpBB/includes/acp/acp_extensions.php | 44 +++++++++++++++++++++++++++-------- 1 file changed, 34 insertions(+), 10 deletions(-) (limited to 'phpBB') diff --git a/phpBB/includes/acp/acp_extensions.php b/phpBB/includes/acp/acp_extensions.php index 6ac70ce3a8..85a7e08a99 100644 --- a/phpBB/includes/acp/acp_extensions.php +++ b/phpBB/includes/acp/acp_extensions.php @@ -243,12 +243,20 @@ class acp_extensions 'DISABLE' => $this->u_action . '&action=disable_pre&ext_name=' . urlencode($ext_name), ]); - $json_response = new \phpbb\json_response; - $json_response->send(array( + $data = array( 'EXT_ENABLE_SUCCESS' => true, 'ACTIONS' => $actions, - )); + ); + + $data['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 +307,20 @@ class acp_extensions 'DELETE_DATA' => $this->u_action . '&action=delete_data_pre&ext_name=' . urlencode($ext_name), ]); - $json_response = new \phpbb\json_response; - $json_response->send(array( + $data = [ 'EXT_DISABLE_SUCCESS' => true, 'ACTIONS' => $actions, - )); + ]; + + $data['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 +377,20 @@ class acp_extensions 'ENABLE' => $this->u_action . '&action=enable_pre&ext_name=' . urlencode($ext_name), ]); - $json_response = new \phpbb\json_response; - $json_response->send(array( + $data = [ 'EXT_DELETE_DATA_SUCCESS' => true, - 'ACTIONS' => $actions, - )); + 'ACTIONS' => $actions, + ]; + + $data['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; -- cgit v1.2.1 From 6705adf47b4a923df731f2d0576ca5a1b61421ef Mon Sep 17 00:00:00 2001 From: 3D-I <480857+3D-I@users.noreply.github.com> Date: Tue, 31 Dec 2019 23:33:21 +0100 Subject: [ticket/16281] Fix Ajax refresh-data for extensions' Tab PHPBB3-16281 --- phpBB/includes/acp/acp_extensions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'phpBB') diff --git a/phpBB/includes/acp/acp_extensions.php b/phpBB/includes/acp/acp_extensions.php index 85a7e08a99..ecb5fb00df 100644 --- a/phpBB/includes/acp/acp_extensions.php +++ b/phpBB/includes/acp/acp_extensions.php @@ -243,10 +243,10 @@ class acp_extensions 'DISABLE' => $this->u_action . '&action=disable_pre&ext_name=' . urlencode($ext_name), ]); - $data = array( + $data = [ 'EXT_ENABLE_SUCCESS' => true, 'ACTIONS' => $actions, - ); + ]; $data['REFRESH_DATA'] = [ 'url' => '', -- cgit v1.2.1 From 314dfb294a210524783ee11d653f7c737bc46f15 Mon Sep 17 00:00:00 2001 From: 3D-I <480857+3D-I@users.noreply.github.com> Date: Tue, 31 Dec 2019 23:51:08 +0100 Subject: [ticket/16281] Fix Ajax refresh-data for extensions' Tab PHPBB3-16281 --- phpBB/includes/acp/acp_extensions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB') diff --git a/phpBB/includes/acp/acp_extensions.php b/phpBB/includes/acp/acp_extensions.php index ecb5fb00df..b02d9710c0 100644 --- a/phpBB/includes/acp/acp_extensions.php +++ b/phpBB/includes/acp/acp_extensions.php @@ -379,7 +379,7 @@ class acp_extensions $data = [ 'EXT_DELETE_DATA_SUCCESS' => true, - 'ACTIONS' => $actions, + 'ACTIONS' => $actions, ]; $data['REFRESH_DATA'] = [ -- cgit v1.2.1 From 7e5d0b9ec8568ea12bb2d8ef7fc7501ed17dce99 Mon Sep 17 00:00:00 2001 From: 3D-I <480857+3D-I@users.noreply.github.com> Date: Wed, 1 Jan 2020 00:33:59 +0100 Subject: [ticket/16281] Fix Ajax refresh-data for extensions' Tab PHPBB3-16281 --- phpBB/adm/style/acp_ext_actions.html | 7 ++++--- phpBB/includes/acp/acp_extensions.php | 27 ++++++++++++--------------- 2 files changed, 16 insertions(+), 18 deletions(-) (limited to 'phpBB') 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 %} -{{ action.L_ACTION }}{% if not action.S_LAST_ROW %} | {% endif %} + {{ action.L_ACTION }}{% if not action.S_LAST_ROW %} | {% endif %} {% endfor %} + {% for action in disabled.actions %} -{{ action.L_ACTION }}{% if not action.S_LAST_ROW %} | {% endif %} -{% endfor %} \ No newline at end of file + {{ action.L_ACTION }}{% if not action.S_LAST_ROW %} | {% endif %} +{% endfor %} diff --git a/phpBB/includes/acp/acp_extensions.php b/phpBB/includes/acp/acp_extensions.php index b02d9710c0..86966541be 100644 --- a/phpBB/includes/acp/acp_extensions.php +++ b/phpBB/includes/acp/acp_extensions.php @@ -246,11 +246,10 @@ class acp_extensions $data = [ 'EXT_ENABLE_SUCCESS' => true, 'ACTIONS' => $actions, - ]; - - $data['REFRESH_DATA'] = [ - 'url' => '', - 'time' => 0, + 'REFRESH_DATA' => [ + 'url' => '', + 'time' => 0, + ], ]; $json_response = new \phpbb\json_response; @@ -310,11 +309,10 @@ class acp_extensions $data = [ 'EXT_DISABLE_SUCCESS' => true, 'ACTIONS' => $actions, - ]; - - $data['REFRESH_DATA'] = [ - 'url' => '', - 'time' => 0, + 'REFRESH_DATA' => [ + 'url' => '', + 'time' => 0, + ], ]; $json_response = new \phpbb\json_response; @@ -380,11 +378,10 @@ class acp_extensions $data = [ 'EXT_DELETE_DATA_SUCCESS' => true, 'ACTIONS' => $actions, - ]; - - $data['REFRESH_DATA'] = [ - 'url' => '', - 'time' => 0, + 'REFRESH_DATA' => [ + 'url' => '', + 'time' => 0, + ], ]; $json_response = new \phpbb\json_response; -- cgit v1.2.1