Merge branch 'feature/redesign' into feature/redesign

This commit is contained in:
Diederik de Groot
2020-03-17 12:50:50 +01:00
committed by GitHub
4 changed files with 10 additions and 3 deletions

0
.cache/.gitkeep Normal file
View File

View File

@@ -1,4 +1,6 @@
<?php
declare(strict_types=1);
namespace SCCP\TFTP;
/*
* PHP TFTP Server
*

View File

@@ -2,11 +2,12 @@
//
// Helper functions
//
declare(strict_types=1);
namespace SCCP\Utils;
function utf8_urldecode($str) {
$str = preg_replace("/%u([0-9a-f]{3,4})/i","&#x\\1;",urldecode($str));
return html_entity_decode($str,null,'UTF-8');;
return html_entity_decode($str,0,'UTF-8');;
}
function log_debug($message) {

View File

@@ -1,10 +1,14 @@
#!/usr/bin/env php
<?php
declare(strict_types=1);
require_once("lib/tftp.php");
require_once("lib/config.php");
require_once("lib/resolver.php");
class TFTPProvisioner extends TFTPServer
use SCCP\TFTP as TFTP;
use SCCP\Resolve as Resolve;
class TFTPProvisioner extends TFTP\TFTPServer
{
private $_debug;
private $_resolver;
@@ -19,7 +23,7 @@ class TFTPProvisioner extends TFTPServer
parent::__construct($server_url, $logger);
$this->_debug = $debug;
$this->max_put_size = 60000000;
$this->_resolver = new Resolver($config);
$this->_resolver = new Resolve\Resolver($config);
$this->_settings_path = $this->_config['main']['base_path'] . DIRECTORY_SEPARATOR
. $this->_config['subdirs']['settings']['path'] . DIRECTORY_SEPARATOR;
}