Update bootstrap file

This commit is contained in:
Kokororin 2016-12-07 13:18:20 +08:00
parent 49078288de
commit 3a9bf16e98

View File

@ -1,17 +1,6 @@
<?php
define('__ACCESS_PLUGIN_ROOT__', __DIR__);
if (function_exists('spl_autoload_register')) {
spl_autoload_register(function ($className) {
$filePath = __ACCESS_PLUGIN_ROOT__ . '/' . $className . '.php';
if (file_exists($filePath)) {
require_once $filePath;
} else {
throw new Typecho_Plugin_Exception($filePath . ' is not existed');
}
});
} else {
foreach (glob(__ACCESS_PLUGIN_ROOT__ . '/Access_*.php') as $filePath) {
require_once $filePath;
}
foreach (glob(__ACCESS_PLUGIN_ROOT__ . '/Access_*.php') as $filePath) {
require_once $filePath;
}