From e0bc35b975d4af86f724f232430ccebebd15d995 Mon Sep 17 00:00:00 2001 From: Diogo Cordeiro Date: Sun, 14 Jul 2019 21:02:38 +0100 Subject: [PATCH] [CORE] Avatars are in PUBLICDIR in v2 Fixed a bug in the Installer --- lib/default.php | 2 +- lib/installer.php | 5 +++++ public/install.php | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/default.php b/lib/default.php index c68c31c7c5..dd038236b2 100644 --- a/lib/default.php +++ b/lib/default.php @@ -146,7 +146,7 @@ $default = array('jpegquality' => 85), 'avatar' => array('server' => null, - 'dir' => INSTALLDIR . '/avatar/', + 'dir' => PUBLICDIR . '/avatar/', 'path' => $_path . '/avatar/', 'ssl' => null, 'maxsize' => 300), diff --git a/lib/installer.php b/lib/installer.php index acbea35ee5..dac6f53562 100644 --- a/lib/installer.php +++ b/lib/installer.php @@ -164,6 +164,11 @@ abstract class Installer unset($default); foreach ($fileSubdirs as $fileFullPath) { if (!file_exists($fileFullPath)) { + $this->warning( + sprintf('GNU social was unable to create a directory on this path: %s', $fileFullPath), + 'Either create that directory with the right permissions so that GNU social can use it or '. + 'set the necessary permissions and it will be created.' + ); $pass = $pass && mkdir($fileFullPath); } elseif (!is_dir($fileFullPath)) { $this->warning( diff --git a/public/install.php b/public/install.php index b1b04a4300..7b01bf0583 100644 --- a/public/install.php +++ b/public/install.php @@ -37,6 +37,7 @@ */ define('INSTALLDIR', dirname(__DIR__)); +define('PUBLICDIR', INSTALLDIR . DIRECTORY_SEPARATOR . 'public'); require INSTALLDIR . '/lib/installer.php'; -- 2.39.5