Skip to content

Commit

Permalink
Fix variable comparisons for the configuration
Browse files Browse the repository at this point in the history
Fix #21
  • Loading branch information
LeoColomb committed Mar 8, 2019
1 parent fa43d45 commit 71832c6
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 20 deletions.
10 changes: 5 additions & 5 deletions apache/config-docker.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
define( 'YOURLS_SITE', getenv('YOURLS_SITE') ?: 'http://your-own-domain-here.com' );

/** Server timezone GMT offset */
define( 'YOURLS_HOURS_OFFSET', getenv('YOURLS_HOURS_OFFSET') ?: 0 );
define( 'YOURLS_HOURS_OFFSET', filter_var(getenv('YOURLS_HOURS_OFFSET'), FILTER_VALIDATE_INT) ?: 0 );

/** YOURLS language
** Change this setting to use a translation file for your language, instead of the default English.
Expand All @@ -43,12 +43,12 @@
/** Allow multiple short URLs for a same long URL
** Set to true to have only one pair of shortURL/longURL (default YOURLS behavior)
** Set to false to allow multiple short URLs pointing to the same long URL (bit.ly behavior) */
define( 'YOURLS_UNIQUE_URLS', getenv('YOURLS_UNIQUE_URLS') ?: true );
define( 'YOURLS_UNIQUE_URLS', filter_var(getenv('YOURLS_UNIQUE_URLS'), FILTER_VALIDATE_BOOLEAN) ?: true );

/** Private means the Admin area will be protected with login/pass as defined below.
** Set to false for public usage (eg on a restricted intranet or for test setups)
** Read http://yourls.org/privatepublic for more details if you're unsure */
define( 'YOURLS_PRIVATE', getenv('YOURLS_PRIVATE') ?: true );
define( 'YOURLS_PRIVATE', filter_var(getenv('YOURLS_PRIVATE'), FILTER_VALIDATE_BOOLEAN) ?: true );

/** A random secret hash used to encrypt cookies. You don't have to remember it, make it long and complicated. Hint: copy from http://yourls.org/cookie **/
define( 'YOURLS_COOKIEKEY', getenv('YOURLS_COOKIEKEY') ?: 'modify this text with something random' );
Expand All @@ -62,14 +62,14 @@

/** Debug mode to output some internal information
** Default is false for live site. Enable when coding or before submitting a new issue */
define( 'YOURLS_DEBUG', getenv('YOURLS_DEBUG') ?: false );
define( 'YOURLS_DEBUG', filter_var(getenv('YOURLS_DEBUG'), FILTER_VALIDATE_BOOLEAN) ?: false );

/*
** URL Shortening settings
*/

/** URL shortening method: 36 or 62 */
define( 'YOURLS_URL_CONVERT', getenv('YOURLS_URL_CONVERT') ?: 36 );
define( 'YOURLS_URL_CONVERT', filter_var(getenv('YOURLS_URL_CONVERT'), FILTER_VALIDATE_INT) ?: 36 );
/*
* 36: generates all lowercase keywords (ie: 13jkm)
* 62: generates mixed case keywords (ie: 13jKm or 13JKm)
Expand Down
10 changes: 5 additions & 5 deletions config-docker.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
define( 'YOURLS_SITE', getenv('YOURLS_SITE') ?: 'http://your-own-domain-here.com' );

/** Server timezone GMT offset */
define( 'YOURLS_HOURS_OFFSET', getenv('YOURLS_HOURS_OFFSET') ?: 0 );
define( 'YOURLS_HOURS_OFFSET', filter_var(getenv('YOURLS_HOURS_OFFSET'), FILTER_VALIDATE_INT) ?: 0 );

/** YOURLS language
** Change this setting to use a translation file for your language, instead of the default English.
Expand All @@ -43,12 +43,12 @@
/** Allow multiple short URLs for a same long URL
** Set to true to have only one pair of shortURL/longURL (default YOURLS behavior)
** Set to false to allow multiple short URLs pointing to the same long URL (bit.ly behavior) */
define( 'YOURLS_UNIQUE_URLS', getenv('YOURLS_UNIQUE_URLS') ?: true );
define( 'YOURLS_UNIQUE_URLS', filter_var(getenv('YOURLS_UNIQUE_URLS'), FILTER_VALIDATE_BOOLEAN) ?: true );

/** Private means the Admin area will be protected with login/pass as defined below.
** Set to false for public usage (eg on a restricted intranet or for test setups)
** Read http://yourls.org/privatepublic for more details if you're unsure */
define( 'YOURLS_PRIVATE', getenv('YOURLS_PRIVATE') ?: true );
define( 'YOURLS_PRIVATE', filter_var(getenv('YOURLS_PRIVATE'), FILTER_VALIDATE_BOOLEAN) ?: true );

/** A random secret hash used to encrypt cookies. You don't have to remember it, make it long and complicated. Hint: copy from http://yourls.org/cookie **/
define( 'YOURLS_COOKIEKEY', getenv('YOURLS_COOKIEKEY') ?: 'modify this text with something random' );
Expand All @@ -62,14 +62,14 @@

/** Debug mode to output some internal information
** Default is false for live site. Enable when coding or before submitting a new issue */
define( 'YOURLS_DEBUG', getenv('YOURLS_DEBUG') ?: false );
define( 'YOURLS_DEBUG', filter_var(getenv('YOURLS_DEBUG'), FILTER_VALIDATE_BOOLEAN) ?: false );

/*
** URL Shortening settings
*/

/** URL shortening method: 36 or 62 */
define( 'YOURLS_URL_CONVERT', getenv('YOURLS_URL_CONVERT') ?: 36 );
define( 'YOURLS_URL_CONVERT', filter_var(getenv('YOURLS_URL_CONVERT'), FILTER_VALIDATE_INT) ?: 36 );
/*
* 36: generates all lowercase keywords (ie: 13jkm)
* 62: generates mixed case keywords (ie: 13jKm or 13JKm)
Expand Down
10 changes: 5 additions & 5 deletions fpm-alpine/config-docker.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
define( 'YOURLS_SITE', getenv('YOURLS_SITE') ?: 'http://your-own-domain-here.com' );

/** Server timezone GMT offset */
define( 'YOURLS_HOURS_OFFSET', getenv('YOURLS_HOURS_OFFSET') ?: 0 );
define( 'YOURLS_HOURS_OFFSET', filter_var(getenv('YOURLS_HOURS_OFFSET'), FILTER_VALIDATE_INT) ?: 0 );

/** YOURLS language
** Change this setting to use a translation file for your language, instead of the default English.
Expand All @@ -43,12 +43,12 @@
/** Allow multiple short URLs for a same long URL
** Set to true to have only one pair of shortURL/longURL (default YOURLS behavior)
** Set to false to allow multiple short URLs pointing to the same long URL (bit.ly behavior) */
define( 'YOURLS_UNIQUE_URLS', getenv('YOURLS_UNIQUE_URLS') ?: true );
define( 'YOURLS_UNIQUE_URLS', filter_var(getenv('YOURLS_UNIQUE_URLS'), FILTER_VALIDATE_BOOLEAN) ?: true );

/** Private means the Admin area will be protected with login/pass as defined below.
** Set to false for public usage (eg on a restricted intranet or for test setups)
** Read http://yourls.org/privatepublic for more details if you're unsure */
define( 'YOURLS_PRIVATE', getenv('YOURLS_PRIVATE') ?: true );
define( 'YOURLS_PRIVATE', filter_var(getenv('YOURLS_PRIVATE'), FILTER_VALIDATE_BOOLEAN) ?: true );

/** A random secret hash used to encrypt cookies. You don't have to remember it, make it long and complicated. Hint: copy from http://yourls.org/cookie **/
define( 'YOURLS_COOKIEKEY', getenv('YOURLS_COOKIEKEY') ?: 'modify this text with something random' );
Expand All @@ -62,14 +62,14 @@

/** Debug mode to output some internal information
** Default is false for live site. Enable when coding or before submitting a new issue */
define( 'YOURLS_DEBUG', getenv('YOURLS_DEBUG') ?: false );
define( 'YOURLS_DEBUG', filter_var(getenv('YOURLS_DEBUG'), FILTER_VALIDATE_BOOLEAN) ?: false );

/*
** URL Shortening settings
*/

/** URL shortening method: 36 or 62 */
define( 'YOURLS_URL_CONVERT', getenv('YOURLS_URL_CONVERT') ?: 36 );
define( 'YOURLS_URL_CONVERT', filter_var(getenv('YOURLS_URL_CONVERT'), FILTER_VALIDATE_INT) ?: 36 );
/*
* 36: generates all lowercase keywords (ie: 13jkm)
* 62: generates mixed case keywords (ie: 13jKm or 13JKm)
Expand Down
10 changes: 5 additions & 5 deletions fpm/config-docker.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
define( 'YOURLS_SITE', getenv('YOURLS_SITE') ?: 'http://your-own-domain-here.com' );

/** Server timezone GMT offset */
define( 'YOURLS_HOURS_OFFSET', getenv('YOURLS_HOURS_OFFSET') ?: 0 );
define( 'YOURLS_HOURS_OFFSET', filter_var(getenv('YOURLS_HOURS_OFFSET'), FILTER_VALIDATE_INT) ?: 0 );

/** YOURLS language
** Change this setting to use a translation file for your language, instead of the default English.
Expand All @@ -43,12 +43,12 @@
/** Allow multiple short URLs for a same long URL
** Set to true to have only one pair of shortURL/longURL (default YOURLS behavior)
** Set to false to allow multiple short URLs pointing to the same long URL (bit.ly behavior) */
define( 'YOURLS_UNIQUE_URLS', getenv('YOURLS_UNIQUE_URLS') ?: true );
define( 'YOURLS_UNIQUE_URLS', filter_var(getenv('YOURLS_UNIQUE_URLS'), FILTER_VALIDATE_BOOLEAN) ?: true );

/** Private means the Admin area will be protected with login/pass as defined below.
** Set to false for public usage (eg on a restricted intranet or for test setups)
** Read http://yourls.org/privatepublic for more details if you're unsure */
define( 'YOURLS_PRIVATE', getenv('YOURLS_PRIVATE') ?: true );
define( 'YOURLS_PRIVATE', filter_var(getenv('YOURLS_PRIVATE'), FILTER_VALIDATE_BOOLEAN) ?: true );

/** A random secret hash used to encrypt cookies. You don't have to remember it, make it long and complicated. Hint: copy from http://yourls.org/cookie **/
define( 'YOURLS_COOKIEKEY', getenv('YOURLS_COOKIEKEY') ?: 'modify this text with something random' );
Expand All @@ -62,14 +62,14 @@

/** Debug mode to output some internal information
** Default is false for live site. Enable when coding or before submitting a new issue */
define( 'YOURLS_DEBUG', getenv('YOURLS_DEBUG') ?: false );
define( 'YOURLS_DEBUG', filter_var(getenv('YOURLS_DEBUG'), FILTER_VALIDATE_BOOLEAN) ?: false );

/*
** URL Shortening settings
*/

/** URL shortening method: 36 or 62 */
define( 'YOURLS_URL_CONVERT', getenv('YOURLS_URL_CONVERT') ?: 36 );
define( 'YOURLS_URL_CONVERT', filter_var(getenv('YOURLS_URL_CONVERT'), FILTER_VALIDATE_INT) ?: 36 );
/*
* 36: generates all lowercase keywords (ie: 13jkm)
* 62: generates mixed case keywords (ie: 13jKm or 13JKm)
Expand Down

0 comments on commit 71832c6

Please sign in to comment.