Removed some more includes; restore loading controller groups manually
This commit is contained in:
parent
5d83143664
commit
13bd53b326
|
@ -1,12 +1,4 @@
|
|||
<?php
|
||||
include 'article/add-topic.php';
|
||||
include 'article/edit-topic.php';
|
||||
include 'article/delete-topic.php';
|
||||
include 'article/add.php';
|
||||
include 'article/edit.php';
|
||||
include 'article/delete.php';
|
||||
include 'article/get-all.php';
|
||||
|
||||
$articleControllers = new ControllerGroup();
|
||||
$articleControllers->setGroupPath('/article');
|
||||
|
||||
|
|
|
@ -1,17 +1,4 @@
|
|||
<?php
|
||||
require_once 'staff/get.php';
|
||||
require_once 'staff/assign-ticket.php';
|
||||
require_once 'staff/un-assign-ticket.php';
|
||||
require_once 'staff/get-tickets.php';
|
||||
require_once 'staff/get-new-tickets.php';
|
||||
require_once 'staff/get-all-tickets.php';
|
||||
require_once 'staff/search-tickets.php';
|
||||
require_once 'staff/add.php';
|
||||
require_once 'staff/get-all.php';
|
||||
require_once 'staff/delete.php';
|
||||
require_once 'staff/edit.php';
|
||||
require_once 'staff/last-events.php';
|
||||
|
||||
$systemControllerGroup = new ControllerGroup();
|
||||
$systemControllerGroup->setGroupPath('/staff');
|
||||
|
||||
|
|
|
@ -1,32 +1,4 @@
|
|||
<?php
|
||||
require_once 'system/check-requirements.php';
|
||||
require_once 'system/init-database.php';
|
||||
require_once 'system/init-settings.php';
|
||||
require_once 'system/init-admin.php';
|
||||
require_once 'system/installation-done.php';
|
||||
require_once 'system/get-settings.php';
|
||||
require_once 'system/edit-settings.php';
|
||||
require_once 'system/add-department.php';
|
||||
require_once 'system/edit-department.php';
|
||||
require_once 'system/delete-department.php';
|
||||
require_once 'system/get-logs.php';
|
||||
require_once 'system/get-mail-templates.php';
|
||||
require_once 'system/edit-mail-template.php';
|
||||
require_once 'system/recover-mail-template.php';
|
||||
require_once 'system/disable-registration.php';
|
||||
require_once 'system/enable-registration.php';
|
||||
require_once 'system/disable-user-system.php';
|
||||
require_once 'system/enable-user-system.php';
|
||||
require_once 'system/add-api-key.php';
|
||||
require_once 'system/delete-api-key.php';
|
||||
require_once 'system/get-api-keys.php';
|
||||
require_once 'system/get-stats.php';
|
||||
require_once 'system/delete-all-users.php';
|
||||
require_once 'system/csv-import.php';
|
||||
require_once 'system/backup-database.php';
|
||||
require_once 'system/download.php';
|
||||
require_once 'system/test-smtp.php';
|
||||
|
||||
$systemControllerGroup = new ControllerGroup();
|
||||
$systemControllerGroup->setGroupPath('/system');
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
<?php
|
||||
//include '../../config.php';
|
||||
use RedBeanPHP\Facade as RedBean;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,19 +1,4 @@
|
|||
<?php
|
||||
include 'ticket/create.php';
|
||||
include 'ticket/comment.php';
|
||||
include 'ticket/get.php';
|
||||
include 'ticket/check.php';
|
||||
include 'ticket/add-custom-response.php';
|
||||
include 'ticket/delete-custom-response.php';
|
||||
include 'ticket/edit-custom-response.php';
|
||||
include 'ticket/get-custom-responses.php';
|
||||
include 'ticket/change-department.php';
|
||||
include 'ticket/close.php';
|
||||
include 'ticket/re-open.php';
|
||||
include 'ticket/change-priority.php';
|
||||
include 'ticket/seen.php';
|
||||
include 'ticket/delete.php';
|
||||
|
||||
$ticketControllers = new ControllerGroup();
|
||||
$ticketControllers->setGroupPath('/ticket');
|
||||
|
||||
|
|
|
@ -1,23 +1,4 @@
|
|||
<?php
|
||||
include 'user/login.php';
|
||||
include 'user/signup.php';
|
||||
include 'user/logout.php';
|
||||
include 'user/check-session.php';
|
||||
include 'user/recover-password.php';
|
||||
include 'user/send-recover-password.php';
|
||||
include 'user/edit-password.php';
|
||||
include 'user/edit-email.php';
|
||||
include 'user/get.php';
|
||||
include 'user/get-users.php';
|
||||
include 'user/get-user.php';
|
||||
include 'user/delete.php';
|
||||
include 'user/ban.php';
|
||||
include 'user/un-ban.php';
|
||||
include 'user/list-ban.php';
|
||||
include 'user/verify.php';
|
||||
include 'user/enable.php';
|
||||
include 'user/disable.php';
|
||||
|
||||
$userControllers = new ControllerGroup();
|
||||
$userControllers->setGroupPath('/user');
|
||||
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
<?php
|
||||
require_once 'data/MailTexts.php';
|
||||
|
||||
class InitialMails {
|
||||
|
||||
public static function getBody($templateCode, $texts) {
|
||||
|
|
|
@ -15,5 +15,10 @@ if(defined('MYSQL_HOST') && defined('MYSQL_DATABASE') && defined('MYSQL_USER') &
|
|||
\Slim\Slim::registerAutoLoader();
|
||||
$app = new \Slim\Slim();
|
||||
|
||||
// LOAD CONTROLLERS
|
||||
foreach (glob('controllers/*.php') as $controller) {
|
||||
include_once $controller;
|
||||
}
|
||||
|
||||
Controller::init();
|
||||
$app->run();
|
||||
|
|
|
@ -1,7 +1,4 @@
|
|||
<?php
|
||||
require_once 'libs/Validator.php';
|
||||
require_once 'models/Session.php';
|
||||
|
||||
use RedBeanPHP\Facade as RedBean;
|
||||
|
||||
abstract class Controller {
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
<?php
|
||||
require_once 'models/DataStore.php';
|
||||
|
||||
class DataStoreList implements IteratorAggregate {
|
||||
private $list = [];
|
||||
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
<?php
|
||||
require_once 'libs/Controller.php';
|
||||
|
||||
use Respect\Validation\Validator as DataValidator;
|
||||
|
||||
class ValidationException extends Exception {}
|
||||
|
|
Loading…
Reference in New Issue