]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
[CORE] Avatars are in PUBLICDIR in v2
authorDiogo Cordeiro <diogo@fc.up.pt>
Sun, 14 Jul 2019 20:02:38 +0000 (21:02 +0100)
committerDiogo Cordeiro <diogo@fc.up.pt>
Sat, 3 Aug 2019 16:47:28 +0000 (17:47 +0100)
Fixed a bug in the Installer

lib/default.php
lib/installer.php
public/install.php

index c68c31c7c597905cf2cd199aee40ee33a9903af2..dd038236b2b94d71ec3db409b4740d556f7261a5 100644 (file)
@@ -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),
index acbea35ee5131fbe3121ef76fb8e299bf2d4ff29..dac6f53562e582ddebae3062b44b4f52e470d392 100644 (file)
@@ -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(
index b1b04a43007362cdee2a88221658e4bf23143770..7b01bf0583062ea972c14abb5cd7c8159912bce1 100644 (file)
@@ -37,6 +37,7 @@
  */
 
 define('INSTALLDIR', dirname(__DIR__));
+define('PUBLICDIR', INSTALLDIR . DIRECTORY_SEPARATOR . 'public');
 
 require INSTALLDIR . '/lib/installer.php';