Fix #6455 - support for split read/write database
authorAlan Knowles <alan@roojs.com>
Tue, 20 Oct 2020 08:05:20 +0000 (16:05 +0800)
committerAlan Knowles <alan@roojs.com>
Tue, 20 Oct 2020 08:05:20 +0000 (16:05 +0800)
HTML/FlexyFramework.php

index 94475d5..3d16bca 100755 (executable)
@@ -904,7 +904,7 @@ RewriteRule ^(.+)$ /web.hpasite/index.local.php [L,NC,E=URL:$1]
         }
         $res = $err->query("SELECT @@global.read_only as ro");
         $row = $res->fetchRow(DB_FETCHMODE_ASSOC);
-        if (!empty($row['ro'])) {
+        if (!empty($row['ro']) && empty($options['skip-read-only-check'])) {
             $this->fatalError("Database is configured to be read-only - please check database<BR> ".$err->toString());
         }
         // reset dont die!