Skip to content

Commit

Permalink
Merge branch 'ZoneMinder:master' into patch-132
Browse files Browse the repository at this point in the history
  • Loading branch information
IgorA100 authored May 31, 2024
2 parents 5565b8c + 3c8ebc8 commit 802ffe1
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 5 deletions.
8 changes: 6 additions & 2 deletions web/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@
return;
}

if ( isset($_GET['skin']) ) {
if ( defined('ZM_FORCE_SKIN_DEFAULT') ) {
$skin = ZM_FORCE_SKIN_DEFAULT;
} else if ( isset($_GET['skin']) ) {
$skin = $_GET['skin'];
} else if ( isset($_COOKIE['zmSkin']) ) {
$skin = $_COOKIE['zmSkin'];
Expand All @@ -76,7 +78,9 @@
}
}
global $css;
if ( isset($_GET['css']) ) {
if (defined('ZM_FORCE_CSS_DEFAULT')) {
$css = ZM_FORCE_CSS_DEFAULT;
} else if ( isset($_GET['css']) ) {
$css = $_GET['css'];
} else if ( isset($_COOKIE['zmCSS']) ) {
$css = $_COOKIE['zmCSS'];
Expand Down
7 changes: 6 additions & 1 deletion web/skins/classic/includes/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,12 @@ function output_cache_busted_stylesheet_links($files) {
<meta name="viewport" content="width=device-width, initial-scale=1">
<title><?php echo validHtmlStr(ZM_WEB_TITLE_PREFIX) . ' - ' . validHtmlStr($title) ?></title>
<?php
if ( file_exists("skins/$skin/css/$css/graphics/favicon.ico") ) {
if (defined('ZM_WEB_FAVICON')) {
echo '
<link rel="icon" type="image/ico" href="'.ZM_WEB_FAVICON.'"/>
<link rel="shortcut icon" href="'.ZM_WEB_FAVICON.'"/>
';
} else if ( file_exists("skins/$skin/css/$css/graphics/favicon.ico") ) {
echo "
<link rel=\"icon\" type=\"image/ico\" href=\"skins/$skin/css/$css/graphics/favicon.ico\"/>
<link rel=\"shortcut icon\" href=\"skins/$skin/css/$css/graphics/favicon.ico\"/>
Expand Down
11 changes: 9 additions & 2 deletions web/skins/classic/views/options.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
$canEdit = canEdit('System');

$tabs = array();
if (!defined('ZM_FORCE_CSS_DEFAULT') or !defined('ZM_FORCE_SKIN_DEFAULT'))
$tabs['skins'] = translate('Display');
$tabs['system'] = translate('System');
$tabs['config'] = translate('Config');
Expand Down Expand Up @@ -179,8 +180,14 @@
];
} else if ($tab == 'system') {
// $configCats[$tab]['ZM_LANG_DEFAULT']['Hint'] = join('|', getLanguages());
$configCats[$tab]['ZM_SKIN_DEFAULT']['Hint'] = join('|', array_map('basename', glob('skins/*',GLOB_ONLYDIR)));
$configCats[$tab]['ZM_CSS_DEFAULT']['Hint'] = join('|', array_map ( 'basename', glob('skins/'.ZM_SKIN_DEFAULT.'/css/*',GLOB_ONLYDIR) ));
if (defined('ZM_FORCE_SKIN_DEFAULT'))
$configCats[$tab]['ZM_SKIN_DEFAULT']['Hint'] = ZM_FORCE_SKIN_DEFAULT;
else
$configCats[$tab]['ZM_SKIN_DEFAULT']['Hint'] = join('|', array_map('basename', glob('skins/*',GLOB_ONLYDIR)));
if (defined('ZM_FORCE_CSS_DEFAULT'))
$configCats[$tab]['ZM_CSS_DEFAULT']['Hint'] = ZM_FORCE_CSS_DEFAULT;
else
$configCats[$tab]['ZM_CSS_DEFAULT']['Hint'] = join('|', array_map ( 'basename', glob('skins/'.ZM_SKIN_DEFAULT.'/css/*',GLOB_ONLYDIR) ));
$configCats[$tab]['ZM_BANDWIDTH_DEFAULT']['Hint'] = $bandwidth_options;

// create new multidim array for languages (code1|translation)
Expand Down

0 comments on commit 802ffe1

Please sign in to comment.