CS fixes and consistence, update changelog

pull/6512/head
Aleksander Machniak 6 years ago
parent 999845d3b2
commit 619ddfed3d

@ -1,6 +1,7 @@
CHANGELOG Roundcube Webmail
===========================
- Add skins_allowed option (#6483)
- SMTP GSSAPI support via krb_authentication plugin (#6417)
- Avoid Referer leaking by using Referrer-Policy:same-origin header (#6385)
- Removed referer_check option (#6440)

@ -1057,7 +1057,7 @@ $config['default_charset'] = 'ISO-8859-1';
$config['skin'] = 'larry';
// limit skins available/shown in the settings section
$config['skins_allowed'] = [];
$config['skins_allowed'] = array();
// Enables using standard browser windows (that can be handled as tabs)
// instead of popup windows

@ -1306,16 +1306,15 @@ function rcmail_get_skins()
$path = RCUBE_INSTALL_PATH . 'skins';
$skins = array();
$dir = opendir($path);
$limit = $RCMAIL->config->get('skins_allowed');
$limit = (array) $RCMAIL->config->get('skins_allowed');
if (!$dir) {
return false;
}
while (($file = readdir($dir)) !== false) {
$filename = $path.'/'.$file;
if (!preg_match('/^\./', $file) && is_dir($filename) && is_readable($filename)
&& (!is_array($limit) || !count($limit) || in_array($file, $limit))) {
$filename = $path . '/' . $file;
if ($file[0] != '.' && (empty($limit) || in_array($file, $limit) && is_dir($filename) && is_readable($filename))) {
$skins[] = $file;
}
}

Loading…
Cancel
Save