Update Kirby and add password guard
This commit is contained in:
parent
aaf1aa7890
commit
55d4e45891
987 changed files with 160116 additions and 66454 deletions
|
|
@ -1,26 +1,16 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Constants
|
||||
*/
|
||||
define('DS', '/');
|
||||
|
||||
/**
|
||||
* Load files that can't be autoloaded
|
||||
*/
|
||||
require_once __DIR__ . '/helpers.php';
|
||||
|
||||
/**
|
||||
* Class aliases
|
||||
*/
|
||||
$aliases = require_once __DIR__ . '/aliases.php';
|
||||
|
||||
spl_autoload_register(function ($class) use ($aliases) {
|
||||
$class = strtolower($class);
|
||||
$class = strtolower($class);
|
||||
|
||||
if (isset($aliases[$class]) === true) {
|
||||
class_alias($aliases[$class], $class);
|
||||
}
|
||||
if (isset($aliases[$class]) === true) {
|
||||
class_alias($aliases[$class], $class);
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
|
|
@ -29,13 +19,13 @@ spl_autoload_register(function ($class) use ($aliases) {
|
|||
$testDir = dirname(__DIR__) . '/tests';
|
||||
|
||||
if (is_dir($testDir) === true) {
|
||||
spl_autoload_register(function ($className) use ($testDir) {
|
||||
$path = str_replace('Kirby\\', '', $className);
|
||||
$path = str_replace('\\', '/', $path);
|
||||
$file = $testDir . '/' . $path . '.php';
|
||||
spl_autoload_register(function ($className) use ($testDir) {
|
||||
$path = str_replace('Kirby\\', '', $className);
|
||||
$path = str_replace('\\', '/', $path);
|
||||
$file = $testDir . '/' . $path . '.php';
|
||||
|
||||
if (file_exists($file)) {
|
||||
include $file;
|
||||
}
|
||||
});
|
||||
if (file_exists($file)) {
|
||||
include $file;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue