* [MOD] Moved non-configuration files from config to resources directory

* [FIX] Fixed wrong behavior while testing ArchiveHandler on unit tests
This commit is contained in:
nuxsmin
2018-11-12 08:29:18 +01:00
committed by Rubén D
parent 1e51f1757c
commit e37bc14901
8 changed files with 7 additions and 8 deletions

View File

@@ -82,7 +82,7 @@ final class BootstrapController extends SimpleControllerBase
*/
private function getJsLang()
{
return require CONFIG_PATH . DIRECTORY_SEPARATOR . 'strings.js.inc';
return require RESOURCES_PATH . DIRECTORY_SEPARATOR . 'strings.js.inc';
}
/**

View File

@@ -37,7 +37,7 @@ final class ResourceController extends SimpleControllerBase
/**
* @var Minify
*/
protected $minify;
private $minify;
/**
* Returns CSS resources
@@ -126,8 +126,6 @@ final class ResourceController extends SimpleControllerBase
/**
* @throws SPException
* @throws \DI\DependencyException
* @throws \DI\NotFoundException
*/
protected function initialize()
{

View File

@@ -35,11 +35,12 @@ define('APP_PATH', APP_ROOT . DIRECTORY_SEPARATOR . 'app');
// Please, notice that this file should be outside the webserver root. You can move it and then update this path
define('CONFIG_PATH', APP_PATH . DIRECTORY_SEPARATOR . 'config');
define('RESOURCES_PATH', APP_PATH . DIRECTORY_SEPARATOR . 'resources');
// Setup config files
define('CONFIG_FILE', CONFIG_PATH . DIRECTORY_SEPARATOR . 'config.xml');
define('ACTIONS_FILE', CONFIG_PATH . DIRECTORY_SEPARATOR . 'actions.xml');
define('MIMETYPES_FILE', CONFIG_PATH . DIRECTORY_SEPARATOR . 'mime.xml');
define('ACTIONS_FILE', RESOURCES_PATH . DIRECTORY_SEPARATOR . 'actions.xml');
define('MIMETYPES_FILE', RESOURCES_PATH . DIRECTORY_SEPARATOR . 'mime.xml');
define('OLD_CONFIG_FILE', CONFIG_PATH . DIRECTORY_SEPARATOR . 'config.php');
define('LOG_FILE', CONFIG_PATH . DIRECTORY_SEPARATOR . 'syspass.log');
define('LOCK_FILE', CONFIG_PATH . DIRECTORY_SEPARATOR . '.lock');

View File

@@ -57,7 +57,7 @@ final class Installer extends Service
*/
const VERSION = [3, 0, 0];
const VERSION_TEXT = '3.0-rc1';
const BUILD = 18111202;
const BUILD = 18111203;
/**
* @var DatabaseSetupInterface

View File

@@ -46,7 +46,7 @@ class ArchiveHandlerTest extends TestCase
$archive = TMP_DIR . DIRECTORY_SEPARATOR . 'test_archive_file';
$handler = new ArchiveHandler($archive, new PhpExtensionChecker());
$handler->compressFile(RESOURCE_DIR . DIRECTORY_SEPARATOR . 'config.xml');
$handler->compressFile(RESOURCE_DIR . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'config.xml');
$this->assertFileExists($archive . ArchiveHandler::COMPRESS_EXTENSION);
}