diff options
author | 3D-I <eataly3d@gmail.com> | 2019-08-13 04:30:48 +0200 |
---|---|---|
committer | 3D-I <eataly3d@gmail.com> | 2019-08-13 04:31:07 +0200 |
commit | 3fbdb2f345cc5fb132755033ba3b9d2fa061218e (patch) | |
tree | 79bafc2a85aace985594839aa4016e6e34957fde /phpBB/includes/acp | |
parent | 0a5d167441004c4ed56b6b7cf32fd0c0eb5ae443 (diff) | |
download | forums-3fbdb2f345cc5fb132755033ba3b9d2fa061218e.tar forums-3fbdb2f345cc5fb132755033ba3b9d2fa061218e.tar.gz forums-3fbdb2f345cc5fb132755033ba3b9d2fa061218e.tar.bz2 forums-3fbdb2f345cc5fb132755033ba3b9d2fa061218e.tar.xz forums-3fbdb2f345cc5fb132755033ba3b9d2fa061218e.zip |
[ticket/16019] Deny prosilver's uninstallation
PHPBB3-16019
Diffstat (limited to 'phpBB/includes/acp')
-rw-r--r-- | phpBB/includes/acp/acp_styles.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/phpBB/includes/acp/acp_styles.php b/phpBB/includes/acp/acp_styles.php index 1bf5a3c6a8..1983dff1cc 100644 --- a/phpBB/includes/acp/acp_styles.php +++ b/phpBB/includes/acp/acp_styles.php @@ -289,6 +289,14 @@ class acp_styles { global $user, $phpbb_log; + // 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_fetchrow($result); + $this->db->sql_freeresult($result); + $default = $this->default_style; $uninstalled = array(); $messages = array(); @@ -296,6 +304,10 @@ class acp_styles // Check styles list foreach ($ids as $id) { + if ($id == $prosilver_id) + { + trigger_error($this->user->lang['UNINSTALL_PROSILVER'] . adm_back_link($this->u_action), E_USER_WARNING); + } if (!$id) { trigger_error($this->user->lang['INVALID_STYLE_ID'] . adm_back_link($this->u_action), E_USER_WARNING); |