aboutsummaryrefslogtreecommitdiff
path: root/ratatoeskr
diff options
context:
space:
mode:
authorLaria Carolin Chabowski <laria@laria.me>2020-11-08 21:44:32 +0100
committerLaria Carolin Chabowski <laria@laria.me>2020-11-08 21:44:32 +0100
commitf142efd4f77c018b2a0a2530a4601920dc7fdcba (patch)
tree9ad670e7a91e2afd3ca49d643302d1c58a08ddf0 /ratatoeskr
parentb8903396199c3437cf980d93c94159a00899a10d (diff)
downloadratatoeskr-cms-f142efd4f77c018b2a0a2530a4601920dc7fdcba.tar.gz
ratatoeskr-cms-f142efd4f77c018b2a0a2530a4601920dc7fdcba.tar.bz2
ratatoeskr-cms-f142efd4f77c018b2a0a2530a4601920dc7fdcba.zip
Get rid of db.php and include config directly in entry points
Diffstat (limited to 'ratatoeskr')
-rw-r--r--ratatoeskr/backend.php1
-rw-r--r--ratatoeskr/frontend.php1
-rw-r--r--ratatoeskr/main.php2
-rw-r--r--ratatoeskr/setup/create_tables.php2
-rw-r--r--ratatoeskr/setup/setup.php1
-rw-r--r--ratatoeskr/sys/db.php15
-rw-r--r--ratatoeskr/sys/models.php1
-rw-r--r--ratatoeskr/sys/plugin_api.php1
8 files changed, 4 insertions, 20 deletions
diff --git a/ratatoeskr/backend.php b/ratatoeskr/backend.php
index 42ed21b..b965689 100644
--- a/ratatoeskr/backend.php
+++ b/ratatoeskr/backend.php
@@ -17,6 +17,7 @@ use r7r\cms\sys\Env;
use r7r\cms\sys\Esc;
use r7r\cms\sys\PasswordHash;
+require_once(dirname(__FILE__) . "/config.php");
require_once(dirname(__FILE__) . "/sys/models.php");
require_once(dirname(__FILE__) . "/sys/textprocessors.php");
require_once(dirname(__FILE__) . "/sys/plugin_api.php");
diff --git a/ratatoeskr/frontend.php b/ratatoeskr/frontend.php
index 5382a5d..09d04d4 100644
--- a/ratatoeskr/frontend.php
+++ b/ratatoeskr/frontend.php
@@ -14,6 +14,7 @@ use r7r\cms\sys\Env;
use r7r\cms\sys\Esc;
require_once(dirname(__FILE__) . "/languages.php");
+require_once(dirname(__FILE__) . "/config.php");
require_once(dirname(__FILE__) . "/sys/models.php");
require_once(dirname(__FILE__) . "/sys/textprocessors.php");
diff --git a/ratatoeskr/main.php b/ratatoeskr/main.php
index c88cc8b..bb8bdf9 100644
--- a/ratatoeskr/main.php
+++ b/ratatoeskr/main.php
@@ -17,7 +17,7 @@ if (!defined("CONFIG_FILLED_OUT") || !CONFIG_FILLED_OUT) {
}
require_once(dirname(__FILE__) . "/vendor/autoload.php");
-require_once(dirname(__FILE__) . "/sys/db.php");
+require_once(dirname(__FILE__) . "/config.php");
require_once(dirname(__FILE__) . "/sys/models.php");
require_once(dirname(__FILE__) . "/sys/init_ste.php");
require_once(dirname(__FILE__) . "/sys/translation.php");
diff --git a/ratatoeskr/setup/create_tables.php b/ratatoeskr/setup/create_tables.php
index e16647c..296091e 100644
--- a/ratatoeskr/setup/create_tables.php
+++ b/ratatoeskr/setup/create_tables.php
@@ -7,8 +7,6 @@ if (!defined("SETUP")) {
die();
}
-require_once(dirname(__FILE__) . "/../sys/db.php");
-
function create_mysql_tables(?Database $db = null): void
{
$sql_tables = <<<SQL
diff --git a/ratatoeskr/setup/setup.php b/ratatoeskr/setup/setup.php
index 7fc4bb7..c9f8398 100644
--- a/ratatoeskr/setup/setup.php
+++ b/ratatoeskr/setup/setup.php
@@ -8,7 +8,6 @@ define("SETUP", true);
require_once(dirname(__FILE__) . "/../vendor/autoload.php");
require_once(dirname(__FILE__) . "/../sys/init_ste.php");
require_once(dirname(__FILE__) . "/../sys/translation.php");
-require_once(dirname(__FILE__) . "/../sys/db.php");
require_once(dirname(__FILE__) . "/../languages.php");
require_once(dirname(__FILE__) . "/create_tables.php");
diff --git a/ratatoeskr/sys/db.php b/ratatoeskr/sys/db.php
deleted file mode 100644
index 4d1f493..0000000
--- a/ratatoeskr/sys/db.php
+++ /dev/null
@@ -1,15 +0,0 @@
-<?php
-/*
- * File: ratatoeskr/sys/db.php
- *
- * Helper functions for dealing with MySQL.
- *
- * License:
- * This file is part of Ratatöskr.
- * Ratatöskr is licensed unter the MIT / X11 License.
- * See "ratatoeskr/licenses/ratatoeskr" for more information.
- */
-
-if (!defined("SETUP")) {
- require_once(dirname(__FILE__) . "/../config.php");
-}
diff --git a/ratatoeskr/sys/models.php b/ratatoeskr/sys/models.php
index 3edb1d6..0716690 100644
--- a/ratatoeskr/sys/models.php
+++ b/ratatoeskr/sys/models.php
@@ -15,7 +15,6 @@ use r7r\cms\sys\models\KVStorage;
use r7r\cms\sys\Database;
use r7r\cms\sys\DbTransaction;
-require_once(dirname(__FILE__) . "/db.php");
require_once(dirname(__FILE__) . "/textprocessors.php");
require_once(dirname(__FILE__) . "/pluginpackage.php");
diff --git a/ratatoeskr/sys/plugin_api.php b/ratatoeskr/sys/plugin_api.php
index 082b605..1920032 100644
--- a/ratatoeskr/sys/plugin_api.php
+++ b/ratatoeskr/sys/plugin_api.php
@@ -13,6 +13,7 @@ use r7r\ste\STECore;
use r7r\cms\sys\Env;
use r7r\cms\sys\textprocessors\LegacyTextprocessor;
+require_once(dirname(__FILE__) . "/../config.php");
require_once(dirname(__FILE__) . "/models.php");
require_once(dirname(__FILE__) . "/textprocessors.php");
require_once(dirname(__FILE__) . "/../frontend.php");