Browse Source

Merge pull request #1510 from dereuromark/2.4-controller-flash

2.4 controller flash
Mark Story 12 years ago
parent
commit
ec8a3d531e

+ 2 - 2
lib/Cake/Controller/Component/AclComponent.php

@@ -156,7 +156,7 @@ class AclComponent extends Component {
  * @param array|string|Model $aco ACO The controlled object identifier. See `AclNode::node()` for possible formats
  * @param array|string|Model $aco ACO The controlled object identifier. See `AclNode::node()` for possible formats
  * @param string $action Action (defaults to *)
  * @param string $action Action (defaults to *)
  * @return boolean Success
  * @return boolean Success
- * @deprecated
+ * @deprecated Will be removed in 3.0.
  */
  */
 	public function grant($aro, $aco, $action = "*") {
 	public function grant($aro, $aco, $action = "*") {
 		trigger_error(__d('cake_dev', 'AclComponent::grant() is deprecated, use allow() instead'), E_USER_WARNING);
 		trigger_error(__d('cake_dev', 'AclComponent::grant() is deprecated, use allow() instead'), E_USER_WARNING);
@@ -170,7 +170,7 @@ class AclComponent extends Component {
  * @param array|string|Model $aco ACO The controlled object identifier. See `AclNode::node()` for possible formats
  * @param array|string|Model $aco ACO The controlled object identifier. See `AclNode::node()` for possible formats
  * @param string $action Action (defaults to *)
  * @param string $action Action (defaults to *)
  * @return boolean Success
  * @return boolean Success
- * @deprecated
+ * @deprecated Will be removed in 3.0.
  */
  */
 	public function revoke($aro, $aco, $action = "*") {
 	public function revoke($aro, $aco, $action = "*") {
 		trigger_error(__d('cake_dev', 'AclComponent::revoke() is deprecated, use deny() instead'), E_USER_WARNING);
 		trigger_error(__d('cake_dev', 'AclComponent::revoke() is deprecated, use deny() instead'), E_USER_WARNING);

+ 10 - 9
lib/Cake/Controller/Controller.php

@@ -705,7 +705,7 @@ class Controller extends Object implements CakeEventListener {
  *
  *
  * @return array Associative array of the HTTP codes as keys, and the message
  * @return array Associative array of the HTTP codes as keys, and the message
  *    strings as values, or null of the given $code does not exist.
  *    strings as values, or null of the given $code does not exist.
- * @deprecated Use CakeResponse::httpCodes();
+ * @deprecated Since 2.4. Will be removed in 3.0. Use CakeResponse::httpCodes().
  */
  */
 	public function httpCodes($code = null) {
 	public function httpCodes($code = null) {
 		return $this->response->httpCodes($code);
 		return $this->response->httpCodes($code);
@@ -820,7 +820,7 @@ class Controller extends Object implements CakeEventListener {
  *
  *
  * @param string $status The header message that is being set.
  * @param string $status The header message that is being set.
  * @return void
  * @return void
- * @deprecated Use CakeResponse::header()
+ * @deprecated Will be removed in 3.0. Use CakeResponse::header().
  */
  */
 	public function header($status) {
 	public function header($status) {
 		$this->response->header($status);
 		$this->response->header($status);
@@ -978,7 +978,7 @@ class Controller extends Object implements CakeEventListener {
  *
  *
  * @return void
  * @return void
  * @link http://book.cakephp.org/2.0/en/controllers.html#Controller::disableCache
  * @link http://book.cakephp.org/2.0/en/controllers.html#Controller::disableCache
- * @deprecated Use CakeResponse::disableCache()
+ * @deprecated Will be removed in 3.0. Use CakeResponse::disableCache().
  */
  */
 	public function disableCache() {
 	public function disableCache() {
 		$this->response->disableCache();
 		$this->response->disableCache();
@@ -995,6 +995,7 @@ class Controller extends Object implements CakeEventListener {
  * @param string $layout Layout you want to use, defaults to 'flash'
  * @param string $layout Layout you want to use, defaults to 'flash'
  * @return void
  * @return void
  * @link http://book.cakephp.org/2.0/en/controllers.html#Controller::flash
  * @link http://book.cakephp.org/2.0/en/controllers.html#Controller::flash
+ * @deprecated Will be removed in 3.0. Use Session::setFlash().
  */
  */
 	public function flash($message, $url, $pause = 1, $layout = 'flash') {
 	public function flash($message, $url, $pause = 1, $layout = 'flash') {
 		$this->autoRender = false;
 		$this->autoRender = false;
@@ -1015,7 +1016,7 @@ class Controller extends Object implements CakeEventListener {
  * @param boolean $exclusive If true, and $op is an array, fields not included in $op will not be
  * @param boolean $exclusive If true, and $op is an array, fields not included in $op will not be
  *        included in the returned conditions
  *        included in the returned conditions
  * @return array An array of model conditions
  * @return array An array of model conditions
- * @deprecated Will be removed in 3.0
+ * @deprecated Will be removed in 3.0.
  */
  */
 	public function postConditions($data = array(), $op = null, $bool = 'AND', $exclusive = false) {
 	public function postConditions($data = array(), $op = null, $bool = 'AND', $exclusive = false) {
 		if (!is_array($data) || empty($data)) {
 		if (!is_array($data) || empty($data)) {
@@ -1072,7 +1073,7 @@ class Controller extends Object implements CakeEventListener {
  * @param array $whitelist List of allowed options for paging
  * @param array $whitelist List of allowed options for paging
  * @return array Model query results
  * @return array Model query results
  * @link http://book.cakephp.org/2.0/en/controllers.html#Controller::paginate
  * @link http://book.cakephp.org/2.0/en/controllers.html#Controller::paginate
- * @deprecated Use PaginatorComponent instead
+ * @deprecated Will be removed in 3.0. Use PaginatorComponent instead.
  */
  */
 	public function paginate($object = null, $scope = array(), $whitelist = array()) {
 	public function paginate($object = null, $scope = array(), $whitelist = array()) {
 		return $this->Components->load('Paginator', $this->paginate)->paginate($object, $scope, $whitelist);
 		return $this->Components->load('Paginator', $this->paginate)->paginate($object, $scope, $whitelist);
@@ -1146,7 +1147,7 @@ class Controller extends Object implements CakeEventListener {
  * @param string $method
  * @param string $method
  * @return boolean
  * @return boolean
  * @see Controller::beforeScaffold()
  * @see Controller::beforeScaffold()
- * @deprecated
+ * @deprecated Will be removed in 3.0.
  */
  */
 	protected function _beforeScaffold($method) {
 	protected function _beforeScaffold($method) {
 		return $this->beforeScaffold($method);
 		return $this->beforeScaffold($method);
@@ -1169,7 +1170,7 @@ class Controller extends Object implements CakeEventListener {
  * @param string $method
  * @param string $method
  * @return boolean
  * @return boolean
  * @see Controller::afterScaffoldSave()
  * @see Controller::afterScaffoldSave()
- * @deprecated
+ * @deprecated Will be removed in 3.0.
  */
  */
 	protected function _afterScaffoldSave($method) {
 	protected function _afterScaffoldSave($method) {
 		return $this->afterScaffoldSave($method);
 		return $this->afterScaffoldSave($method);
@@ -1192,7 +1193,7 @@ class Controller extends Object implements CakeEventListener {
  * @param string $method
  * @param string $method
  * @return boolean
  * @return boolean
  * @see Controller::afterScaffoldSaveError()
  * @see Controller::afterScaffoldSaveError()
- * @deprecated
+ * @deprecated Will be removed in 3.0.
  */
  */
 	protected function _afterScaffoldSaveError($method) {
 	protected function _afterScaffoldSaveError($method) {
 		return $this->afterScaffoldSaveError($method);
 		return $this->afterScaffoldSaveError($method);
@@ -1217,7 +1218,7 @@ class Controller extends Object implements CakeEventListener {
  * @param string $method
  * @param string $method
  * @return boolean
  * @return boolean
  * @see Controller::scaffoldError()
  * @see Controller::scaffoldError()
- * @deprecated
+ * @deprecated Will be removed in 3.0.
  */
  */
 	protected function _scaffoldError($method) {
 	protected function _scaffoldError($method) {
 		return $this->scaffoldError($method);
 		return $this->scaffoldError($method);

+ 2 - 2
lib/Cake/Model/BehaviorCollection.php

@@ -76,7 +76,7 @@ class BehaviorCollection extends ObjectCollection implements CakeEventListener {
  * @param string $behavior
  * @param string $behavior
  * @param array $config
  * @param array $config
  * @return void
  * @return void
- * @deprecated Replaced with load()
+ * @deprecated Will be removed in 3.0. Replaced with load().
  */
  */
 	public function attach($behavior, $config = array()) {
 	public function attach($behavior, $config = array()) {
 		return $this->load($behavior, $config);
 		return $this->load($behavior, $config);
@@ -206,7 +206,7 @@ class BehaviorCollection extends ObjectCollection implements CakeEventListener {
  *
  *
  * @param string $name Name of behavior
  * @param string $name Name of behavior
  * @return void
  * @return void
- * @deprecated Use unload instead.
+ * @deprecated Will be removed in 3.0. Use unload instead.
  */
  */
 	public function detach($name) {
 	public function detach($name) {
 		return $this->unload($name);
 		return $this->unload($name);

+ 1 - 1
lib/Cake/Utility/Debugger.php

@@ -203,7 +203,7 @@ class Debugger {
  * @param integer $line Line that triggered the error
  * @param integer $line Line that triggered the error
  * @param array $context Context
  * @param array $context Context
  * @return boolean true if error was handled
  * @return boolean true if error was handled
- * @deprecated This function is superseded by Debugger::outputError()
+ * @deprecated Will be removed in 3.0. This function is superseded by Debugger::outputError().
  */
  */
 	public static function showError($code, $description, $file = null, $line = null, $context = null) {
 	public static function showError($code, $description, $file = null, $line = null, $context = null) {
 		$self = Debugger::getInstance();
 		$self = Debugger::getInstance();

+ 1 - 1
lib/Cake/Utility/ObjectCollection.php

@@ -272,7 +272,7 @@ abstract class ObjectCollection {
  *   returns an array of currently-attached objects
  *   returns an array of currently-attached objects
  * @return mixed If $name is specified, returns the boolean status of the corresponding object.
  * @return mixed If $name is specified, returns the boolean status of the corresponding object.
  *    Otherwise, returns an array of all attached objects.
  *    Otherwise, returns an array of all attached objects.
- * @deprecated Use loaded instead.
+ * @deprecated Will be removed in 3.0. Use loaded instead.
  */
  */
 	public function attached($name = null) {
 	public function attached($name = null) {
 		return $this->loaded($name);
 		return $this->loaded($name);

+ 1 - 1
lib/Cake/Utility/Security.php

@@ -180,7 +180,7 @@ class Security {
  * @param string $text Encrypted string to decrypt, normal string to encrypt
  * @param string $text Encrypted string to decrypt, normal string to encrypt
  * @param string $key Key to use
  * @param string $key Key to use
  * @return string Encrypted/Decrypted string
  * @return string Encrypted/Decrypted string
- * @deprecated This method will be removed in 3.x
+ * @deprecated Will be removed in 3.0.
  */
  */
 	public static function cipher($text, $key) {
 	public static function cipher($text, $key) {
 		if (empty($key)) {
 		if (empty($key)) {

+ 1 - 1
lib/Cake/basics.php

@@ -391,7 +391,7 @@ if (!function_exists('cache')) {
  * @param mixed $expires A valid strtotime string when the data expires.
  * @param mixed $expires A valid strtotime string when the data expires.
  * @param string $target The target of the cached data; either 'cache' or 'public'.
  * @param string $target The target of the cached data; either 'cache' or 'public'.
  * @return mixed The contents of the temporary file.
  * @return mixed The contents of the temporary file.
- * @deprecated Please use Cache::write() instead
+ * @deprecated Will be removed in 3.0. Please use Cache::write() instead.
  */
  */
 	function cache($path, $data = null, $expires = '+1 day', $target = 'cache') {
 	function cache($path, $data = null, $expires = '+1 day', $target = 'cache') {
 		if (Configure::read('Cache.disable')) {
 		if (Configure::read('Cache.disable')) {