Browse Source

Removed scaffold left overs.

ADmad 12 years ago
parent
commit
01340767b6

+ 1 - 6
src/Controller/Component/AuthComponent.php

@@ -288,12 +288,7 @@ class AuthComponent extends Component {
 		$methods = array_flip(array_map('strtolower', $controller->methods));
 		$action = strtolower($controller->request->params['action']);
 
-		$isMissingAction = (
-			$controller->scaffold === false &&
-			!isset($methods[$action])
-		);
-
-		if ($isMissingAction) {
+		if (!isset($methods[$action])) {
 			return true;
 		}
 

+ 1 - 2
src/Controller/Controller.php

@@ -384,8 +384,7 @@ class Controller extends Object implements EventListener {
  * @param Cake\Network\Request $request
  * @return mixed The resulting response.
  * @throws Cake\Error\PrivateActionException When actions are not public or prefixed by _
- * @throws Cake\Error\MissingActionException When actions are not defined and scaffolding is
- *    not enabled.
+ * @throws Cake\Error\MissingActionException When actions are not defined.
  */
 	public function invokeAction(Request $request) {
 		try {

+ 0 - 35
src/Template/Error/scaffold_error.ctp

@@ -1,35 +0,0 @@
-<?php
-/**
- *
- *
- * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
- * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
- *
- * Licensed under The MIT License
- * For full copyright and license information, please see the LICENSE.txt
- * Redistributions of files must retain the above copyright notice.
- *
- * @copyright     Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
- * @link          http://cakephp.org CakePHP(tm) Project
- * @since         CakePHP(tm) v 0.10.0.1076
- * @license       http://www.opensource.org/licenses/mit-license.php MIT License
- */
-?>
-<h2>Scaffold Error</h2>
-<p class="error">
-	<strong>Error: </strong>
-	Method _scaffoldError in was not found in the controller
-</p>
-<p class="notice">
-	<strong>Notice: </strong>
-	<?= sprintf('If you want to customize this error message, create %s', APP_DIR . DS . 'Template' . DS . 'Error' . DS . 'scaffold_error.ctp'); ?>
-</p>
-<pre>
-&lt;?php
-function _scaffoldError() {<br />
-
-}
-
-</pre>
-
-<?= $this->element('exception_stack_trace'); ?>

+ 0 - 4
tests/TestCase/Controller/Component/AuthComponentTest.php

@@ -130,10 +130,6 @@ class AuthComponentTest extends TestCase {
 		$this->Controller->name = 'Post';
 		$this->Controller->request['action'] = 'thisdoesnotexist';
 		$this->assertTrue($this->Controller->Auth->startup($event));
-
-		$this->Controller->scaffold = null;
-		$this->Controller->request['action'] = 'index';
-		$this->assertFalse($this->Controller->Auth->startup($event));
 	}
 
 /**