more sqlite niceness
This commit is contained in:
parent
f3a3d50f95
commit
4e4f0be4e5
3 changed files with 8 additions and 2 deletions
|
@ -2,6 +2,10 @@
|
|||
DirectoryIndex index.php5 index.php
|
||||
</IfModule>
|
||||
|
||||
<FilesMatch "\.(sqlite|sdb|s3db|db)$">
|
||||
Deny from all
|
||||
</FilesMatch>
|
||||
|
||||
<IfModule mod_rewrite.c>
|
||||
RewriteEngine on
|
||||
|
||||
|
|
|
@ -113,7 +113,7 @@ class SQLite extends DBEngine {
|
|||
$extras = "";
|
||||
foreach(explode(",", $data) as $bit) {
|
||||
$matches = array();
|
||||
if(preg_match("/INDEX\s+\((.*)\)/", $bit, $matches)) {
|
||||
if(preg_match("/INDEX\s*\((.*)\)/", $bit, $matches)) {
|
||||
$col = $matches[1];
|
||||
$extras .= "CREATE INDEX {$name}_{$col} on $name($col);";
|
||||
}
|
||||
|
|
|
@ -66,7 +66,9 @@ try {
|
|||
|
||||
|
||||
// for databases which support transactions
|
||||
$database->db->CommitTrans(true);
|
||||
if($database->engine->name != "sqlite") {
|
||||
$database->db->CommitTrans(true);
|
||||
}
|
||||
}
|
||||
catch(Exception $e) {
|
||||
$version = VERSION;
|
||||
|
|
Reference in a new issue