]> git.mjollnir.org Git - s9y.git/commitdiff
Finally add support for detecting the "more secure" method of setting up s9y in upgra...
authorjtate <jtate>
Tue, 31 Oct 2006 14:21:58 +0000 (14:21 +0000)
committerjtate <jtate>
Tue, 31 Oct 2006 14:21:58 +0000 (14:21 +0000)
include/admin/upgrader.inc.php

index 7f50dbd0508050ec7c21b949eec23625b0041fcb..c5010fabfae34e96172cbaef7dfa9ec8dad5c3dc 100644 (file)
@@ -273,8 +273,26 @@ if (($showAbort && $serendipity['GET']['action'] == 'ignore') || $serendipity['G
             if ( is_writable($basedir) ) {
                 echo serendipity_upgraderResultDiagnose(S9Y_U_SUCCESS, WRITABLE);
             } else {
-                echo serendipity_upgraderResultDiagnose(S9Y_U_ERROR, NOT_WRITABLE);
-                $showWritableNote = true;
+                $showWritableNote = false;
+                #Figure out if we're set up a little more securely
+                #PATH_SMARTY_COMPILE/
+                #uploads/
+                #archives/
+                #.htaccess
+                #serendipity_config_local.inc.php
+                # For completeness we could test to make sure the directories
+                # really are directories, but that's probably overkill
+                foreach (array('archives/', PATH_SMARTY_COMPILE . '/', 'uploads/', '.htaccess', 'serendipity_config_local.inc.php') as $path) {
+                    if (!is_writeable($basedir . $path)) {
+                        echo serendipity_upgraderResultDiagnose(S9Y_U_ERROR, NOT_WRITABLE);
+                        $showWritableNote = true;
+                        break;
+                    }
+                }
+
+                if (!$showWritableNote) {
+                    echo serendipity_upgraderResultDiagnose(S9Y_U_SUCCESS, WRITABLE);
+                }
             }
      ?></td>
     </tr>