Skip to content

Commit

Permalink
silent rollout of split data dir
Browse files Browse the repository at this point in the history
  • Loading branch information
geek-at committed Nov 3, 2023
1 parent 2388f68 commit 819c253
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion docker/rootfs/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ _buildConfig() {
echo "define('FTP_BASEDIR', '${FTP_BASEDIR:-}');"
echo "define('ENCRYPTION_KEY', '${ENCRYPTION_KEY:-}');"
echo "define('FFMPEG_BINARY', '${FFMPEG_BINARY:-/usr/bin/ffmpeg}');"
echo "define('ALWAYS_WEBP', ${ALWAYS_WEBP:-false});"
echo "define('ALWAYS_WEBP', ${ALWAYS_WEBP:-false});"
echo "define('ALLOWED_DOMAINS', ${ALLOWED_DOMAINS:-});"
echo "define('SPLIT_DATA_DIR', ${SPLIT_DATA_DIR:-false});"
}


Expand Down
2 changes: 1 addition & 1 deletion inc/core.php
Original file line number Diff line number Diff line change
Expand Up @@ -968,7 +968,7 @@ function is_public_ipv6($ip=NULL)

function getDataDir()
{
if(defined('SPLITDATA') && SPLITDATA===true && getDomain())
if(defined('SPLIT_DATA_DIR') && SPLIT_DATA_DIR===true && getDomain() && in_array(getDomain(),explode(',',ALLOWED_DOMAINS)))
{
$dir = ROOT.DS.'data'.DS.getDomain();
if(!is_dir($dir)) mkdir($dir);
Expand Down

0 comments on commit 819c253

Please sign in to comment.