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:
parent
659b242b59
commit
2ccda5c26a
20
common.php
20
common.php
@ -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!");
|
||||
}
|
||||
|
@ -33,6 +33,7 @@
|
||||
"shardj/zf1-future" : "^1.12"
|
||||
},
|
||||
"autoload": {
|
||||
"classmap" : [ "model/" ],
|
||||
"files": [
|
||||
"config.inc.php",
|
||||
"functions.inc.php",
|
||||
|
Loading…
Reference in New Issue
Block a user