diff options
author | Craig Andrews <candrews@integralblue.com> | 2009-07-21 13:59:34 -0400 |
---|---|---|
committer | Craig Andrews <candrews@integralblue.com> | 2009-07-21 13:59:34 -0400 |
commit | 22466530eff42fa6b1e1ea2380227ad5f4b22923 (patch) | |
tree | 47f20205bdb1c889ab22315cce507e8a4b0391b5 /install.php | |
parent | a9613e999f0c55830269daaf0f76fddc6b26d329 (diff) |
Fixed: The installer checks if the avatar and background directories are writable, but fails to check the file directory used for attachments.
Thanks brion
http://laconi.ca/trac/ticket/1703
Diffstat (limited to 'install.php')
-rw-r--r-- | install.php | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/install.php b/install.php index bae296a35..1d3a531c5 100644 --- a/install.php +++ b/install.php @@ -70,17 +70,16 @@ function checkPrereqs() $pass = false; } - if (!is_writable(INSTALLDIR.'/avatar/')) { - ?><p class="error">Cannot write avatar directory: <code><?php echo INSTALLDIR; ?>/avatar/</code></p> - <p>On your server, try this command: <code>chmod a+w <?php echo INSTALLDIR; ?>/avatar/</code></p> - <? - $pass = false; - } - if (!is_writable(INSTALLDIR.'/background/')) { - ?><p class="error">Cannot write background directory: <code><?php echo INSTALLDIR; ?>/background/</code></p> - <p>On your server, try this command: <code>chmod a+w <?php echo INSTALLDIR; ?>/background/</code></p> - <? - $pass = false; + // Check the subdirs used for file uploads + $fileSubdirs = array('avatar', 'background', 'file'); + foreach ($fileSubdirs as $fileSubdir) { + $fileFullPath = INSTALLDIR."/$fileSubdir/"; + if (!is_writable($fileFullPath)) { + ?><p class="error">Cannot write <?php echo $fileSubdir; ?> directory: <code><?php echo $fileFullPath; ?></code></p> + <p>On your server, try this command: <code>chmod a+w <?php echo $fileFullPath; ?></code></p> + <? + $pass = false; + } } return $pass; |