about summary refs log tree commit diff stats
path: root/include
diff options
context:
space:
mode:
authorAndrew Dolgov <fox@fakecake.org>2024-01-23 16:11:48 +0300
committerAndrew Dolgov <fox@fakecake.org>2024-01-23 16:11:48 +0300
commit452ad8003719bb467d9c8eb041f726aa19f95125 (patch)
tree78dc434657eb1723869bf06103bea9db8554a4c5 /include
parent4e441bac2b6770c9364f9a40e663833498a732ce (diff)
downloadthe-epube-452ad8003719bb467d9c8eb041f726aa19f95125.tar.gz
the-epube-452ad8003719bb467d9c8eb041f726aa19f95125.tar.xz
add oidc library, switch to psr-4 loader
Diffstat (limited to 'include')
-rw-r--r--include/autoload.php16
-rw-r--r--include/common.php2
2 files changed, 1 insertions, 17 deletions
diff --git a/include/autoload.php b/include/autoload.php
deleted file mode 100644
index de80241..0000000
--- a/include/autoload.php
+++ /dev/null
@@ -1,16 +0,0 @@
-<?php
-	spl_autoload_register(function($class) {
-
-		$root_dir = dirname(__DIR__); // we were in include/
-
-		// - internal classes are loaded from classes/ and use special naming logic instead of namespaces
-
-		$class_file = "$root_dir/classes/" . str_replace("_", "/", strtolower($class)) . ".php";
-
-		if (file_exists($class_file))
-			include $class_file;
-
-	});
-
-	// also pull composer autoloader
-	require_once "vendor/autoload.php";
diff --git a/include/common.php b/include/common.php
index 2e179e6..aa5b300 100644
--- a/include/common.php
+++ b/include/common.php
@@ -6,7 +6,7 @@
 	if (stream_resolve_include_path("config.php"))
 		require_once "config.php";
 
-	require_once "autoload.php";
+	require_once "vendor/autoload.php";
 
 	/** its a dummy :( */
 	function T_sprintf(mixed ...$args) : string {