mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-03 10:51:05 +02:00
yWeb: allow style_set function w/o parameter to install correct style
Origin commit data
------------------
Branch: ni/coolstream
Commit: 3299911086
Author: vanhofen <vanhofen@gmx.de>
Date: 2015-03-16 (Mon, 16 Mar 2015)
Origin message was:
------------------
- yWeb: allow style_set function w/o parameter to install correct style
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -51,16 +51,23 @@ style_get()
|
||||
# -----------------------------------------------------------
|
||||
style_set()
|
||||
{
|
||||
# This function should be called one time after installing a new image
|
||||
# to get sure, the right skin is installed too
|
||||
|
||||
style=${1:-$(config_get_value_direct $y_config_Y_Web 'style')}
|
||||
test -n "$style" || return
|
||||
|
||||
y_path_directory=$(config_get_value_direct $y_config_nhttpd 'WebsiteMain.directory')
|
||||
y_path_override_directory=$(config_get_value_direct $y_config_nhttpd 'WebsiteMain.override_directory')
|
||||
|
||||
cd $y_path_directory
|
||||
if [ -e $y_path_override_directory/styles/Y_Dist-$1.css ]; then
|
||||
cp $y_path_override_directory/styles/Y_Dist-$1.css Y_Dist.css
|
||||
if [ -e $y_path_override_directory/styles/Y_Dist-$style.css ]; then
|
||||
cp $y_path_override_directory/styles/Y_Dist-$style.css Y_Dist.css
|
||||
elif [ -e $y_path_directory/styles/Y_Dist-$style.css ]; then
|
||||
cp $y_path_directory/styles/Y_Dist-$style.css Y_Dist.css
|
||||
else
|
||||
cp $y_path_directory/styles/Y_Dist-$1.css Y_Dist.css
|
||||
config_set_value_direct $y_config_Y_Web 'style'
|
||||
fi
|
||||
#config_set_value_direct $y_config_Y_Web 'style' $1
|
||||
}
|
||||
# -----------------------------------------------------------
|
||||
# Image Backup - build form
|
||||
|
Reference in New Issue
Block a user