'File']); /** * The settings below can be used to set additional paths to models, views and controllers. * App::build(array( * 'Model' => array('/path/to/models/', '/next/path/to/models/'), * 'Model/Behavior' => array('/path/to/behaviors/', '/next/path/to/behaviors/'), * 'Model/Datasource' => array('/path/to/datasources/', '/next/path/to/datasources/'), * 'Model/Datasource/Database' => array('/path/to/databases/', '/next/path/to/database/'), * 'Model/Datasource/Session' => array('/path/to/sessions/', '/next/path/to/sessions/'), * 'Controller' => array('/path/to/controllers/', '/next/path/to/controllers/'), * 'Controller/Component' => array('/path/to/components/', '/next/path/to/components/'), * 'Controller/Component/Auth' => array('/path/to/auths/', '/next/path/to/auths/'), * 'Controller/Component/Acl' => array('/path/to/acls/', '/next/path/to/acls/'), * 'View' => array('/path/to/views/', '/next/path/to/views/'), * 'View/Helper' => array('/path/to/helpers/', '/next/path/to/helpers/'), * 'Console' => array('/path/to/consoles/', '/next/path/to/consoles/'), * 'Console/Command' => array('/path/to/commands/', '/next/path/to/commands/'), * 'Console/Command/Task' => array('/path/to/tasks/', '/next/path/to/tasks/'), * 'Lib' => array('/path/to/libs/', '/next/path/to/libs/'), * 'Locale' => array('/path/to/locales/', '/next/path/to/locales/'), * 'Vendor' => array('/path/to/vendors/', '/next/path/to/vendors/'), * 'Plugin' => array('/path/to/plugins/', '/next/path/to/plugins/'), * )); */ /** * Custom Inflector rules can be set to correctly pluralize or singularize table, model, controller names or whatever other * string is passed to the inflection functions * Inflector::rules('singular', array('rules' => array(), 'irregular' => array(), 'uninflected' => array())); * Inflector::rules('plural', array('rules' => array(), 'irregular' => array(), 'uninflected' => array())); */ Inflector::rules('plural', array( 'rules' => array(), 'irregular' => array( 'fiche' => 'fiches', 'article_organisation' => 'articles_organisations', 'organisation_user' => 'organisations_users', 'soustraitant_organisation' => 'soustraitants_organisations', 'responsable_organisation' => 'responsables_organisations', 'typage_organisation' => 'typages_organisations', ), 'uninflected' => array() )); /** * Plugins need to be loaded manually, you can either load them one by one or all of them in a single call * Uncomment one of the lines below, as you need. Make sure you read the documentation on CakePlugin to use more * advanced ways of loading plugins * CakePlugin::loadAll(); // Loads all plugins at once * CakePlugin::load('DebugKit'); //Loads a single plugin named DebugKit */ CakePlugin::loadAll([ 'AuthManager' => ['bootstrap' => true, 'routes' => false], 'Database' => ['bootstrap' => false, 'routes' => false], 'LibricielChecks' => ['bootstrap' => false, 'routes' => false], 'Postgres' => ['bootstrap' => false, 'routes' => false], 'Translator' => ['bootstrap' => true, 'routes' => false] ]); /** * You can attach event listeners to the request lifecycle as Dispatcher Filter. By default CakePHP bundles two filters: * - AssetDispatcher filter will serve your asset files (css, images, js, etc) from your themes and plugins * - CacheDispatcher filter will read the Cache.check configure variable and try to serve cached content generated from controllers * Feel free to remove or add filters as you see fit for your application. A few examples: * Configure::write('Dispatcher.filters', array( * 'MyCacheFilter', // will use MyCacheFilter class from the Routing/Filter package in your app. * 'MyPlugin.MyFilter', // will use MyFilter class from the Routing/Filter package in MyPlugin plugin. * array('callable' => $aFunction, 'on' => 'before', 'priority' => 9), // A valid PHP callback type to be called on beforeDispatch * array('callable' => $anotherMethod, 'on' => 'after'), // A valid PHP callback type to be called on afterDispatch * )); */ Configure::write('Dispatcher.filters', [ 'AssetDispatcher', 'CacheDispatcher' ]); /** * Configures default file logging options */ App::uses('CakeLog', 'Log'); CakeLog::config('debug', [ 'engine' => 'File', 'types' => [ 'notice', 'info', 'debug' ], 'file' => 'debug', ]); CakeLog::config('error', [ 'engine' => 'File', 'types' => [ 'warning', 'error', 'critical', 'alert', 'emergency' ], 'file' => 'error', ]); //// Load composer autoload require ROOT . DS . 'vendors'. DS .'autoload.php'; // Remove and re-prepend CakePHP's autoloader as composer thinks it is the most important. // See https://github.com/composer/composer/commit/c80cb76b9b5082ecc3e5b53b1050f76bb27b127b // See http://goo.gl/kKVJO7 spl_autoload_unregister(['App', 'load']); spl_autoload_register(['App', 'load'], true, true); // Gestion spéciale des exceptions pour qu'elles deviennent des messages flash dans l'interface App::uses('UserFriendlyExceptionHandler', 'Lib'); UserFriendlyExceptionHandler::setUp(); //Configuration du plugin Cakeflow Configure::write('Cakeflow.app', 'webdelib'); Configure::write('Cakeflow.user.model', 'User'); Configure::write('Cakeflow.user.idsession', 'user.User.id'); Configure::write('Cakeflow.user.fields', 'prenom,nom,username'); Configure::write('Cakeflow.user.format', '%s %s (%s)'); Configure::write('Cakeflow.trigger.model', 'User'); Configure::write('Cakeflow.trigger.fields', 'prenom,nom,username'); Configure::write('Cakeflow.trigger.format', '%s %s (%s)'); Configure::write('Cakeflow.trigger.title', 'Utilisateur'); Configure::write('Cakeflow.target.model', 'Deliberation'); Configure::write('Cakeflow.manage.parapheur', false); Configure::write('Cakeflow.manage.default', false); Configure::write('Cakeflow.actionsOutOfTreatment', 'ST,JS,IN'); Configure::write('Cakeflow.trigger.parapheur', -1); Configure::write("Cakeflow.etapesType", [ 'simple'=> ['value' => 1, 'label' => __('Simple')], 'concurrent'=> ['value' => 2, 'label' => __('Concurrent [OU]')], 'collaboratif'=> ['value' => 3, 'label' => __('Collaboratif [ET]')]]); Configure::write('Cakeflow.models_circuit_default', ['User', 'Service']); //Configuration du plugin AuthManager Configure::write('AuthManager.ignorePlugins', []); Configure::write('AuthManager.ignoreActions', []); Configure::write('AuthManager.ignoreControllers', []); Configure::write('AuthManager.models', []); Configure::write('AuthManager.aros', []); //Affichage des droits Configure::write( 'AuthManager.configCRUD', [ 'CRUD' => [ 'controllers' => ['group' => true], // 'Deliberations' => [], // 'mesProjetsValidation' => ['group' => true], 'mesProjetsATraiter' => ['group' => true], 'mesProjetsValides' => ['group' => true], 'projetsMonService' => ['group' => true], // 'tousLesProjetsSansSeance' => ['group' => true], 'tousLesProjetsValidation' => ['group' => true], 'tousLesProjetsAFaireVoter' => ['group' => true], // 'autresActesAValider' => ['group' => true], 'autresActesValides' => ['group' => true], 'autresActesAEnvoyer' => ['group' => true], 'autresActesEnvoyes' => ['group' => true], 'nonTransmis' => ['group' => true], // 'tousLesProjetsRecherche' => ['group' => true], 'duplicate' => ['group' => true], 'reattribuerTous' => ['group' => true], 'editerTous' => ['group' => true], 'supprimerTous' => ['group' => true], 'traitementLot' => ['group' => true], // 'goNext' => ['group' => true], 'retour' => ['group' => true], 'rebond' => ['group' => true], 'validerEnUrgence' => ['group' => true], // 'sendActesToSignature' => ['group' => true], 'sendToParapheur' => ['group' => true], 'cancelSignature' => ['group' => true], 'cancelSendToTDT' => ['group' => true], // 'Seances'=> [], 'calendrier' => ['group' => true], 'TableauDeBord' => ['group' => true], // 'Postseances' => ['group' => true], 'toSend' => ['group' => true], 'transmit' => ['group' => true], 'sendToSae' => ['group' => true], 'signature' => ['group' => true], // 'Collectivites' => ['role' => ['admin']], 'Themes' => ['role' => ['admin']], // 'ModelOdtValidator' => ['group' => true, 'role' => ['admin']], 'Modeltemplates' => ['role' => ['admin']], 'Modelvalidations' => ['group' => true, 'role' => ['admin']], // 'Sequences' => ['role' => ['admin']], 'Compteurs' => ['role' => ['admin']], 'Typeactes' => ['role' => ['admin']], 'Typeseances' => ['role' => ['admin']], 'edit9Cases' => ['role' => ['admin']], // 'Users' => ['role' => ['admin', 'manager']], 'updateDroits' => ['group' => true, 'role' => ['admin']], 'changeUserMdp' => ['group' => true], 'changeFormatSortie' => ['group' => true], 'Profils' => ['role' => ['admin']], 'Services' => ['role' => ['admin', 'manager']], // 'Cakeflow' => ['group' => true, 'role' => ['admin', 'manager']], 'Circuits' => ['role' => ['admin', 'manager']], 'Etapes' => ['role' => ['admin', 'manager']], 'Compositions' => ['role' => ['admin', 'manager']], // 'Acteurs' => ['role' => ['admin']], 'Typeacteurs' => ['role' => ['admin']], // 'Infosupdefs' => ['role' => ['admin']], // 'Connecteurs' => ['group' => true, 'role' => ['admin']], 'Crons' => ['role' => ['admin']], 'Historiques' => ['group' => true, 'role' => ['admin']] //'ConnectorManager' => ['group' => true, 'role' => ['admin']], //'Connectors' => ['role' => ['admin']], ], 'options' => ['order' => true] ] ); require_once('webdpo.inc'); require_once(APP . DS . 'Lib' . DS . 'basics.php'); // CakePlugin::load('Cakeflow', ['bootstrap' => true, 'routes' => false]); CakePlugin::load('FusionConv', ['bootstrap' => true, 'routes' => false]); CakePlugin::load('LdapManager', ['bootstrap' => true, 'routes' => false]); CakePlugin::load('LibricielChecks', ['bootstrap' => false, 'routes' => false]); //appVersion $versionFile = file(ROOT . DS . 'VERSION.txt'); define('VERSION', trim(array_pop($versionFile)));