diff --git a/core/database.class.php b/core/database.class.php index 0c07b248..f38af98a 100644 --- a/core/database.class.php +++ b/core/database.class.php @@ -147,6 +147,7 @@ class SQLite extends DBEngine { $data = str_replace("SCORE_NOW", "\"1970-01-01\"", $data); $data = str_replace("SCORE_STRNORM", "", $data); $data = str_replace("SCORE_ILIKE", "LIKE", $data); + return $data; } public function create_table_sql($name, $data) { diff --git a/core/util.inc.php b/core/util.inc.php index fbaa6c45..75e28ccd 100644 --- a/core/util.inc.php +++ b/core/util.inc.php @@ -757,7 +757,9 @@ function get_base_href() { } assert(!empty($ok_var)); $dir = dirname($ok_var); - if($dir === "/" || $dir === "\\") $dir = ""; + $dir = str_replace("\\", "/", $dir); + $dir = str_replace("//", "/", $dir); + $dir = rtrim($dir, "/"); return $dir; } diff --git a/ext/user/main.php b/ext/user/main.php index f13ef232..d0ac076f 100644 --- a/ext/user/main.php +++ b/ext/user/main.php @@ -372,7 +372,7 @@ class UserPage extends Extension { "INSERT INTO users (name, pass, joindate, email, class) VALUES (:username, :hash, now(), :email, :class)", array("username"=>$event->username, "hash"=>$hash, "email"=>$email, "class"=>$class)); $uid = $database->get_last_insert_id('users_id_seq'); - $user = $user::by_name($event->username); + $user = User::by_name($event->username); log_info("user", "Created User #$uid ({$event->username})"); } diff --git a/install.php b/install.php index d6873df5..f2984e9e 100644 --- a/install.php +++ b/install.php @@ -197,7 +197,7 @@ function ask_questions() { // {{{ }); function update_qs() { $(".dbconf").hide(); - var seldb = $("#database_type").val(); + var seldb = $("#database_type").val() || "none"; $("."+seldb).show(); } @@ -213,6 +213,10 @@ function ask_questions() { // {{{ For SQLite the database name will be a filename on disk, relative to where shimmie was installed.

+

+ Drivers can generally be downloaded with your OS package manager; + for Debian / Ubuntu you want php5-pgsql, php5-mysql, or php5-sqlite. +

EOD;