mirror of
https://github.com/myvesta/vesta
synced 2025-08-14 02:28:05 -07:00
Fix #502
This commit is contained in:
parent
875474a951
commit
735fc1fc7a
1 changed files with 8 additions and 3 deletions
|
@ -19,9 +19,14 @@ source $VESTA/conf/vesta.conf
|
|||
|
||||
|
||||
is_language_valid() {
|
||||
if [ ! -e "$VESTA/web/inc/i18n/$language.php" ]; then
|
||||
echo "Error: language $language not exist"
|
||||
log_event "$E_NOTEXIST $EVENT"
|
||||
if ! [[ "$1" =~ ^[[:alnum:]_-]+$ ]]; then
|
||||
echo "Error: language $1 not valid"
|
||||
log_event "$E_INVALID" "$EVENT"
|
||||
exit $E_INVALID
|
||||
fi
|
||||
if [ ! -e "$VESTA/web/inc/i18n/$1.php" ]; then
|
||||
echo "Error: language $1 not exist"
|
||||
log_event "$E_NOTEXIST" "$EVENT"
|
||||
exit $E_NOTEXIST
|
||||
fi
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue