From b2f085806040ee9eb4ea02739c507c20baf8e981 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Thu, 22 Nov 2018 22:15:27 +0300 Subject: [PATCH] sanity config: fix typo --- include/sanity_check.php | 2 +- include/sanity_config.php | 4 ++-- utils/regen_config_checks.sh | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/sanity_check.php b/include/sanity_check.php index 460bd0ba7..8a38ec523 100755 --- a/include/sanity_check.php +++ b/include/sanity_check.php @@ -75,7 +75,7 @@ "Configuration option checker sanity_config.php is outdated, please recreate it using ./utils/regen_config_checks.sh"); } - foreach ($requred_defines as $d) { + foreach ($required_defines as $d) { if (!defined($d)) { array_push($errors, "Required configuration file parameter $d is not defined in config.php. You might need to copy it from config.php-dist."); diff --git a/include/sanity_config.php b/include/sanity_config.php index 23e945f1e..49080e212 100644 --- a/include/sanity_config.php +++ b/include/sanity_config.php @@ -1,3 +1,3 @@ - +$required_defines = array( 'DB_TYPE', 'DB_HOST', 'DB_USER', 'DB_NAME', 'DB_PASS', 'MYSQL_CHARSET', 'SELF_URL_PATH', 'SINGLE_USER_MODE', 'SIMPLE_UPDATE_MODE', 'PHP_EXECUTABLE', 'LOCK_DIRECTORY', 'CACHE_DIR', 'ICONS_DIR', 'ICONS_URL', 'AUTH_AUTO_CREATE', 'AUTH_AUTO_LOGIN', 'FORCE_ARTICLE_PURGE', 'SPHINX_SERVER', 'SPHINX_INDEX', 'ENABLE_REGISTRATION', 'REG_NOTIFY_ADDRESS', 'REG_MAX_USERS', 'SESSION_COOKIE_LIFETIME', 'SMTP_FROM_NAME', 'SMTP_FROM_ADDRESS', 'DIGEST_SUBJECT', 'CHECK_FOR_UPDATES', 'ENABLE_GZIP_OUTPUT', 'PLUGINS', 'LOG_DESTINATION', 'CONFIG_VERSION'); ?> diff --git a/utils/regen_config_checks.sh b/utils/regen_config_checks.sh index e81d3673e..5ddbef091 100755 --- a/utils/regen_config_checks.sh +++ b/utils/regen_config_checks.sh @@ -8,7 +8,7 @@ echo -n "define('GENERATED_CONFIG_CHECK', " >> $DESTINATION grep CONFIG_VERSION config.php-dist | awk -F ' |)' '{ print $2 }' | xargs echo -n >> $DESTINATION echo ");" >> $DESTINATION -echo -n "\$requred_defines = array( " >> $DESTINATION +echo -n "\$required_defines = array( " >> $DESTINATION grep define\( config.php-dist | awk -F\' '{ print "*" $2 "*," }' | grep -v DB_PORT | xargs echo -n | sed -e s/,$// -e s/*/\'/g >> $DESTINATION