From a0110c420501f248de54aec3bb3b55d6322e3acd Mon Sep 17 00:00:00 2001 From: Xemle Date: Wed, 2 Oct 2013 10:10:47 +0200 Subject: [PATCH] Upgrade to cakephp 2.4.1 Please run `git submodule update` --- Config/bootstrap.php | 46 +++++++++++++++---------------- Config/core.php | 43 +++++++++++++++++++++++++---- Model/AppModel.php | 4 +-- Model/Behavior/CipherBehavior.php | 2 +- cakephp | 2 +- 5 files changed, 64 insertions(+), 33 deletions(-) diff --git a/Config/bootstrap.php b/Config/bootstrap.php index efc58ee3..67f120ae 100644 --- a/Config/bootstrap.php +++ b/Config/bootstrap.php @@ -21,7 +21,7 @@ * @link http://cakephp.org CakePHP(tm) Project * @package app.Config * @since CakePHP(tm) v 0.10.8.2117 - * @license MIT License (http://www.opensource.org/licenses/mit-license.php) + * @license http://www.opensource.org/licenses/mit-license.php MIT License */ // Setup a 'default' cache configuration for use in the application. @@ -31,24 +31,24 @@ * 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'), + * '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/'), * )); * */ @@ -75,7 +75,7 @@ */ /** - * You can attach event listeners to the request lifecyle as Dispatcher Filter . By Default CakePHP bundles two filters: + * 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 @@ -100,17 +100,17 @@ */ App::uses('CakeLog', 'Log'); CakeLog::config('debug', array( - 'engine' => 'FileLog', + 'engine' => 'File', 'types' => array('notice', 'info', 'debug'), 'file' => 'debug', )); CakeLog::config('error', array( - 'engine' => 'FileLog', + 'engine' => 'File', 'types' => array('warning', 'error', 'critical', 'alert', 'emergency'), 'file' => 'error', )); CakeLog::config('full', array( - 'engine' => 'FileLog', + 'engine' => 'File', 'types' => array('debug', 'info', 'notice', 'warning', 'error', 'critical', 'alert', 'emergency'), 'file' => 'logger', )); diff --git a/Config/core.php b/Config/core.php index 93306a4e..f2ab9a46 100644 --- a/Config/core.php +++ b/Config/core.php @@ -17,7 +17,7 @@ * @link http://cakephp.org CakePHP(tm) Project * @package app.Config * @since CakePHP(tm) v 0.2.9 - * @license MIT License (http://www.opensource.org/licenses/mit-license.php) + * @license http://www.opensource.org/licenses/mit-license.php MIT License */ /** @@ -70,6 +70,9 @@ * - `renderer` - string - The class responsible for rendering uncaught exceptions. If you choose a custom class you * should place the file for that class in app/Lib/Error. This class needs to implement a render method. * - `log` - boolean - Should Exceptions be logged? + * - `skipLog` - array - list of exceptions to skip for logging. Exceptions that + * extend one of the listed exceptions will also be skipped for logging. + * Example: `'skipLog' => array('NotFoundException', 'UnauthorizedException')` * * @see ErrorHandler for more information on exception handling and configuration. */ @@ -136,6 +139,33 @@ */ //Configure::write('App.baseUrl', env('SCRIPT_NAME')); +/** + * To configure CakePHP to use a particular domain URL + * for any URL generation inside the application, set the following + * configuration variable to the http(s) address to your domain. This + * will override the automatic detection of full base URL and can be + * useful when generating links from the CLI (e.g. sending emails) + */ + //Configure::write('App.fullBaseUrl', 'http://example.com'); + +/** + * Web path to the public images directory under webroot. + * If not set defaults to 'img/' + */ + //Configure::write('App.imageBaseUrl', 'img/'); + +/** + * Web path to the CSS files directory under webroot. + * If not set defaults to 'css/' + */ + //Configure::write('App.cssBaseUrl', 'css/'); + +/** + * Web path to the js files directory under webroot. + * If not set defaults to 'js/' + */ + //Configure::write('App.jsBaseUrl', 'js/'); + /** * Uncomment the define below to use CakePHP prefix routes. * @@ -204,7 +234,7 @@ * value to false, when dealing with older versions of IE, Chrome Frame or certain web-browsing devices and AJAX * - `Session.defaults` - The default configuration set to use as a basis for your session. * There are four builtins: php, cake, cache, database. - * - `Session.handler` - Can be used to enable a custom session handler. Expects an array of of callables, + * - `Session.handler` - Can be used to enable a custom session handler. Expects an array of callables, * that can be used with `session_save_handler`. Using this option will automatically add `session.save_handler` * to the ini array. * - `Session.autoRegenerate` - Enabling this setting, turns on automatic renewal of sessions, and @@ -241,7 +271,7 @@ /** * Apply timestamps with the last modified time to static assets (js, css, images). - * Will append a querystring parameter containing the time the file was modified. This is + * Will append a query string parameter containing the time the file was modified. This is * useful for invalidating browser caches. * * Set to `true` to apply timestamps when debug > 0. Set to 'force' to always enable @@ -275,7 +305,7 @@ Configure::write('Sass.extensions', array('Compass' => array('fonts_path' => '../fonts'))); /** - * The classname and database used in CakePHP's + * The class name and database used in CakePHP's * access control lists. */ Configure::write('Acl.classname', 'DbAcl'); @@ -307,7 +337,8 @@ * 'path' => CACHE, //[optional] use system tmp directory - remember to use absolute path * 'prefix' => 'cake_', //[optional] prefix every cache file with this string * 'lock' => false, //[optional] use file locking - * 'serialize' => true, [optional] + * 'serialize' => true, //[optional] + * 'mask' => 0664, //[optional] * )); * * APC (http://pecl.php.net/package/APC) @@ -361,7 +392,7 @@ * By default File is used, but for improved performance you should use APC. * * Note: 'default' and other application caches should be configured in app/Config/bootstrap.php. - * Please check the comments in boostrap.php for more info on the cache engines available + * Please check the comments in bootstrap.php for more info on the cache engines available * and their settings. */ $engine = 'File'; diff --git a/Model/AppModel.php b/Model/AppModel.php index 946b25d0..1afe89b1 100644 --- a/Model/AppModel.php +++ b/Model/AppModel.php @@ -23,8 +23,8 @@ class AppModel extends Model { * * @param boolean $created */ - public function afterSave($created) { - parent::afterSave($created); + public function afterSave($created, $options = array()) { + parent::afterSave($created, $options); $this->getEventManager()->dispatch(new CakeEvent('Model.'.$this->alias.'.afterSave', $this, $this->data)); } diff --git a/Model/Behavior/CipherBehavior.php b/Model/Behavior/CipherBehavior.php index 313ffca9..f387a74d 100644 --- a/Model/Behavior/CipherBehavior.php +++ b/Model/Behavior/CipherBehavior.php @@ -74,7 +74,7 @@ public function setup(Model $model, $config = array()) { /** Model hook to encrypt model data @param model Current model */ - public function beforeSave(Model $model) { + public function beforeSave(Model $model, $options = array()) { if (isset($this->config[$model->name]) && !$this->config[$model->name]['noEncypt']) { if (!is_array($this->config[$model->name]['cipher'])) { $cipher = array($this->config[$model->name]['cipher']); diff --git a/cakephp b/cakephp index a079ca3f..085636ea 160000 --- a/cakephp +++ b/cakephp @@ -1 +1 @@ -Subproject commit a079ca3f1c79a36d9d1552679d148bd75920e123 +Subproject commit 085636ea1bb2a57b084456e776bfada01dee71df