From: garvinhicking <garvinhicking>
Date: Mon, 11 Dec 2006 08:37:10 +0000 (+0000)
Subject: Fix installer path detection by wagwag
X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=9093cda2084cce1008ba411b0201c82c5bb7926e;p=s9y.git

Fix installer path detection by wagwag
---

diff --git a/docs/NEWS b/docs/NEWS
index 8828749..ef73a73 100644
--- a/docs/NEWS
+++ b/docs/NEWS
@@ -3,6 +3,9 @@
 Version 1.2 ()
 ------------------------------------------------------------------------
 
+    * Improved Spartacus' detection of firewalling/network connection
+      issues (judebert)
+
     * Introduce '%lowertitle%' permalink attribute to use lowercase
       permalinks. (garvinhicking)
     
@@ -12,6 +15,9 @@ Version 1.2 ()
 Version 1.1 ()
 ------------------------------------------------------------------------
 
+    * Fix better installer warning messages when directories have no
+      write privileges and already exist. Thanks to wagwag!
+
     * Small bugfixes: Allow to use different login credentials than the
       current HTTP Basic-Auth, if used. Order categories by name in
       single entry view (garvinhicking)
diff --git a/include/admin/installer.inc.php b/include/admin/installer.inc.php
index 3da52df..fa0e7fd 100644
--- a/include/admin/installer.inc.php
+++ b/include/admin/installer.inc.php
@@ -360,7 +360,7 @@ if ( (int)$serendipity['GET']['step'] == 0 ) {
             if ( is_writable($basedir . PATH_SMARTY_COMPILE) ) {
                 echo serendipity_installerResultDiagnose(S9Y_I_SUCCESS, WRITABLE);
             } else {
-                if ($basewritable) {
+                if ($basewritable && !is_dir($basedir . PATH_SMARTY_COMPILE)) {
                     echo serendipity_installerResultDiagnose(S9Y_I_SUCCESS, WRITABLE);
                     #This directory will be created later in the process
                 } else {
@@ -376,7 +376,7 @@ if ( (int)$serendipity['GET']['step'] == 0 ) {
             if ( is_writable($basedir . 'archives/') ) {
                 echo serendipity_installerResultDiagnose(S9Y_I_SUCCESS, WRITABLE);
             } else {
-                if ($basewritable) {
+                if ($basewritable && !is_dir($basedir . 'archives/')) {
                     echo serendipity_installerResultDiagnose(S9Y_I_SUCCESS, WRITABLE);
                     #This directory will be created later in the process
                 } else {
@@ -393,7 +393,7 @@ if ( (int)$serendipity['GET']['step'] == 0 ) {
             if ( is_writable($basedir . 'uploads/') ) {
                 echo serendipity_installerResultDiagnose(S9Y_I_SUCCESS, WRITABLE);
             } else {
-                if ($basewritable) {
+                if ($basewritable && !is_dir($basedir . 'uploads/')) {
                     echo serendipity_installerResultDiagnose(S9Y_I_SUCCESS, WRITABLE);
                     #This directory will be created later in the process
                 } else {