Commit bb009cda authored by Tino Goratsch's avatar Tino Goratsch

- moved some files around to make it prepare the subtree split of the ACP3 core

parent 4fbf6ac0
......@@ -10,13 +10,13 @@
*.dbproj merge=union
# Standard to msysgit
*.doc diff=astextplain
*.DOC diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot diff=astextplain
*.DOT diff=astextplain
*.pdf diff=astextplain
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain
*.doc diff=astextplain
*.DOC diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot diff=astextplain
*.DOT diff=astextplain
*.pdf diff=astextplain
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain
/.idea
/ACP3/config/config.yml
/ACP3/config.yml
/uploads/cache/images/*
/uploads/cache/sql/*
/uploads/cache/tpl_cached/*
......
<?php
namespace ACP3;
namespace ACP3\Core;
use ACP3\Core\FrontController;
use ACP3\Core\Modules;
use ACP3\Core\Modules\Controller;
use ACP3\Core\Logger as ACP3Logger;
use Monolog\ErrorHandler;
use Monolog\Formatter\LineFormatter;
use Monolog\Handler\StreamHandler;
......@@ -57,7 +57,7 @@ class Application
date_default_timezone_set('UTC');
// DB-Config des ACP3 laden
$path = ACP3_DIR . 'config/config.yml';
$path = ACP3_DIR . 'config.yml';
if (is_file($path) === false || filesize($path) === 0) {
exit('The ACP3 is not correctly installed. Please navigate to the <a href="' . ROOT_DIR . 'installation/">installation wizard</a> and follow its instructions.');
}
......@@ -145,7 +145,7 @@ class Application
if (!$containerConfigCache->isFresh()) {
$containerBuilder = new ContainerBuilder();
$loader = new YamlFileLoader($containerBuilder, new FileLocator(__DIR__));
$loader->load(ACP3_DIR . 'config/services.yml');
$loader->load(CLASSES_DIR . 'config/services.yml');
$loader->load(CLASSES_DIR . 'View/Renderer/Smarty/config/services.yml');
// Try to get all available services
......@@ -213,22 +213,22 @@ class Application
try {
$frontController = new FrontController($this->container);
$frontController->dispatch();
} catch (Core\Exceptions\ResultNotExists $e) {
} catch (Exceptions\ResultNotExists $e) {
if ($e->getMessage()) {
Core\Logger::error('404', $e);
ACP3Logger::error('404', $e);
} else {
Core\Logger::error('404', 'Could not find any results for request: ' . $request->query);
ACP3Logger::error('404', 'Could not find any results for request: ' . $request->query);
}
$redirect->temporary('errors/index/404');
} catch (Core\Exceptions\UnauthorizedAccess $e) {
} catch (Exceptions\UnauthorizedAccess $e) {
$redirectUri = base64_encode($request->originalQuery);
$redirect->temporary('users/index/login/redirect_' . $redirectUri);
} catch (Core\Exceptions\AccessForbidden $e) {
} catch (Exceptions\AccessForbidden $e) {
$redirect->temporary('errors/index/403');
} catch (Core\Exceptions\ControllerActionNotFound $e) {
Core\Logger::error('404', 'Request: ' . $request->query);
Core\Logger::error('404', $e);
} catch (Exceptions\ControllerActionNotFound $e) {
ACP3Logger::error('404', 'Request: ' . $request->query);
ACP3Logger::error('404', $e);
if (defined('DEBUG') && DEBUG === true) {
$errorMessage = $e->getMessage();
......@@ -237,7 +237,7 @@ class Application
$redirect->temporary('errors/index/404');
}
} catch (\Exception $e) {
Core\Logger::error('exception', $e);
ACP3Logger::error('exception', $e);
if (defined('DEBUG') && DEBUG === true) {
$errorMessage = $e->getMessage();
......
<?php
namespace ACP3\Core;
use ACP3\Application;
/**
* Parses XML files
*
......
imports:
- { resource: config.yml }
- { resource: cache.yml }
- { resource: ../../config.yml }
- { resource: helpers.yml }
- { resource: validation.yml }
- { resource: ../Core/WYSIWYG/config/services.yml }
- { resource: ../Modules/ACP3/Permissions/config/services.yml }
- { resource: ../Modules/ACP3/Seo/config/services.yml }
- { resource: ../Modules/ACP3/System/config/services.yml }
- { resource: ../Modules/ACP3/Users/config/services.yml }
- { resource: ../WYSIWYG/config/services.yml }
- { resource: ../../Modules/ACP3/Permissions/config/services.yml }
- { resource: ../../Modules/ACP3/Seo/config/services.yml }
- { resource: ../../Modules/ACP3/System/config/services.yml }
- { resource: ../../Modules/ACP3/Users/config/services.yml }
services:
core.acl:
......
{ parameters: { db_host: localhost, db_name: acp3, db_table_prefix: acp3_, db_password: '', db_user: root, db_driver: pdo_mysql, db_charset: utf8 } }
\ No newline at end of file
......@@ -10,5 +10,5 @@ define('ACP3_ROOT_DIR', realpath(__DIR__) . '/');
require './vendor/autoload.php';
$application = new \ACP3\Application();
$application = new \ACP3\Core\Application();
$application->run();
<?php
namespace ACP3\Installer;
namespace ACP3\Installer\Core;
use ACP3\Core;
use ACP3\Installer\Core\FrontController;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
use Symfony\Component\Config\FileLocator;
......@@ -70,10 +69,10 @@ class Application
$loader = new YamlFileLoader($this->container, new FileLocator(__DIR__));
if (defined('IN_UPDATER') === true) {
$loader->load(INSTALLER_ACP3_DIR . 'config/update.yml');
$loader->load(INSTALLER_CLASSES_DIR . 'config/update.yml');
$excludedDirs = ['.', '..'];
} else {
$loader->load(INSTALLER_ACP3_DIR . 'config/services.yml');
$loader->load(INSTALLER_CLASSES_DIR . 'config/services.yml');
$excludedDirs = ['.', '..', 'Update'];
}
......@@ -141,7 +140,7 @@ class Application
if (defined('IN_UPDATER') === true) {
// DB-Config des ACP3 laden
$path = ACP3_DIR . 'config/config.yml';
$path = ACP3_DIR . 'config.yml';
if (is_file($path) === false || filesize($path) === 0) {
exit('The ACP3 is not correctly installed. Please navigate to the <a href="' . ROOT_DIR . 'installation/">installation wizard</a> and follow its instructions.');
}
......
......@@ -2,5 +2,5 @@ parameters:
default_request: 'update'
imports:
- { resource: ../../ACP3/config/services.yml }
- { resource: ../../../ACP3/Core/config/services.yml }
- { resource: services.yml }
\ No newline at end of file
......@@ -17,7 +17,6 @@ class Index extends AbstractController
const CLASS_SUCCESS = 'success';
const CLASS_WARNING = 'warning';
public function actionRequirements()
{
// Allgemeine Voraussetzungen
......@@ -45,7 +44,7 @@ class Index extends AbstractController
$this->view->assign('requirements', $requirements);
$defaults = ['ACP3/config/config.yml'];
$defaults = ['ACP3/config.yml'];
// Uploadordner
$uploads = array_diff(scandir(UPLOADS_DIR), ['.', '..']);
......
......@@ -51,7 +51,7 @@ class Install extends AbstractController
$this->date = $date;
$this->installHelper = $installHelper;
$this->configFilePath = ACP3_DIR . 'config/config.yml';
$this->configFilePath = ACP3_DIR . 'config.yml';
}
public function actionIndex()
......@@ -132,8 +132,8 @@ class Install extends AbstractController
$this->container = new ContainerBuilder();
$loader = new YamlFileLoader($this->container, new FileLocator(__DIR__));
$loader->load(ACP3_DIR . 'config/services.yml');
$loader->load(INSTALLER_ACP3_DIR . 'config/services.yml');
$loader->load(CLASSES_DIR . 'config/services.yml');
$loader->load(INSTALLER_CLASSES_DIR . 'config/services.yml');
$loader->load(INSTALLER_CLASSES_DIR . 'View/Renderer/Smarty/services.yml');
// Load installer modules services
......
......@@ -11,5 +11,5 @@ define('ACP3_ROOT_DIR', realpath(__DIR__ . '/../') . '/');
require '../vendor/autoload.php';
$application = new \ACP3\Installer\Application();
$application = new \ACP3\Installer\Core\Application();
$application->run();
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment