diff --git a/app/webroot/css/cake.generic.css b/app/webroot/css/cake.generic.css
index d3cb21921..1fa723f2e 100644
--- a/app/webroot/css/cake.generic.css
+++ b/app/webroot/css/cake.generic.css
@@ -1,3 +1,28 @@
+/* SVN FILE: $Id$ */
+/**
+ *
+ * PHP versions 4 and 5
+ *
+ * CakePHP(tm) : Rapid Development Framework
- - - +'; + __('Your tmp directory is writable.'); + echo ''; + else: + echo ''; + __('Your tmp directory is NOT writable.'); + echo ''; + endif; +?>
- - '; - echo sprintf(__('%s is being used to cache, to change this edit config'.DS.'core.php ', true), \$settings['engine'] . 'Engine'); - echo '
'; - - echo 'Settings:'; + echo sprintf(__('The %s is being used for caching. To change the config edit APP/config/core.php ', true), ''. \$settings['engine'] . 'Engine'); + echo '
'; + echo ''; + else: + echo ''; + __('Your cache is NOT working. Please check the settings in APP/config/core.php'); + echo '
'; + echo '
-
- ';
- __('Rename config'.DS.'database.php.default to config'.DS.'database.php');
- endif;
- ?>
-
+';
+ __('Your database configuration file is present.');
+ \$filePresent = true;
+ echo '';
+ else:
+ echo '';
+ __('Your database configuration file is NOT present.');
+ echo '
';
+ __('Rename config/database.php.default to config/database.php');
+ echo '';
+ endif;
+?>
- - isConnected()): - __('Cake is able to connect to the database.'); - else: - __('Cake is NOT able to connect to the database.'); - endif; - ?> - +isConnected()): + echo ''; + __('Cake is able to connect to the database.'); + echo ''; + else: + echo ''; + __('Cake is NOT able to connect to the database.'); + echo ''; + endif; +?>
\n"; $output .= "\n"; $output .= "\n"; diff --git a/cake/libs/debugger.php b/cake/libs/debugger.php index 4e2125090..8d78f3722 100644 --- a/cake/libs/debugger.php +++ b/cake/libs/debugger.php @@ -139,6 +139,7 @@ class Debugger extends Object { $level = LOG_WARNING; break; case E_NOTICE: + case E_USER_NOTICE: $error = 'Notice'; $level = LOG_NOTICE; break; @@ -290,7 +291,7 @@ class Debugger extends Object { } elseif (strpos($path, APP) === 0) { $path = r(APP, 'APP' . DS, $path); } elseif (strpos($path, ROOT) === 0) { - $path = r(ROOT, 'ROOT' . DS, $path); + $path = r(ROOT, 'ROOT', $path); } return $path; } diff --git a/cake/libs/error.php b/cake/libs/error.php index 0acca089e..658512263 100644 --- a/cake/libs/error.php +++ b/cake/libs/error.php @@ -101,7 +101,7 @@ class ErrorHandler extends Object{ extract($params); $this->controller->base = $base; $this->controller->webroot = $this->_webroot(); - $this->controller->viewPath='errors'; + $this->controller->viewPath = 'errors'; $this->controller->set(array('code' => $code, 'name' => $name, 'message' => $message, @@ -130,8 +130,8 @@ class ErrorHandler extends Object{ header("HTTP/1.0 404 Not Found"); $this->error(array('code' => '404', - 'name' => __('Not found', true), - 'message' => sprintf(__("The requested address %s was not found on this server.", true), $url, $message), + 'name' => __('Not Found', true), + 'message' => sprintf(__("The requested address %s was not found on this server.", true), "'{$url}'", $message), 'base' => $base)); exit(); } @@ -168,7 +168,9 @@ class ErrorHandler extends Object{ $this->controller->base = $base; $this->controller->webroot = $webroot; $this->controller->viewPath = 'errors'; + $controllerName = str_replace('Controller', '', $className); $this->controller->set(array('controller' => $className, + 'controllerName' => $controllerName, 'action' => $action, 'title' => __('Missing Method in Controller', true))); $this->controller->render('missingAction'); diff --git a/cake/libs/view/templates/errors/error404.ctp b/cake/libs/view/templates/errors/error404.ctp index 59814f139..0a646d060 100644 --- a/cake/libs/view/templates/errors/error404.ctp +++ b/cake/libs/view/templates/errors/error404.ctp @@ -24,5 +24,8 @@ * @license http://www.opensource.org/licenses/mit-license.php The MIT License */ ?> - - + ++ : + +
diff --git a/cake/libs/view/templates/errors/missing_action.ctp b/cake/libs/view/templates/errors/missing_action.ctp index 0797a542c..c32de8938 100644 --- a/cake/libs/view/templates/errors/missing_action.ctp +++ b/cake/libs/view/templates/errors/missing_action.ctp @@ -24,16 +24,30 @@ * @license http://www.opensource.org/licenses/mit-license.php The MIT License */ ?> - - -%1$s is not defined in controller %2$s', true), $action, $controller);?>
--
: -
-<?php
-class extends AppController {
- function () {
- }
-}
-?>
+
+ : + ".$action."", "".$controller."");?>
++ : + ".$controller."::", "".$action."()", APP_DIR.DS."controllers".DS.Inflector::underscore($controller).".php");?> +
++<?php +class extends AppController { + + var $name = ''; + + + function () { + + } + +} +?> ++
+ : + +
\ No newline at end of file diff --git a/cake/libs/view/templates/errors/missing_component_class.ctp b/cake/libs/view/templates/errors/missing_component_class.ctp index ea29b5045..ac151d797 100644 --- a/cake/libs/view/templates/errors/missing_component_class.ctp +++ b/cake/libs/view/templates/errors/missing_component_class.ctp @@ -24,17 +24,23 @@ * @license http://www.opensource.org/licenses/mit-license.php The MIT License */ ?> - +-%1$s you have set in %2$s can\'t be found or doesn\'t exist.', true), $component."Component", $controller."Controller");?> + : + ". $component ."Component", "". $controller ."Controller");?>
-: -
-: -
- -<?php
+
+ : + ". $component ."Component", APP_DIR.DS."controllers".DS."components".DS.$file);?> +
++<?php class Component extends Object {+
-}
-?>
- + +} +?> +
+ : + +
\ No newline at end of file diff --git a/cake/libs/view/templates/errors/missing_component_file.ctp b/cake/libs/view/templates/errors/missing_component_file.ctp index f2d593072..7a0256e08 100644 --- a/cake/libs/view/templates/errors/missing_component_file.ctp +++ b/cake/libs/view/templates/errors/missing_component_file.ctp @@ -24,14 +24,23 @@ * @license http://www.opensource.org/licenses/mit-license.php The MIT License */ ?> - - -: -
-: -
-<?php
+
+ : + +
++ : + ". $component ."Component", APP_DIR.DS."controllers".DS."components".DS.$file);?> +
++<?php class Component extends Object {+
-}
-?>
\ No newline at end of file +} +?> +
+ : + +
\ No newline at end of file diff --git a/cake/libs/view/templates/errors/missing_connection.ctp b/cake/libs/view/templates/errors/missing_connection.ctp index 193ddf730..b4409f1ed 100644 --- a/cake/libs/view/templates/errors/missing_connection.ctp +++ b/cake/libs/view/templates/errors/missing_connection.ctp @@ -24,10 +24,16 @@ * @license http://www.opensource.org/licenses/mit-license.php The MIT License */ ?> - - - -: -
-: -
\ No newline at end of file + ++ : + +
++ : + +
++ : + +
\ No newline at end of file diff --git a/cake/libs/view/templates/errors/missing_controller.ctp b/cake/libs/view/templates/errors/missing_controller.ctp index 0335b9d2e..4b03b87fd 100644 --- a/cake/libs/view/templates/errors/missing_controller.ctp +++ b/cake/libs/view/templates/errors/missing_controller.ctp @@ -24,16 +24,24 @@ * @license http://www.opensource.org/licenses/mit-license.php The MIT License */ ?> - -%s could not be found.', true), $controller);?>
+ ++ : + ".$controller."");?> +
++ : + ".$controller."", APP_DIR.DS."controllers".DS.Inflector::underscore($controller).".php");?> +
++<?php +class extends AppController { -+: -
-: -
-<?php
-class extends AppController {
- var $name = '';
-}
-?>
+ var $name = ''; +} +?> +
+ : +
\ No newline at end of file diff --git a/cake/libs/view/templates/errors/missing_helper_class.ctp b/cake/libs/view/templates/errors/missing_helper_class.ctp index e5afc2d25..c6f7ca34b 100644 --- a/cake/libs/view/templates/errors/missing_helper_class.ctp +++ b/cake/libs/view/templates/errors/missing_helper_class.ctp @@ -24,14 +24,23 @@ * @license http://www.opensource.org/licenses/mit-license.php The MIT License */ ?> - -%s can not be found or does not exist.", true), $helperClass);?>
-: -
-: -
-<?php
-class extends Helper {
-}
-?>
+
+ : + %s can not be found or does not exist.", true), $helperClass);?> +
++ : + +
++<?php +class extends AppHelper { + +} +?> ++
+ : +
\ No newline at end of file diff --git a/cake/libs/view/templates/errors/missing_helper_file.ctp b/cake/libs/view/templates/errors/missing_helper_file.ctp index 61c5805a1..d8d7a798b 100644 --- a/cake/libs/view/templates/errors/missing_helper_file.ctp +++ b/cake/libs/view/templates/errors/missing_helper_file.ctp @@ -24,14 +24,23 @@ * @license http://www.opensource.org/licenses/mit-license.php The MIT License */ ?> - - -: -
-: -
-<?php
-class extends Helper {
-}
-?>
-
+ : + +
++ : + +
++<?php +class extends AppHelper { + +} +?> ++
+ : + +
diff --git a/cake/libs/view/templates/errors/missing_layout.ctp b/cake/libs/view/templates/errors/missing_layout.ctp index b8d60e9a5..83208f499 100644 --- a/cake/libs/view/templates/errors/missing_layout.ctp +++ b/cake/libs/view/templates/errors/missing_layout.ctp @@ -24,9 +24,16 @@ * @license http://www.opensource.org/licenses/mit-license.php The MIT License */ ?> - - -: -
-: -
+ ++ : + ". $file ."");?> +
++ : + ". $file ."");?> +
++ : + +
\ No newline at end of file diff --git a/cake/libs/view/templates/errors/missing_model.ctp b/cake/libs/view/templates/errors/missing_model.ctp index 90a3414b5..38c2fc8b4 100644 --- a/cake/libs/view/templates/errors/missing_model.ctp +++ b/cake/libs/view/templates/errors/missing_model.ctp @@ -24,15 +24,25 @@ * @license http://www.opensource.org/licenses/mit-license.php The MIT License */ ?> - -%s model.", true), $model);?>
-: -
-: -
-<?php
-class extends AppModel {
- var $name = '';
-}
-?>
+
+ : + %s could not be found.", true), $model);?> +
++ : + ". $model . "", APP_DIR.DS."models".DS.Inflector::underscore($model).".php");?> +
++<?php +class extends AppModel { + + var $name = ''; + +} +?> ++
+ : +
\ No newline at end of file diff --git a/cake/libs/view/templates/errors/missing_scaffolddb.ctp b/cake/libs/view/templates/errors/missing_scaffolddb.ctp index 4b30cadc6..daea67652 100644 --- a/cake/libs/view/templates/errors/missing_scaffolddb.ctp +++ b/cake/libs/view/templates/errors/missing_scaffolddb.ctp @@ -24,9 +24,16 @@ * @license http://www.opensource.org/licenses/mit-license.php The MIT License */ ?> - - -: -
-: -
\ No newline at end of file + ++ : + +
++ : + +
++ : + +
\ No newline at end of file diff --git a/cake/libs/view/templates/errors/missing_table.ctp b/cake/libs/view/templates/errors/missing_table.ctp index 062c2c319..ff00d84f5 100644 --- a/cake/libs/view/templates/errors/missing_table.ctp +++ b/cake/libs/view/templates/errors/missing_table.ctp @@ -24,7 +24,12 @@ * @license http://www.opensource.org/licenses/mit-license.php The MIT License */ ?> - - -: -
+ ++ : + ". $table ."", "". $model ."");?> +
++ : + +
diff --git a/cake/libs/view/templates/errors/missing_view.ctp b/cake/libs/view/templates/errors/missing_view.ctp index 2d8599163..772240001 100644 --- a/cake/libs/view/templates/errors/missing_view.ctp +++ b/cake/libs/view/templates/errors/missing_view.ctp @@ -24,9 +24,16 @@ * @license http://www.opensource.org/licenses/mit-license.php The MIT License */ ?> - -%1$s::%2$s(), could not be found.', true), $controller.'Controller', $action);?>
-: -
-: -
\ No newline at end of file + ++ : + ". $controller."Controller::", "". $action ."()");?> +
++ : + +
++ : + +
\ No newline at end of file diff --git a/cake/libs/view/templates/errors/private_action.ctp b/cake/libs/view/templates/errors/private_action.ctp index 522d0318f..57bfd0793 100644 --- a/cake/libs/view/templates/errors/private_action.ctp +++ b/cake/libs/view/templates/errors/private_action.ctp @@ -24,7 +24,12 @@ * @license http://www.opensource.org/licenses/mit-license.php The MIT License */ ?> - -%s should not be accessed directly.", true), $action);?>
-: -
\ No newline at end of file + ++ : + ". $controller ."::", "". $action ."()");?> +
++ : + +
\ No newline at end of file diff --git a/cake/libs/view/templates/errors/scaffold_error.ctp b/cake/libs/view/templates/errors/scaffold_error.ctp index 383a20b27..6663a1b67 100644 --- a/cake/libs/view/templates/errors/scaffold_error.ctp +++ b/cake/libs/view/templates/errors/scaffold_error.ctp @@ -24,11 +24,19 @@ * @license http://www.opensource.org/licenses/mit-license.php The MIT License */ ?> - - -: -
-
- function _scaffoldError() {
- }
-
+ : + +
++ : + +
++<?php +function _scaffoldError() {\ No newline at end of file diff --git a/cake/libs/view/templates/pages/home.ctp b/cake/libs/view/templates/pages/home.ctp index 0c146db6c..206a095e5 100644 --- a/cake/libs/view/templates/pages/home.ctp +++ b/cake/libs/view/templates/pages/home.ctp @@ -24,99 +24,95 @@ * @license http://www.opensource.org/licenses/mit-license.php The MIT License */ ?> + + 0): Debugger::checkSessionKey(); endif; ?>
+ +} +?> +
- - '; __('Your tmp directory is writable.'); - else: + echo ''; + else: + echo ''; __('Your tmp directory is NOT writable.'); - endif; - ?> - + echo ''; + endif; + ?>
-
- ';
echo ' ';
- echo sprintf(__('%s is being used to cache, to change this edit config/core.php ', true), $settings['engine'] . 'Engine');
+ echo sprintf(__('The %s is being used for caching. To change the config edit APP/config/core.php ', true), ''. $settings['engine'] . 'Engine');
echo '';
- foreach ($settings as $name => $value):
- echo '
';
-
- else:
- __('Your cache is NOT working.');
- echo '
';
- if (is_writable(TMP . 'cache')):
- __('Edit: config/core.php to insure you have the newset version of this file and the variable $cakeCache set properly');
- else:
- __('Your cache directory is not writable');
- endif;
- endif;
- ?>
-
+ echo '';
+ else:
+ echo '
'; + __('Your cache is NOT working. Please check the settings in APP/config/core.php'); + echo '
'; + echo '
-
- ';
__('Your database configuration file is present.');
$filePresent = true;
- else:
+ echo '';
+ else:
+ echo '';
__('Your database configuration file is NOT present.');
echo '
';
__('Rename config/database.php.default to config/database.php');
- endif;
- ?>
-
+ echo '';
+ endif;
+ ?>
- - isConnected()): - __('Cake is able to connect to the database.'); - else: + isConnected()): + echo ''; + __('Cake is able to connect to the database.'); + echo ''; + else: + echo ''; __('Cake is NOT able to connect to the database.'); - endif; - ?> - + echo ''; + endif; + ?>
- - - +
-To change its layout, edit: app/views/layouts/default.ctp.
-You can also add some CSS styles for your pages at: /app/webroot/css.');
+__('To change the content of this page, edit: APP/views/pages/home.ctp.
+To change its layout, edit: APP/views/layouts/default.ctp.
+You can also add some CSS styles for your pages at: APP/webroot/css.');
?>
diff --git a/cake/tests/cases/libs/error.test.php b/cake/tests/cases/libs/error.test.php index 3c97886e0..75e352fc8 100644 --- a/cake/tests/cases/libs/error.test.php +++ b/cake/tests/cases/libs/error.test.php @@ -34,9 +34,69 @@ uses('error'); * @subpackage cake.tests.cases.libs */ class ErrorHandlerTest extends UnitTestCase { - + function skip() { - $this->skipif (true, 'ConfigureTest not implemented'); + $this->skipif (true, 'ErrorHandlerTest not implemented'); + } + + function testError() { + + } + + function testError404() { + + } + + function testMissingController() { + + } + + function testMissingAction() { + + } + + function testPrivateAction() { + + } + + function testMissingTable() { + + } + + function testMissingDatabase() { + + } + + function testMissingView() { + + } + + function testMissingLayout() { + + } + + function testMissingConnection() { + + } + + function testMissingHelperFile() { + + } + + function testMissingHelperClass() { + + } + + function testMissingComponentFile() { + + } + + function testMissingComponentClass() { + + } + + function testMissingModel() { + } } ?> \ No newline at end of file