diff options
author | Marc Alexander <admin@m-a-styles.de> | 2019-08-17 11:02:16 +0200 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2019-08-17 11:02:16 +0200 |
commit | 7dd822942ad80c930f9817a9a4993f247c468e31 (patch) | |
tree | 02c62d5f3d6d068b5501b310eb85d55732f36f86 /phpBB/includes/acp/acp_styles.php | |
parent | 826cc9751a8956d275f5e8e894d3fe3d89f6004d (diff) | |
parent | 9a992a48666b1769522002d84f5d6e995dca80fb (diff) | |
download | forums-7dd822942ad80c930f9817a9a4993f247c468e31.tar forums-7dd822942ad80c930f9817a9a4993f247c468e31.tar.gz forums-7dd822942ad80c930f9817a9a4993f247c468e31.tar.bz2 forums-7dd822942ad80c930f9817a9a4993f247c468e31.tar.xz forums-7dd822942ad80c930f9817a9a4993f247c468e31.zip |
Merge branch '3.2.x' into 3.3.x
Diffstat (limited to 'phpBB/includes/acp/acp_styles.php')
-rw-r--r-- | phpBB/includes/acp/acp_styles.php | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/phpBB/includes/acp/acp_styles.php b/phpBB/includes/acp/acp_styles.php index 5029510839..87c8d88f52 100644 --- a/phpBB/includes/acp/acp_styles.php +++ b/phpBB/includes/acp/acp_styles.php @@ -259,6 +259,19 @@ class acp_styles // Get list of styles to uninstall $ids = $this->request_vars('id', 0, true); + // Don't remove prosilver, you can still deactivate it. + $sql = 'SELECT style_id + FROM ' . STYLES_TABLE . " + WHERE style_name = '" . $this->db->sql_escape('prosilver') . "'"; + $result = $this->db->sql_query($sql); + $prosilver_id = (int) $this->db->sql_fetchfield('style_id'); + $this->db->sql_freeresult($result); + + if ($prosilver_id && in_array($prosilver_id, $ids)) + { + trigger_error($this->user->lang('UNINSTALL_PROSILVER') . adm_back_link($this->u_action), E_USER_WARNING); + } + // Check if confirmation box was submitted if (confirm_box(true)) { @@ -998,11 +1011,14 @@ class acp_styles 'L_ACTION' => $this->user->lang['EXPORT'] ); */ - // Uninstall - $actions[] = array( - 'U_ACTION' => $this->u_action . '&action=uninstall&hash=' . generate_link_hash('uninstall') . '&id=' . $style['style_id'], - 'L_ACTION' => $this->user->lang['STYLE_UNINSTALL'] - ); + if ($style['style_name'] !== 'prosilver') + { + // Uninstall + $actions[] = array( + 'U_ACTION' => $this->u_action . '&action=uninstall&hash=' . generate_link_hash('uninstall') . '&id=' . $style['style_id'], + 'L_ACTION' => $this->user->lang['STYLE_UNINSTALL'] + ); + } // Preview $actions[] = array( |