mirror of
https://github.com/kleeja-official/kleeja.git
synced 2025-12-15 20:49:41 +01:00
fixes sqlite3 error
This commit is contained in:
@@ -46,7 +46,14 @@ class KleejaDatabase
|
||||
{
|
||||
try
|
||||
{
|
||||
$this->connect_id = new SQLite3(PATH . $db_name, SQLITE3_OPEN_READWRITE);
|
||||
if (class_exists('SQLite3'))
|
||||
{
|
||||
$this->connect_id = new SQLite3(PATH . $db_name, SQLITE3_OPEN_READWRITE);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->error_msg('SQLite3 extension is not installed in your server!');
|
||||
}
|
||||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
|
||||
@@ -133,6 +133,7 @@ case 'c':
|
||||
|
||||
$no_config = ! file_exists(PATH . 'config.php') || ig('force') ? false : true;
|
||||
$writeable_path = is_writable(PATH) ? true : false;
|
||||
$sqlite3_exists = class_exists('SQLite3');
|
||||
|
||||
echo gettpl('configs.html');
|
||||
|
||||
|
||||
@@ -10,7 +10,9 @@
|
||||
<td class="TdInput">
|
||||
<select name="db_type" id="db_type" style="text-align:left;direction:ltr">
|
||||
<option value="mysql" selected>{{echo $lang['DB_TYPE_MYSQL']}}</option>
|
||||
{{if ($sqlite3_exists):}}
|
||||
<option value="sqlite">{{echo $lang['DB_TYPE_SQLITE']}}</option>
|
||||
{{endif;}}
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user