From 8c01f072c2f76e481d08b6550a7469305c431773 Mon Sep 17 00:00:00 2001 From: Martijn de Boer Date: Sun, 10 Nov 2024 14:44:47 +0100 Subject: [PATCH] READONLY check --- lib/Database.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Database.php b/lib/Database.php index de5342d..4bacf5f 100644 --- a/lib/Database.php +++ b/lib/Database.php @@ -3,14 +3,14 @@ class Database { public static $handle = null; - public function __construct($createDatabase = false, bool $readonly = false) + public function __construct($createDatabase = false) { if (self::$handle === null) { self::$handle = new SQLite3(SQLITE_DB); self::$handle->enableExceptions(true); self::$handle->busyTimeout(60000); - if ($readonly === true) { + if (!defined("READONLY")) { self::$handle->exec("PRAGMA read_uncommitted = true"); return; }