From fef79575a70c017165542af356f96f8df2f5e671 Mon Sep 17 00:00:00 2001 From: Felix Albrigtsen Date: Thu, 15 Feb 2024 22:57:03 +0100 Subject: [PATCH] WIP: move sql_config.php to config.php --- .gitignore | 2 +- inc/agenda.php | 2 +- inc/include.php | 2 +- inc/ticker.php | 2 +- www/admin/aktiviteter/delete.php | 2 +- www/admin/aktiviteter/edit.php | 2 +- www/admin/aktiviteter/index.php | 2 +- www/admin/aktiviteter/update.php | 2 +- www/admin/brukere/index.php | 2 +- www/admin/brukere/update.php | 2 +- www/admin/motd/index.php | 2 +- www/admin/motd/update.php | 2 +- www/admin/prosjekter/delete.php | 2 +- www/admin/prosjekter/edit.php | 2 +- www/admin/prosjekter/index.php | 2 +- www/admin/prosjekter/update.php | 2 +- www/prosjekt/edit.php | 2 +- www/prosjekt/mine.php | 2 +- www/prosjekt/update.php | 2 +- 19 files changed, 19 insertions(+), 19 deletions(-) diff --git a/.gitignore b/.gitignore index 0fbf257..444cb77 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -/sql_config.php +/config.php *.sqlite /test.sql /vendor/ diff --git a/inc/agenda.php b/inc/agenda.php index 92e393c..d605c37 100644 --- a/inc/agenda.php +++ b/inc/agenda.php @@ -1,6 +1,6 @@ setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); diff --git a/inc/include.php b/inc/include.php index ca66a67..03e9b74 100644 --- a/inc/include.php +++ b/inc/include.php @@ -5,7 +5,7 @@ require_once __DIR__ . DIRECTORY_SEPARATOR . 'agenda.php'; require_once __DIR__ . DIRECTORY_SEPARATOR . 'navbar.php'; -require_once dirname(__DIR__) . implode(DIRECTORY_SEPARATOR, ['', 'sql_config.php']); +require_once dirname(__DIR__) . implode(DIRECTORY_SEPARATOR, ['', 'config.php']); require_once dirname(__DIR__) . implode(DIRECTORY_SEPARATOR, ['', 'src', '_autoload.php']); require_once dirname(__DIR__) . implode(DIRECTORY_SEPARATOR, ['', 'vendor', 'simplesamlphp', 'simplesamlphp', 'lib', '_autoload.php']); diff --git a/inc/ticker.php b/inc/ticker.php index c164fde..55cd64f 100644 --- a/inc/ticker.php +++ b/inc/ticker.php @@ -2,7 +2,7 @@ setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); diff --git a/www/admin/aktiviteter/delete.php b/www/admin/aktiviteter/delete.php index 300360d..b51581d 100644 --- a/www/admin/aktiviteter/delete.php +++ b/www/admin/aktiviteter/delete.php @@ -1,6 +1,6 @@ setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $userManager = new \pvv\admin\UserManager($pdo); diff --git a/www/admin/aktiviteter/edit.php b/www/admin/aktiviteter/edit.php index 815fd31..6e43f5b 100644 --- a/www/admin/aktiviteter/edit.php +++ b/www/admin/aktiviteter/edit.php @@ -3,7 +3,7 @@ date_default_timezone_set('Europe/Oslo'); setlocale(LC_ALL, 'nb_NO'); require __DIR__ . '/../../../inc/navbar.php'; require __DIR__ . '/../../../src/_autoload.php'; -require __DIR__ . '/../../../sql_config.php'; +require __DIR__ . '/../../../config.php'; $pdo = new \PDO($dbDsn, $dbUser, $dbPass); $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); diff --git a/www/admin/aktiviteter/index.php b/www/admin/aktiviteter/index.php index 23c2b2a..768b97f 100644 --- a/www/admin/aktiviteter/index.php +++ b/www/admin/aktiviteter/index.php @@ -3,7 +3,7 @@ date_default_timezone_set('Europe/Oslo'); setlocale(LC_ALL, 'nb_NO'); require __DIR__ . '/../../../inc/navbar.php'; require __DIR__ . '/../../../src/_autoload.php'; -require __DIR__ . '/../../../sql_config.php'; +require __DIR__ . '/../../../config.php'; $pdo = new \PDO($dbDsn, $dbUser, $dbPass); $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); diff --git a/www/admin/aktiviteter/update.php b/www/admin/aktiviteter/update.php index 15ddfe0..b5abf9b 100644 --- a/www/admin/aktiviteter/update.php +++ b/www/admin/aktiviteter/update.php @@ -2,7 +2,7 @@ date_default_timezone_set('Europe/Oslo'); setlocale(LC_ALL, 'nb_NO'); require __DIR__ . '/../../../src/_autoload.php'; -require __DIR__ . '/../../../sql_config.php'; +require __DIR__ . '/../../../config.php'; $pdo = new \PDO($dbDsn, $dbUser, $dbPass); $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $userManager = new \pvv\admin\UserManager($pdo); diff --git a/www/admin/brukere/index.php b/www/admin/brukere/index.php index e64b934..5c0b04b 100644 --- a/www/admin/brukere/index.php +++ b/www/admin/brukere/index.php @@ -5,7 +5,7 @@ setlocale(LC_ALL, 'nb_NO'); error_reporting(E_ALL); require __DIR__ . '/../../../inc/navbar.php'; require __DIR__ . '/../../../src/_autoload.php'; -require __DIR__ . '/../../../sql_config.php'; +require __DIR__ . '/../../../config.php'; require_once(__DIR__ . '/../../../vendor/simplesamlphp/simplesamlphp/lib/_autoload.php'); $as = new SimpleSAML_Auth_Simple('default-sp'); $attrs = $as->getAttributes(); diff --git a/www/admin/brukere/update.php b/www/admin/brukere/update.php index 79ade09..adc2352 100644 --- a/www/admin/brukere/update.php +++ b/www/admin/brukere/update.php @@ -4,7 +4,7 @@ date_default_timezone_set('Europe/Oslo'); setlocale(LC_ALL, 'nb_NO'); error_reporting(E_ALL); require __DIR__ . '/../../../src/_autoload.php'; -require __DIR__ . '/../../../sql_config.php'; +require __DIR__ . '/../../../config.php'; $pdo = new \PDO($dbDsn, $dbUser, $dbPass); $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $userManager = new \pvv\admin\UserManager($pdo); diff --git a/www/admin/motd/index.php b/www/admin/motd/index.php index 470d72e..76be183 100644 --- a/www/admin/motd/index.php +++ b/www/admin/motd/index.php @@ -5,7 +5,7 @@ setlocale(LC_ALL, 'no_NO'); error_reporting(E_ALL); require __DIR__ . '/../../../inc/navbar.php'; require __DIR__ . '/../../../src/_autoload.php'; -require __DIR__ . '/../../../sql_config.php'; +require __DIR__ . '/../../../config.php'; require_once(__DIR__ . '/../../../vendor/simplesamlphp/simplesamlphp/lib/_autoload.php'); $as = new SimpleSAML_Auth_Simple('default-sp'); $attrs = $as->getAttributes(); diff --git a/www/admin/motd/update.php b/www/admin/motd/update.php index ee1eae0..d92003e 100644 --- a/www/admin/motd/update.php +++ b/www/admin/motd/update.php @@ -4,7 +4,7 @@ date_default_timezone_set('Europe/Oslo'); setlocale(LC_ALL, 'no_NO'); error_reporting(E_ALL); require __DIR__ . '/../../../src/_autoload.php'; -require __DIR__ . '/../../../sql_config.php'; +require __DIR__ . '/../../../config.php'; $pdo = new \PDO($dbDsn, $dbUser, $dbPass); $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $userManager = new \pvv\admin\UserManager($pdo); diff --git a/www/admin/prosjekter/delete.php b/www/admin/prosjekter/delete.php index 40c60ab..83cdc7d 100644 --- a/www/admin/prosjekter/delete.php +++ b/www/admin/prosjekter/delete.php @@ -1,6 +1,6 @@ setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $userManager = new \pvv\admin\UserManager($pdo); diff --git a/www/admin/prosjekter/edit.php b/www/admin/prosjekter/edit.php index 4d47810..69f8223 100644 --- a/www/admin/prosjekter/edit.php +++ b/www/admin/prosjekter/edit.php @@ -3,7 +3,7 @@ date_default_timezone_set('Europe/Oslo'); setlocale(LC_ALL, 'nb_NO'); require __DIR__ . '/../../../inc/navbar.php'; require __DIR__ . '/../../../src/_autoload.php'; -require __DIR__ . '/../../../sql_config.php'; +require __DIR__ . '/../../../config.php'; $pdo = new \PDO($dbDsn, $dbUser, $dbPass); $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); diff --git a/www/admin/prosjekter/index.php b/www/admin/prosjekter/index.php index b8b3f8d..f76b5d0 100644 --- a/www/admin/prosjekter/index.php +++ b/www/admin/prosjekter/index.php @@ -3,7 +3,7 @@ date_default_timezone_set('Europe/Oslo'); setlocale(LC_ALL, 'nb_NO'); require __DIR__ . '/../../../inc/navbar.php'; require __DIR__ . '/../../../src/_autoload.php'; -require __DIR__ . '/../../../sql_config.php'; +require __DIR__ . '/../../../config.php'; $pdo = new \PDO($dbDsn, $dbUser, $dbPass); $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); diff --git a/www/admin/prosjekter/update.php b/www/admin/prosjekter/update.php index 0ee20da..2d14490 100644 --- a/www/admin/prosjekter/update.php +++ b/www/admin/prosjekter/update.php @@ -2,7 +2,7 @@ date_default_timezone_set('Europe/Oslo'); setlocale(LC_ALL, 'nb_NO'); require __DIR__ . '/../../../src/_autoload.php'; -require __DIR__ . '/../../../sql_config.php'; +require __DIR__ . '/../../../config.php'; $pdo = new \PDO($dbDsn, $dbUser, $dbPass); $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $userManager = new \pvv\admin\UserManager($pdo); diff --git a/www/prosjekt/edit.php b/www/prosjekt/edit.php index 11cef32..306ffc1 100644 --- a/www/prosjekt/edit.php +++ b/www/prosjekt/edit.php @@ -3,7 +3,7 @@ date_default_timezone_set('Europe/Oslo'); setlocale(LC_ALL, 'nb_NO'); require __DIR__ . '/../../inc/navbar.php'; require __DIR__ . '/../../src/_autoload.php'; -require __DIR__ . '/../../sql_config.php'; +require __DIR__ . '/../../config.php'; require_once __DIR__ . '/../../vendor/simplesamlphp/simplesamlphp/lib/_autoload.php'; $as = new SimpleSAML_Auth_Simple('default-sp'); diff --git a/www/prosjekt/mine.php b/www/prosjekt/mine.php index 0f6e860..b532593 100644 --- a/www/prosjekt/mine.php +++ b/www/prosjekt/mine.php @@ -3,7 +3,7 @@ date_default_timezone_set('Europe/Oslo'); setlocale(LC_ALL, 'nb_NO'); require __DIR__ . '/../../inc/navbar.php'; require __DIR__ . '/../../src/_autoload.php'; -require __DIR__ . '/../../sql_config.php'; +require __DIR__ . '/../../config.php'; require_once(__DIR__ . '/../../vendor/simplesamlphp/simplesamlphp/lib/_autoload.php'); $as = new SimpleSAML_Auth_Simple('default-sp'); diff --git a/www/prosjekt/update.php b/www/prosjekt/update.php index 972ddfd..2ac71b3 100644 --- a/www/prosjekt/update.php +++ b/www/prosjekt/update.php @@ -2,7 +2,7 @@ date_default_timezone_set('Europe/Oslo'); setlocale(LC_ALL, 'nb_NO'); require __DIR__ . '/../../src/_autoload.php'; -require __DIR__ . '/../../sql_config.php'; +require __DIR__ . '/../../config.php'; $pdo = new \PDO($dbDsn, $dbUser, $dbPass); $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);