mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-03 13:19:28 +00:00
0bc0a09bf4
- application/extensions file system permission now is 775 - application/logs file system permission now is 775 - Added extensions directory in application/: config, controllers, helpers, hooks, libraries, models, views and widgets - Added view views/extensions/manage.php - Added controller controllers/system/extensions/Manager.php - Added library ExtensionsLib to manage extensions - Added model models/system/Extensions_model.php - Moved code related to print out info from MigrationLib to EPrintfLib
54 lines
808 B
PHP
54 lines
808 B
PHP
<?php
|
|
|
|
// SabreDAV test server.
|
|
|
|
class CliLog {
|
|
|
|
protected $stream;
|
|
|
|
function __construct() {
|
|
|
|
$this->stream = fopen('php://stdout','w');
|
|
|
|
}
|
|
|
|
function log($msg) {
|
|
fwrite($this->stream, $msg . "\n");
|
|
}
|
|
|
|
}
|
|
|
|
$log = new CliLog();
|
|
|
|
if (php_sapi_name()!=='cli-server') {
|
|
die("This script is intended to run on the built-in php webserver");
|
|
}
|
|
|
|
// Finding composer
|
|
|
|
|
|
$paths = array(
|
|
__DIR__ . '/../vendor/autoload.php',
|
|
__DIR__ . '/../../../autoload.php',
|
|
);
|
|
|
|
foreach($paths as $path) {
|
|
if (file_exists($path)) {
|
|
include $path;
|
|
break;
|
|
}
|
|
}
|
|
|
|
use Sabre\DAV;
|
|
|
|
// Root
|
|
$root = new DAV\FS\Directory(getcwd());
|
|
|
|
// Setting up server.
|
|
$server = new DAV\Server($root);
|
|
|
|
// Browser plugin
|
|
$server->addPlugin(new DAV\Browser\Plugin());
|
|
|
|
$server->exec();
|