0
0
mirror of https://github.com/postfixadmin/postfixadmin.git synced 2024-09-19 19:22:14 +02:00

move to use the composer autoloader

This commit is contained in:
David Goodwin 2021-07-07 21:41:59 +01:00
parent 659b242b59
commit 2ccda5c26a
2 changed files with 4 additions and 17 deletions

View File

@ -1,4 +1,7 @@
<?php
require_once(dirname(__FILE__) . '/vendor/autoload.php');
/**
* Postfix Admin
*
@ -32,23 +35,6 @@ if (!defined('POSTFIXADMIN')) {
$incpath = dirname(__FILE__);
/**
* @param string $class
* __autoload implementation, for use with spl_autoload_register().
*/
function postfixadmin_autoload($class)
{
$PATH = dirname(__FILE__) . '/model/' . $class . '.php';
if (is_file($PATH)) {
require_once($PATH);
return true;
}
return false;
}
spl_autoload_register('postfixadmin_autoload');
if (!is_file("$incpath/config.inc.php")) {
die("config.inc.php is missing!");
}

View File

@ -33,6 +33,7 @@
"shardj/zf1-future" : "^1.12"
},
"autoload": {
"classmap" : [ "model/" ],
"files": [
"config.inc.php",
"functions.inc.php",