Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
88 changes: 44 additions & 44 deletions app/Config/Schema/db_acl.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class DbAclSchema extends CakeSchema {
* @param array $event The event data.
* @return bool Success
*/
public function before($event = array()) {
public function before($event = []) {
return true;
}

Expand All @@ -40,62 +40,62 @@ public function before($event = array()) {
* @param array $event The event data.
* @return void
*/
public function after($event = array()) {
public function after($event = []) {
}

/**
* ACO - Access Control Object - Something that is wanted
*/
public $acos = array(
'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'length' => 10, 'key' => 'primary'),
'parent_id' => array('type' => 'integer', 'null' => true, 'default' => null, 'length' => 10),
'model' => array('type' => 'string', 'null' => true),
'foreign_key' => array('type' => 'integer', 'null' => true, 'default' => null, 'length' => 10),
'alias' => array('type' => 'string', 'null' => true),
'lft' => array('type' => 'integer', 'null' => true, 'default' => null, 'length' => 10),
'rght' => array('type' => 'integer', 'null' => true, 'default' => null, 'length' => 10),
'indexes' => array(
'PRIMARY' => array('column' => 'id', 'unique' => 1),
'idx_acos_lft_rght' => array('column' => array('lft', 'rght'), 'unique' => 0),
'idx_acos_alias' => array('column' => 'alias', 'unique' => 0)
)
);
public $acos = [
'id' => ['type' => 'integer', 'null' => false, 'default' => null, 'length' => 10, 'key' => 'primary'],
'parent_id' => ['type' => 'integer', 'null' => true, 'default' => null, 'length' => 10],
'model' => ['type' => 'string', 'null' => true],
'foreign_key' => ['type' => 'integer', 'null' => true, 'default' => null, 'length' => 10],
'alias' => ['type' => 'string', 'null' => true],
'lft' => ['type' => 'integer', 'null' => true, 'default' => null, 'length' => 10],
'rght' => ['type' => 'integer', 'null' => true, 'default' => null, 'length' => 10],
'indexes' => [
'PRIMARY' => ['column' => 'id', 'unique' => 1],
'idx_acos_lft_rght' => ['column' => ['lft', 'rght'], 'unique' => 0],
'idx_acos_alias' => ['column' => 'alias', 'unique' => 0]
]
];

/**
* ARO - Access Request Object - Something that wants something
*/
public $aros = array(
'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'length' => 10, 'key' => 'primary'),
'parent_id' => array('type' => 'integer', 'null' => true, 'default' => null, 'length' => 10),
'model' => array('type' => 'string', 'null' => true),
'foreign_key' => array('type' => 'integer', 'null' => true, 'default' => null, 'length' => 10),
'alias' => array('type' => 'string', 'null' => true),
'lft' => array('type' => 'integer', 'null' => true, 'default' => null, 'length' => 10),
'rght' => array('type' => 'integer', 'null' => true, 'default' => null, 'length' => 10),
'indexes' => array(
'PRIMARY' => array('column' => 'id', 'unique' => 1),
'idx_aros_lft_rght' => array('column' => array('lft', 'rght'), 'unique' => 0),
'idx_aros_alias' => array('column' => 'alias', 'unique' => 0)
)
);
public $aros = [
'id' => ['type' => 'integer', 'null' => false, 'default' => null, 'length' => 10, 'key' => 'primary'],
'parent_id' => ['type' => 'integer', 'null' => true, 'default' => null, 'length' => 10],
'model' => ['type' => 'string', 'null' => true],
'foreign_key' => ['type' => 'integer', 'null' => true, 'default' => null, 'length' => 10],
'alias' => ['type' => 'string', 'null' => true],
'lft' => ['type' => 'integer', 'null' => true, 'default' => null, 'length' => 10],
'rght' => ['type' => 'integer', 'null' => true, 'default' => null, 'length' => 10],
'indexes' => [
'PRIMARY' => ['column' => 'id', 'unique' => 1],
'idx_aros_lft_rght' => ['column' => ['lft', 'rght'], 'unique' => 0],
'idx_aros_alias' => ['column' => 'alias', 'unique' => 0]
]
];

/**
* Used by the Cake::Model:Permission class.
* Checks if the given $aro has access to action $action in $aco.
*/
public $aros_acos = array(
'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'length' => 10, 'key' => 'primary'),
'aro_id' => array('type' => 'integer', 'null' => false, 'length' => 10, 'key' => 'index'),
'aco_id' => array('type' => 'integer', 'null' => false, 'length' => 10),
'_create' => array('type' => 'string', 'null' => false, 'default' => '0', 'length' => 2),
'_read' => array('type' => 'string', 'null' => false, 'default' => '0', 'length' => 2),
'_update' => array('type' => 'string', 'null' => false, 'default' => '0', 'length' => 2),
'_delete' => array('type' => 'string', 'null' => false, 'default' => '0', 'length' => 2),
'indexes' => array(
'PRIMARY' => array('column' => 'id', 'unique' => 1),
'ARO_ACO_KEY' => array('column' => array('aro_id', 'aco_id'), 'unique' => 1),
'idx_aco_id' => array('column' => 'aco_id', 'unique' => 0)
)
);
public $aros_acos = [
'id' => ['type' => 'integer', 'null' => false, 'default' => null, 'length' => 10, 'key' => 'primary'],
'aro_id' => ['type' => 'integer', 'null' => false, 'length' => 10, 'key' => 'index'],
'aco_id' => ['type' => 'integer', 'null' => false, 'length' => 10],
'_create' => ['type' => 'string', 'null' => false, 'default' => '0', 'length' => 2],
'_read' => ['type' => 'string', 'null' => false, 'default' => '0', 'length' => 2],
'_update' => ['type' => 'string', 'null' => false, 'default' => '0', 'length' => 2],
'_delete' => ['type' => 'string', 'null' => false, 'default' => '0', 'length' => 2],
'indexes' => [
'PRIMARY' => ['column' => 'id', 'unique' => 1],
'ARO_ACO_KEY' => ['column' => ['aro_id', 'aco_id'], 'unique' => 1],
'idx_aco_id' => ['column' => 'aco_id', 'unique' => 0]
]
];

}
22 changes: 11 additions & 11 deletions app/Config/Schema/i18n.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class I18nSchema extends CakeSchema {
* @param array $event Schema object properties
* @return bool Should process continue
*/
public function before($event = array()) {
public function before($event = []) {
return true;
}

Expand All @@ -50,22 +50,22 @@ public function before($event = array()) {
* @param array $event Schema object properties
* @return void
*/
public function after($event = array()) {
public function after($event = []) {
}

/**
* The i18n table definition
*
* @var array
*/
public $i18n = array(
'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'length' => 10, 'key' => 'primary'),
'locale' => array('type' => 'string', 'null' => false, 'length' => 6, 'key' => 'index'),
'model' => array('type' => 'string', 'null' => false, 'key' => 'index'),
'foreign_key' => array('type' => 'integer', 'null' => false, 'length' => 10, 'key' => 'index'),
'field' => array('type' => 'string', 'null' => false, 'key' => 'index'),
'content' => array('type' => 'text', 'null' => true, 'default' => null),
'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1), 'locale' => array('column' => 'locale', 'unique' => 0), 'model' => array('column' => 'model', 'unique' => 0), 'row_id' => array('column' => 'foreign_key', 'unique' => 0), 'field' => array('column' => 'field', 'unique' => 0))
);
public $i18n = [
'id' => ['type' => 'integer', 'null' => false, 'default' => null, 'length' => 10, 'key' => 'primary'],
'locale' => ['type' => 'string', 'null' => false, 'length' => 6, 'key' => 'index'],
'model' => ['type' => 'string', 'null' => false, 'key' => 'index'],
'foreign_key' => ['type' => 'integer', 'null' => false, 'length' => 10, 'key' => 'index'],
'field' => ['type' => 'string', 'null' => false, 'key' => 'index'],
'content' => ['type' => 'text', 'null' => true, 'default' => null],
'indexes' => ['PRIMARY' => ['column' => 'id', 'unique' => 1], 'locale' => ['column' => 'locale', 'unique' => 0], 'model' => ['column' => 'model', 'unique' => 0], 'row_id' => ['column' => 'foreign_key', 'unique' => 0], 'field' => ['column' => 'field', 'unique' => 0]]
];

}
16 changes: 8 additions & 8 deletions app/Config/Schema/sessions.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class SessionsSchema extends CakeSchema {
* @param array $event Schema object properties
* @return bool Should process continue
*/
public function before($event = array()) {
public function before($event = []) {
return true;
}

Expand All @@ -47,19 +47,19 @@ public function before($event = array()) {
* @param array $event Schema object properties
* @return void
*/
public function after($event = array()) {
public function after($event = []) {
}

/**
* The cake_sessions table definition
*
* @var array
*/
public $cake_sessions = array(
'id' => array('type' => 'string', 'null' => false, 'key' => 'primary'),
'data' => array('type' => 'text', 'null' => true, 'default' => null),
'expires' => array('type' => 'integer', 'null' => true, 'default' => null),
'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1))
);
public $cake_sessions = [
'id' => ['type' => 'string', 'null' => false, 'key' => 'primary'],
'data' => ['type' => 'text', 'null' => true, 'default' => null],
'expires' => ['type' => 'integer', 'null' => true, 'default' => null],
'indexes' => ['PRIMARY' => ['column' => 'id', 'unique' => 1]]
];

}
22 changes: 11 additions & 11 deletions app/Config/acl.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,32 +114,32 @@
* The role map defines how to resolve the user record from your application
* to the roles you defined in the roles configuration.
*/
$config['map'] = array(
$config['map'] = [
'User' => 'User/username',
'Role' => 'User/group_id',
);
];

/**
* define aliases to map your model information to
* the roles defined in your role configuration.
*/
$config['alias'] = array(
$config['alias'] = [
'Role/4' => 'Role/editor',
);
];

/**
* role configuration
*/
$config['roles'] = array(
$config['roles'] = [
'Role/admin' => null,
);
];

/**
* rule configuration
*/
$config['rules'] = array(
'allow' => array(
$config['rules'] = [
'allow' => [
'*' => 'Role/admin',
),
'deny' => array(),
);
],
'deny' => [],
];
18 changes: 9 additions & 9 deletions app/Config/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
*/

// Setup a 'default' cache configuration for use in the application.
Cache::config('default', array('engine' => 'File'));
Cache::config('default', ['engine' => 'File']);

/**
* The settings below can be used to set additional paths to models, views and controllers.
Expand Down Expand Up @@ -90,22 +90,22 @@
*
* ));
*/
Configure::write('Dispatcher.filters', array(
Configure::write('Dispatcher.filters', [
'AssetDispatcher',
'CacheDispatcher'
));
]);

/**
* Configures default file logging options
*/
App::uses('CakeLog', 'Log');
CakeLog::config('debug', array(
CakeLog::config('debug', [
'engine' => 'File',
'types' => array('notice', 'info', 'debug'),
'types' => ['notice', 'info', 'debug'],
'file' => 'debug',
));
CakeLog::config('error', array(
]);
CakeLog::config('error', [
'engine' => 'File',
'types' => array('warning', 'error', 'critical', 'alert', 'emergency'),
'types' => ['warning', 'error', 'critical', 'alert', 'emergency'],
'file' => 'error',
));
]);
20 changes: 10 additions & 10 deletions app/Config/core.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@
*
* @see ErrorHandler for more information on error handling and configuration.
*/
Configure::write('Error', array(
Configure::write('Error', [
'handler' => 'ErrorHandler::handleError',
'level' => E_ALL & ~E_DEPRECATED,
'trace' => true
));
]);

/**
* Configure the Exception handler used for uncaught exceptions. By default,
Expand All @@ -79,11 +79,11 @@
*
* @see ErrorHandler for more information on exception handling and configuration.
*/
Configure::write('Exception', array(
Configure::write('Exception', [
'handler' => 'ErrorHandler::handleException',
'renderer' => 'ExceptionRenderer',
'log' => true
));
]);

/**
* Application wide charset encoding
Expand Down Expand Up @@ -226,9 +226,9 @@
* To use database sessions, run the app/Config/Schema/sessions.php schema using
* the cake shell command: cake schema create Sessions
*/
Configure::write('Session', array(
Configure::write('Session', [
'defaults' => 'php'
));
]);

/**
* A random string used in security hashing methods.
Expand Down Expand Up @@ -376,22 +376,22 @@
* Configure the cache used for general framework caching. Path information,
* object listings, and translation cache files are stored with this configuration.
*/
Cache::config('_cake_core_', array(
Cache::config('_cake_core_', [
'engine' => $engine,
'prefix' => $prefix . 'cake_core_',
'path' => CACHE . 'persistent' . DS,
'serialize' => ($engine === 'File'),
'duration' => $duration
));
]);

/**
* Configure the cache for model and datasource caches. This cache configuration
* is used to store schema descriptions, and table listings in connections.
*/
Cache::config('_cake_model_', array(
Cache::config('_cake_model_', [
'engine' => $engine,
'prefix' => $prefix . 'cake_model_',
'path' => CACHE . 'models' . DS,
'serialize' => ($engine === 'File'),
'duration' => $duration
));
]);
4 changes: 2 additions & 2 deletions app/Config/routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@
* its action called 'display', and we pass a param to select the view file
* to use (in this case, /app/View/Pages/home.ctp)...
*/
Router::connect('/', array('controller' => 'pages', 'action' => 'display', 'home'));
Router::connect('/', ['controller' => 'pages', 'action' => 'display', 'home']);
/**
* ...and connect the rest of 'Pages' controller's URLs.
*/
Router::connect('/pages/*', array('controller' => 'pages', 'action' => 'display'));
Router::connect('/pages/*', ['controller' => 'pages', 'action' => 'display']);

/**
* Load all plugin routes. See the CakePlugin documentation on
Expand Down
4 changes: 2 additions & 2 deletions app/Console/cake.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
$dispatcher = 'Cake' . DS . 'Console' . DS . 'ShellDispatcher.php';

if (function_exists('ini_set')) {
$root = dirname(dirname(dirname(__FILE__)));
$appDir = basename(dirname(dirname(__FILE__)));
$root = dirname(__FILE__, 3);
$appDir = basename(dirname(__FILE__, 2));
$install = $root . DS . 'lib';
$composerInstall = $root . DS . $appDir . DS . 'Vendor' . DS . 'cakephp' . DS . 'cakephp' . DS . 'lib';

Expand Down
2 changes: 1 addition & 1 deletion app/Controller/PagesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class PagesController extends AppController {
*
* @var array
*/
public $uses = array();
public $uses = [];

/**
* Displays a view
Expand Down
Loading
Loading