Skip to content

Commit

Permalink
refs #1575 : added - TEXTCUBE_DATA for sqlite file.
Browse files Browse the repository at this point in the history
 -
  • Loading branch information
inureyes committed Apr 14, 2015
1 parent 6f33d7f commit 1f05f5a
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions framework/data/SQLite3/Adapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,13 @@ public static function bind($database) {
$database['server'] = $port[0];
$database['port'] = $port[1];
}
if(!file_exists(__TEXTCUBE_CACHE_DIR__)) {
@mkdir(__TEXTCUBE_CACHE_DIR__);
if(!defined('__TEXTCUBE_DATA_DIR__')){
define('__TEXTCUBE_DATA_DIR__',__TEXTCUBE_CACHE_DIR__);
}
self::$db = new SQLite3(__TEXTCUBE_CACHE_DIR__.'/'.$database['database'].'.db',SQLITE3_OPEN_READWRITE | SQLITE3_OPEN_CREATE);
if(!file_exists(__TEXTCUBE_DATA_DIR__)) {
@mkdir(__TEXTCUBE_DATA_DIR__);
}
self::$db = new SQLite3(__TEXTCUBE_DATA_DIR__.'/'.$database['database'].'.db',SQLITE3_OPEN_READWRITE | SQLITE3_OPEN_CREATE);

if(!self::$db) return false;

Expand Down

0 comments on commit 1f05f5a

Please sign in to comment.