1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-05 08:17:47 +02:00

[ticket/16688] Fix 'Remove' link for Extension manager

'Remove' link is broken and rendered as 'Array'.

PHPBB3-16943
This commit is contained in:
rxu
2021-12-19 19:30:47 +07:00
parent 4d9e33aa32
commit 85f23474d7
3 changed files with 99 additions and 21 deletions

View File

@@ -60,7 +60,7 @@
<td style="text-align: center;"><a href="{enabled.U_DETAILS}">{L_DETAILS}</a></td>
<td style="text-align: center;">
<!-- BEGIN actions -->
<a href="{enabled.actions.U_ACTION}"<!-- IF enabled.actions.L_ACTION_EXPLAIN --> title="{enabled.actions.L_ACTION_EXPLAIN}"<!-- ENDIF -->>{enabled.actions.L_ACTION}</a>
<a href="{enabled.actions.U_ACTION}"<!-- IF enabled.actions.ACTION == 'REMOVE' --> style="color: #bc2a4d;"<!-- ENDIF --><!-- IF enabled.actions.L_ACTION_EXPLAIN --> title="{enabled.actions.L_ACTION_EXPLAIN}"<!-- ENDIF -->>{enabled.actions.L_ACTION}</a>
<!-- IF not enabled.actions.S_LAST_ROW -->&nbsp;|&nbsp;<!-- ENDIF -->
<!-- END actions -->
</td>
@@ -88,7 +88,7 @@
</td>
<td style="text-align: center;">
<!-- BEGIN actions -->
<a href="{disabled.actions.U_ACTION}"<!-- IF disabled.actions.L_ACTION_EXPLAIN --> title="{disabled.actions.L_ACTION_EXPLAIN}"<!-- ENDIF -->>{disabled.actions.L_ACTION}</a>
<a href="{disabled.actions.U_ACTION}"<!-- IF disabled.actions.ACTION == 'REMOVE' --> style="color: #bc2a4d;"<!-- ENDIF --><!-- IF disabled.actions.L_ACTION_EXPLAIN --> title="{disabled.actions.L_ACTION_EXPLAIN}"<!-- ENDIF -->>{disabled.actions.L_ACTION}</a>
<!-- IF not disabled.actions.S_LAST_ROW -->&nbsp;|&nbsp;<!-- ENDIF -->
<!-- END actions -->
</td>

View File

@@ -838,10 +838,7 @@ class acp_extensions
{
$this->output_actions('enabled', [
'UPDATE' => $this->u_catalog_action . '&amp;action=update&amp;extension=' . urlencode($block_vars['META_NAME']),
'REMOVE' => [
'url' => $this->u_catalog_action . '&amp;action=remove&amp;extension=' . urlencode($block_vars['META_NAME']),
'color' => '#BC2A4D;',
]
'REMOVE' => $this->u_catalog_action . '&amp;action=remove&amp;extension=' . urlencode($block_vars['META_NAME']),
]);
}
}
@@ -922,10 +919,7 @@ class acp_extensions
{
$this->output_actions('disabled', [
'UPDATE' => $this->u_catalog_action . '&amp;action=update&amp;extension=' . urlencode($block_vars['META_NAME']),
'REMOVE' => [
'url' => $this->u_catalog_action . '&amp;action=remove&amp;extension=' . urlencode($block_vars['META_NAME']),
'color' => '#BC2A4D;',
]
'REMOVE' => $this->u_catalog_action . '&amp;action=remove&amp;extension=' . urlencode($block_vars['META_NAME']),
]);
}
}
@@ -997,6 +991,7 @@ class acp_extensions
$this->output_actions('disabled', array(
'ENABLE' => $this->u_action . '&amp;action=enable_pre&amp;ext_name=' . urlencode($name),
'REMOVE' => $this->u_catalog_action . '&amp;action=remove&amp;extension=' . urlencode($block_vars['META_NAME']),
));
}
}
@@ -1009,11 +1004,12 @@ class acp_extensions
*/
private function output_actions($block, $actions)
{
foreach ($actions as $lang => $url)
foreach ($actions as $action => $url)
{
$this->template->assign_block_vars($block . '.actions', [
'L_ACTION' => $this->user->lang('EXTENSION_' . $lang),
'L_ACTION_EXPLAIN' => (isset($this->user->lang['EXTENSION_' . $lang . '_EXPLAIN'])) ? $this->user->lang('EXTENSION_' . $lang . '_EXPLAIN') : '',
'ACTION' => $action,
'L_ACTION' => $this->user->lang('EXTENSION_' . $action),
'L_ACTION_EXPLAIN' => (isset($this->user->lang['EXTENSION_' . $action . '_EXPLAIN'])) ? $this->user->lang('EXTENSION_' . $action . '_EXPLAIN') : '',
'U_ACTION' => $url,
]);
}