mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-18 18:44:44 +00:00
system: sanitise theme handling here
This commit is contained in:
parent
c774078268
commit
7a7ec82a0c
@ -477,20 +477,16 @@ include("head.inc");
|
||||
<td width="78%" class="vtable">
|
||||
<select name="theme" class="selectpicker" data-style="btn-default" data-width="auto">
|
||||
<?php
|
||||
$files = return_dir_as_array("/usr/local/www/themes/");
|
||||
foreach($files as $f):
|
||||
if ((substr($f, 0, 1) == "_") && !isset($config['system']['developer']))
|
||||
continue;
|
||||
if ($f == "CVS")
|
||||
continue;
|
||||
$curtheme = "opnsense";
|
||||
if ($config['theme'])
|
||||
$curtheme = $config['theme'];
|
||||
$selected = "";
|
||||
if($f == $curtheme)
|
||||
$selected = " selected=\"selected\"";
|
||||
$files = return_dir_as_array('/usr/local/www/themes/');
|
||||
$curtheme = get_current_theme();
|
||||
|
||||
foreach ($files as $file):
|
||||
$selected = '';
|
||||
if ($file == $curtheme) {
|
||||
$selected = ' selected="selected"';
|
||||
}
|
||||
?>
|
||||
<option <?=$selected;?>><?=$f;?></option>
|
||||
<option <?=$selected;?>><?=$file;?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<strong>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user