updating view error handling, fixes #4069 and fixes #4073, added long dash to escaped chr in http socket

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6439 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
gwoo 2008-02-06 07:30:49 +00:00
parent 89052b0f54
commit 6abbb882f5
2 changed files with 6 additions and 2 deletions

View file

@ -931,7 +931,7 @@ class HttpSocket extends CakeSocket {
if (!empty($chars)) {
$escape = $chars;
} else {
$escape = array('"', "(", ")", "<", ">", "@", ",", ";", ":", "\\", "/", "[", "]", "?", "=", "{", "}", " ");
$escape = array('"', "(", ")", "<", ">", "@", ",", ";", ":", "\\", "/", "[", "]", "?", "=", "{", "}", " ", "");
for ($i = 0; $i <= 31; $i++) {
$escape[] = chr($i);
}

View file

@ -400,7 +400,7 @@ class View extends Object {
return $this->_render($file, array_merge($this->viewVars, $params), $loadHelpers);
}
$file = $paths[0] . 'views' . DS . 'elements' . DS . $name . $this->ext;
$file = $paths[0] . 'elements' . DS . $name . $this->ext;
if (Configure::read() > 0) {
return "Not Found: " . $file;
@ -845,6 +845,10 @@ class View extends Object {
* @return cakeError
*/
function _missingView($file, $error = 'missingView') {
if (Configure::read() == 0) {
$this->cakeError('error404');
exit();
}
$paths = $this->_paths($this->plugin);
$name = 'errors' . DS . Inflector::underscore($error);