Skip to content

Commit

Permalink
Ensure only valid types are allowed in style_type
Browse files Browse the repository at this point in the history
  • Loading branch information
mark0263 committed Dec 2, 2016
1 parent 7cf7a4a commit ff39b0c
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
4 changes: 2 additions & 2 deletions public_html/admin/install/templates/siteconfig.thtml
Expand Up @@ -218,8 +218,8 @@ $_SYSTEM['alert_position'] = '{alert_position}';
// | |
// | Specifies the base uikit style - valid values are: |
// | |
// | '' - will use the flat style |
// | '.gradient.' - will use the gradient style |
// | '.' - will use the flat style |
// | '.gradient.' - will use the gradient style |
// | '.almost-flat.' - will use the almost flat style |
// | |
// | See https://www.glfusion.org/wiki/glfusion:styling:custom_theme |
Expand Down
4 changes: 2 additions & 2 deletions public_html/layout/cms/admin/siteconfig.thtml
Expand Up @@ -219,8 +219,8 @@ $_SYSTEM['alert_position'] = '{alert_position}';
// | |
// | Specifies the base uikit style - valid values are: |
// | |
// | '' - will use the flat style |
// | '.gradient.' - will use the gradient style |
// | '.' - will use the flat style |
// | '.gradient.' - will use the gradient style |
// | '.almost-flat.' - will use the almost flat style |
// | |
// | See https://www.glfusion.org/wiki/glfusion:styling:custom_theme |
Expand Down
8 changes: 6 additions & 2 deletions public_html/layout/cms/functions.php
Expand Up @@ -115,11 +115,15 @@
$outputHandle->addScriptFile($_CONF['path_layout'].'js/jquery.smartmenus.min.js');

// Load our CSS specific to this theme

$validTypes = array('.','.gradient.','.almost-flat.');
if ( !isset($_SYSTEM['style_type']) || $_SYSTEM['style_type'] == 'undefined' ) {
$styleType = '.gradient.';
} else {
$styleType = $_SYSTEM['style_type'];
if ( in_array($_SYSTEM['style_type'],$validTypes) ) {
$styleType = $_SYSTEM['style_type'];
} else {
$styleType = '.gradient.';
}
}

$outputHandle->addCSSFile($_CONF['path_layout'].'css/uikit'.$styleType.'min.css',HEADER_PRIO_HIGH);
Expand Down
4 changes: 2 additions & 2 deletions public_html/siteconfig.php.dist
Expand Up @@ -218,8 +218,8 @@ $_SYSTEM['alert_position'] = 'top-right';
// | |
// | Specifies the base uikit style - valid values are: |
// | |
// | '' - will use the flat style |
// | '.gradient.' - will use the gradient style |
// | '.' - will use the flat style |
// | '.gradient.' - will use the gradient style |
// | '.almost-flat.' - will use the almost flat style |
// | |
// | See https://www.glfusion.org/wiki/glfusion:styling:custom_theme |
Expand Down

0 comments on commit ff39b0c

Please sign in to comment.