Merge branch 'master' of https://github.com/shish/shimmie2
This commit is contained in:
commit
4366d3e3e9
4 changed files with 10 additions and 3 deletions
|
@ -147,6 +147,7 @@ class SQLite extends DBEngine {
|
||||||
$data = str_replace("SCORE_NOW", "\"1970-01-01\"", $data);
|
$data = str_replace("SCORE_NOW", "\"1970-01-01\"", $data);
|
||||||
$data = str_replace("SCORE_STRNORM", "", $data);
|
$data = str_replace("SCORE_STRNORM", "", $data);
|
||||||
$data = str_replace("SCORE_ILIKE", "LIKE", $data);
|
$data = str_replace("SCORE_ILIKE", "LIKE", $data);
|
||||||
|
return $data;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function create_table_sql($name, $data) {
|
public function create_table_sql($name, $data) {
|
||||||
|
|
|
@ -757,7 +757,9 @@ function get_base_href() {
|
||||||
}
|
}
|
||||||
assert(!empty($ok_var));
|
assert(!empty($ok_var));
|
||||||
$dir = dirname($ok_var);
|
$dir = dirname($ok_var);
|
||||||
if($dir === "/" || $dir === "\\") $dir = "";
|
$dir = str_replace("\\", "/", $dir);
|
||||||
|
$dir = str_replace("//", "/", $dir);
|
||||||
|
$dir = rtrim($dir, "/");
|
||||||
return $dir;
|
return $dir;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -372,7 +372,7 @@ class UserPage extends Extension {
|
||||||
"INSERT INTO users (name, pass, joindate, email, class) VALUES (:username, :hash, now(), :email, :class)",
|
"INSERT INTO users (name, pass, joindate, email, class) VALUES (:username, :hash, now(), :email, :class)",
|
||||||
array("username"=>$event->username, "hash"=>$hash, "email"=>$email, "class"=>$class));
|
array("username"=>$event->username, "hash"=>$hash, "email"=>$email, "class"=>$class));
|
||||||
$uid = $database->get_last_insert_id('users_id_seq');
|
$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})");
|
log_info("user", "Created User #$uid ({$event->username})");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -197,7 +197,7 @@ function ask_questions() { // {{{
|
||||||
});
|
});
|
||||||
function update_qs() {
|
function update_qs() {
|
||||||
$(".dbconf").hide();
|
$(".dbconf").hide();
|
||||||
var seldb = $("#database_type").val();
|
var seldb = $("#database_type").val() || "none";
|
||||||
$("."+seldb).show();
|
$("."+seldb).show();
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -213,6 +213,10 @@ function ask_questions() { // {{{
|
||||||
For SQLite the database name will be a filename on disk, relative to
|
For SQLite the database name will be a filename on disk, relative to
|
||||||
where shimmie was installed.
|
where shimmie was installed.
|
||||||
</p>
|
</p>
|
||||||
|
<p class="dbconf none">
|
||||||
|
Drivers can generally be downloaded with your OS package manager;
|
||||||
|
for Debian / Ubuntu you want php5-pgsql, php5-mysql, or php5-sqlite.
|
||||||
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
EOD;
|
EOD;
|
||||||
|
|
Reference in a new issue