From fdd3d63098f6411b2bec99fbca96543866374de7 Mon Sep 17 00:00:00 2001
From: nee %s
chmod a+w %s
', INSTALLDIR));
$pass = false;
}
// Check the subdirs used for file uploads
- $fileSubdirs = array('avatar', 'file');
+ // TODO get another flag for this --skipFileSubdirCreation
+ if (!$this->skipConfig) {
+ $fileSubdirs = array($this->avatarDir, $this->fileDir);
foreach ($fileSubdirs as $fileSubdir) {
$fileFullPath = INSTALLDIR."/$fileSubdir";
if (!file_exists($fileFullPath)) {
@@ -148,7 +150,7 @@ abstract class Installer
$pass = false;
}
}
-
+ }
return $pass;
}
@@ -580,10 +582,10 @@ abstract class Installer
return false;
}
+ if (!$this->skipConfig) {
// Make sure we can write to the file twice
$oldUmask = umask(000);
- if (!$this->skipConfig) {
$this->updateStatus("Writing config file...");
$res = $this->writeConf();
@@ -616,12 +618,12 @@ abstract class Installer
$this->updateStatus("Can't write to config file.", true);
return false;
}
- }
// Restore original umask
umask($oldUmask);
// Set permissions back to something decent
chmod(INSTALLDIR.'/config.php', 0644);
+ }
$scheme = $this->ssl === 'always' ? 'https' : 'http';
$link = "{$scheme}://{$this->server}/{$this->path}";
diff --git a/scripts/install_cli.php b/scripts/install_cli.php
index 815418aaab..da5f0f4b0c 100755
--- a/scripts/install_cli.php
+++ b/scripts/install_cli.php
@@ -47,10 +47,10 @@ class CliInstaller extends Installer
*/
function main()
{
+ if ($this->prepare()) {
if (!$this->checkPrereqs()) {
return false;
}
- if ($this->prepare()) {
return $this->handle();
} else {
$this->showHelp();
From 0b9a2fdf3ad19942e85a66b94d08501ce9c927dd Mon Sep 17 00:00:00 2001
From: nee