Commit 7a7ec82a authored by Franco Fichtner's avatar Franco Fichtner

system: sanitise theme handling here

parent c7740782
...@@ -477,20 +477,16 @@ include("head.inc"); ...@@ -477,20 +477,16 @@ include("head.inc");
<td width="78%" class="vtable"> <td width="78%" class="vtable">
<select name="theme" class="selectpicker" data-style="btn-default" data-width="auto"> <select name="theme" class="selectpicker" data-style="btn-default" data-width="auto">
<?php <?php
$files = return_dir_as_array("/usr/local/www/themes/"); $files = return_dir_as_array('/usr/local/www/themes/');
foreach($files as $f): $curtheme = get_current_theme();
if ((substr($f, 0, 1) == "_") && !isset($config['system']['developer']))
continue; foreach ($files as $file):
if ($f == "CVS") $selected = '';
continue; if ($file == $curtheme) {
$curtheme = "opnsense"; $selected = ' selected="selected"';
if ($config['theme']) }
$curtheme = $config['theme'];
$selected = "";
if($f == $curtheme)
$selected = " selected=\"selected\"";
?> ?>
<option <?=$selected;?>><?=$f;?></option> <option <?=$selected;?>><?=$file;?></option>
<?php endforeach; ?> <?php endforeach; ?>
</select> </select>
<strong> <strong>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment