summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2021-02-22 22:39:20 +0300
committerAndrew Dolgov <[email protected]>2021-02-22 22:39:20 +0300
commit12bcf826e4f2672afbda85264a970fb4735d97f1 (patch)
treebeaaeb8942d423a183f9d1b39953dd76bf619a81
parent211f699aa0c4211e4ee8a02446d51b9811d0c28c (diff)
don't include config.php everywhere
-rw-r--r--api/index.php2
-rw-r--r--backend.php1
-rw-r--r--include/functions.php1
-rw-r--r--include/sessions.php1
-rw-r--r--index.php7
-rw-r--r--prefs.php7
-rw-r--r--public.php1
-rwxr-xr-xupdate.php1
-rwxr-xr-xupdate_daemon2.php1
9 files changed, 0 insertions, 22 deletions
diff --git a/api/index.php b/api/index.php
index 6b0071141..333c64830 100644
--- a/api/index.php
+++ b/api/index.php
@@ -1,8 +1,6 @@
<?php
error_reporting(E_ERROR | E_PARSE);
- require_once "../config.php";
-
set_include_path(__DIR__ . PATH_SEPARATOR .
dirname(__DIR__) . PATH_SEPARATOR .
dirname(__DIR__) . "/include" . PATH_SEPARATOR .
diff --git a/backend.php b/backend.php
index 2237c06b3..32eb3f3b9 100644
--- a/backend.php
+++ b/backend.php
@@ -26,7 +26,6 @@
require_once "autoload.php";
require_once "sessions.php";
require_once "functions.php";
- require_once "config.php";
require_once "db-prefs.php";
$op = (string)clean($op);
diff --git a/include/functions.php b/include/functions.php
index 59c824e43..d42306147 100644
--- a/include/functions.php
+++ b/include/functions.php
@@ -1,5 +1,4 @@
<?php
- define('EXPECTED_CONFIG_VERSION', 26);
define('SCHEMA_VERSION', 140);
define('LABEL_BASE_INDEX', -1024);
diff --git a/include/sessions.php b/include/sessions.php
index d2fbc6a41..8b7de0ac7 100644
--- a/include/sessions.php
+++ b/include/sessions.php
@@ -3,7 +3,6 @@
// Original from http://www.daniweb.com/code/snippet43.html
- require_once "config.php";
require_once "autoload.php";
require_once "functions.php";
require_once "errorhandler.php";
diff --git a/index.php b/index.php
index 73fccc3ea..d640c2db9 100644
--- a/index.php
+++ b/index.php
@@ -1,11 +1,5 @@
<?php
- if (!file_exists("config.php")) {
- print "<b>Fatal Error</b>: You forgot to copy
- <b>config.php-dist</b> to <b>config.php</b> and edit it.\n";
- exit;
- }
-
// we need a separate check here because functions.php might get parsed
// incorrectly before 5.3 because of :: syntax.
if (version_compare(PHP_VERSION, '7.0.0', '<')) {
@@ -20,7 +14,6 @@
require_once "sessions.php";
require_once "functions.php";
require_once "sanity_check.php";
- require_once "config.php";
require_once "db-prefs.php";
if (!init_plugins()) return;
diff --git a/prefs.php b/prefs.php
index b6026eb23..141118534 100644
--- a/prefs.php
+++ b/prefs.php
@@ -2,17 +2,10 @@
set_include_path(__DIR__ ."/include" . PATH_SEPARATOR .
get_include_path());
- if (!file_exists("config.php")) {
- print "<b>Fatal Error</b>: You forgot to copy
- <b>config.php-dist</b> to <b>config.php</b> and edit it.\n";
- exit;
- }
-
require_once "autoload.php";
require_once "sessions.php";
require_once "functions.php";
require_once "sanity_check.php";
- require_once "config.php";
require_once "db-prefs.php";
if (!init_plugins()) return;
diff --git a/public.php b/public.php
index 48fe675f8..8a02387cf 100644
--- a/public.php
+++ b/public.php
@@ -6,7 +6,6 @@
require_once "sessions.php";
require_once "functions.php";
require_once "sanity_check.php";
- require_once "config.php";
require_once "db-prefs.php";
startup_gettext();
diff --git a/update.php b/update.php
index 92a087a2e..af541f517 100755
--- a/update.php
+++ b/update.php
@@ -9,7 +9,6 @@
require_once "autoload.php";
require_once "functions.php";
- require_once "config.php";
require_once "sanity_check.php";
require_once "db-prefs.php";
diff --git a/update_daemon2.php b/update_daemon2.php
index b0314f3e9..2743a0fa2 100755
--- a/update_daemon2.php
+++ b/update_daemon2.php
@@ -10,7 +10,6 @@
require_once "autoload.php";
require_once "functions.php";
- require_once "config.php";
require_once "sanity_check.php";
require_once "db-prefs.php";