diff options
author | Bharat Mediratta <bharat@menalto.com> | 2009-01-18 23:55:35 +0000 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2009-01-18 23:55:35 +0000 |
commit | 248ce3ebce0d5a38271b7b8a767a7ee12bec4329 (patch) | |
tree | 8634182f2abb051339182a09baafc4c7f8cd1f56 | |
parent | 1cc7b3f4be8d13a24218be1b05454f43cfc0d444 (diff) |
Remove access rights check; fix a bug in determining the path to var/database.php
-rw-r--r-- | installer/helpers/installer.php | 25 | ||||
-rw-r--r-- | installer/libraries/Install_Mysqli_Driver.php | 1 |
2 files changed, 5 insertions, 21 deletions
diff --git a/installer/helpers/installer.php b/installer/helpers/installer.php index 871308d4..ea01f799 100644 --- a/installer/helpers/installer.php +++ b/installer/helpers/installer.php @@ -25,7 +25,7 @@ class installer { static function command_line() { // remove the script name from the arguments - array_shift($_SERVER["argv"]); + array_shift($_SERVER["argv"]); //$_SERVER["HTTP_USER_AGENT"] = phpversion(); //date_default_timezone_set('America/Los_Angeles'); @@ -61,7 +61,7 @@ class installer { print self::install(); } } - + static function environment_check() { $failed = false; $section = array("header" => "Environment Test", @@ -323,24 +323,6 @@ class installer { "error" => true); } - $missing = array(); - $rights = self::$database->get_access_rights($dbname); - - foreach (array("create", "delete", "insert", "select", "update", "alter") as $privilege) { - if (empty($rights[$privilege])) { - $missing[] = $privilege; - } - } - if (!empty($missing)) { - $db_config_valid = false; - $section["msgs"]["Privileges"] = - array("text" => "The following required privileges have not been granted: " . - implode(", ", $missing), "error" => true); - } else { - $section["msgs"]["Privileges"] = array("text" => "Required privileges defined.", - "error" => false); - } - self::$messages[] = $section; return $db_config_valid; @@ -372,7 +354,7 @@ class installer { try { include(DOCROOT . "installer/data/init_var.php"); - $db_config_file = realpath("var/database.php"); + $db_config_file = realpath("var") . "/database.php"; $data = array("type" => strtolower(self::$config["type"]), "user" => self::$config["user"], "password" => self::$config["password"], @@ -381,6 +363,7 @@ class installer { "prefix" => self::$config["prefix"]); $config = self::_render("installer/views/database.php", $data); + printf("<pre>%s</pre>",print_r($db_config_file,1));flush(); if (file_put_contents($db_config_file, $config) !== false) { print "'var/database.php' created\n"; } else { diff --git a/installer/libraries/Install_Mysqli_Driver.php b/installer/libraries/Install_Mysqli_Driver.php index 257d8ea6..9eaaf1fc 100644 --- a/installer/libraries/Install_Mysqli_Driver.php +++ b/installer/libraries/Install_Mysqli_Driver.php @@ -56,6 +56,7 @@ class Install_Mysqli_Driver { " FROM `information_schema`.`schema_privileges`" . " WHERE `GRANTEE` = '\\'{$this->_user}\\'@\\'{$this->_server}\\''" . " AND `TABLE_SCHEMA` = '$dbname';"; + print $select; $privileges = $this->_mysqli->query($select); $permissions = array(); if ($privileges) { |