summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/accounts.php4
-rw-r--r--lib/emote.php2
-rw-r--r--lib/partials.php4
3 files changed, 4 insertions, 6 deletions
diff --git a/lib/accounts.php b/lib/accounts.php
index 2ddb796..36f11af 100644
--- a/lib/accounts.php
+++ b/lib/accounts.php
@@ -1,5 +1,5 @@
<?php
-include_once "config.php";
+include_once "{$_SERVER['DOCUMENT_ROOT']}/lib/config.php";
function authorize_user(bool $required = false): bool
{
@@ -26,8 +26,6 @@ function authorize_user(bool $required = false): bool
return false;
}
- include_once "config.php";
-
$db = new PDO(CONFIG['database']['url'], CONFIG['database']['user'], CONFIG['database']['pass']);
$key = $_SERVER["HTTP_AUTHORIZATION"] ?? $_COOKIE["secret_key"];
diff --git a/lib/emote.php b/lib/emote.php
index 38e4f01..14f6088 100644
--- a/lib/emote.php
+++ b/lib/emote.php
@@ -1,5 +1,5 @@
<?php
-include_once "user.php";
+include_once "{$_SERVER['DOCUMENT_ROOT']}/lib/user.php";
class Emote
{
diff --git a/lib/partials.php b/lib/partials.php
index 5dc97d7..8de8c05 100644
--- a/lib/partials.php
+++ b/lib/partials.php
@@ -1,8 +1,8 @@
<?php
+include_once "{$_SERVER['DOCUMENT_ROOT']}/lib/config.php";
+
function html_navigation_bar()
{
- include_once "config.php";
-
echo '' ?>
<section class="navbar">
<a href="/" class="brand" style="color:black;text-decoration:none;">