euromark 12 years ago
parent
commit
9686ce6a89
1 changed files with 10 additions and 9 deletions
  1. 10 9
      Controller/Component/AjaxComponent.php

+ 10 - 9
Controller/Component/AjaxComponent.php

@@ -1,4 +1,5 @@
 <?php
+
 App::uses('Component', 'Controller');
 
 /**
@@ -27,12 +28,12 @@ class AjaxComponent extends Component {
 		'flashKey' => 'Message.flash' // Use "messages" for Tools plugin, set to false to disable
 	);
 
-/**
- * Constructor.
- *
- * @param ComponentCollection $collection
- * @param array $settings
- */
+	/**
+	 * Constructor.
+	 *
+	 * @param ComponentCollection $collection
+	 * @param array $settings
+	 */
 	public function __construct(ComponentCollection $collection, $settings = array()) {
 		$settings = array_merge($this->_defaults, (array)Configure::read('Ajax'), $settings);
 		parent::__construct($collection, $settings);
@@ -71,9 +72,9 @@ class AjaxComponent extends Component {
 
 		// Set flash messages to the view
 		if ($this->settings['flashKey']) {
-	    $_message = $this->Session->read($this->settings['flashKey']);
-	    $this->Session->delete($this->settings['flashKey']);
-	    $this->Controller->set(compact('_message'));
+			$_message = $this->Session->read($this->settings['flashKey']);
+			$this->Session->delete($this->settings['flashKey']);
+			$this->Controller->set(compact('_message'));
 		}
 	}