summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--installer/helpers/installer.php21
-rw-r--r--installer/install.php2
2 files changed, 22 insertions, 1 deletions
diff --git a/installer/helpers/installer.php b/installer/helpers/installer.php
index 8bc73619..9214060d 100644
--- a/installer/helpers/installer.php
+++ b/installer/helpers/installer.php
@@ -250,7 +250,7 @@ class installer {
public static function check_database_authorization() {
$section = array("header" => "Database Configuration",
- "description" => "The Gallery3 requires the following database configuration.",
+ "description" => "Gallery3 requires the following database configuration.",
"msgs" => array());
$class = self::$config["type"];
$class = "Install_{$class}_Driver";
@@ -298,6 +298,25 @@ class installer {
return $db_config_valid;
}
+ public static function check_docroot_writable() {
+ $section = array("header" => "File System Access",
+ "description" => "The requires the following file system configuration.",
+ "msgs" => array());
+ if (is_writable(DOCROOT)) {
+ $writable = true;
+ $section["msgs"]["Permissions"] =
+ array("text" => "The installation directory '" . DOCROOT . "' is writable.",
+ "error" => false);
+ } else {
+ $writable = false;
+ $section["msgs"]["Permissions"] =
+ array("text" => "The current user is unable to write to '" . DOCROOT . "'.",
+ "error" => true);
+ }
+ self::$messages[] = $section;
+ return $writable;
+ }
+
private static function _render($view) {
if ($view == '')
return;
diff --git a/installer/install.php b/installer/install.php
index 694ae2a1..9ed20d6d 100644
--- a/installer/install.php
+++ b/installer/install.php
@@ -93,6 +93,8 @@ try {
die("Specifed User does not have sufficient authority to install Gallery3\n");
}
+$config_valid = installer::check_docroot_writable();
+
installer::display_requirements(!$config_valid);
if ($config_valid) {