Skip to content

Commit

Permalink
Merge branch 'master' into virtualcondition
Browse files Browse the repository at this point in the history
  • Loading branch information
ceeram committed Nov 2, 2012
2 parents babd714 + 118dd8c commit 6a98695
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 14 deletions.
2 changes: 2 additions & 0 deletions lib/Cake/Controller/CakeErrorController.php
Expand Up @@ -19,6 +19,8 @@
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/

App::uses('AppController', 'Controller');

/**
* Error Handling Controller
*
Expand Down
5 changes: 2 additions & 3 deletions lib/Cake/Error/ExceptionRenderer.php
Expand Up @@ -142,15 +142,14 @@ public function __construct(Exception $exception) {
* @return Controller
*/
protected function _getController($exception) {
App::uses('AppController', 'Controller');
App::uses('CakeErrorController', 'Controller');
if (!$request = Router::getRequest(true)) {
$request = new CakeRequest();
}
$response = new CakeResponse(array('charset' => Configure::read('App.encoding')));
try {
if (class_exists('AppController')) {
$controller = new CakeErrorController($request, $response);
}
$controller = new CakeErrorController($request, $response);
} catch (Exception $e) {
}
if (empty($controller)) {
Expand Down
1 change: 0 additions & 1 deletion lib/Cake/Test/Case/Error/ExceptionRendererTest.php
Expand Up @@ -19,7 +19,6 @@

App::uses('ExceptionRenderer', 'Error');
App::uses('Controller', 'Controller');
App::uses('AppController', 'Controller');
App::uses('Component', 'Controller');
App::uses('Router', 'Routing');

Expand Down
11 changes: 7 additions & 4 deletions lib/Cake/Test/Case/Model/Behavior/TreeBehaviorScopedTest.php
Expand Up @@ -175,6 +175,7 @@ public function testTranslatingTree() {
$this->Tree->locale = 'eng';
$data = array('FlagTree' => array(
'title' => 'name #1',
'name' => 'test',
'locale' => 'eng',
'parent_id' => null,
));
Expand All @@ -183,7 +184,7 @@ public function testTranslatingTree() {
$expected = array(array('FlagTree' => array(
'id' => 1,
'title' => 'name #1',
'name' => '',
'name' => 'test',
'parent_id' => null,
'lft' => 1,
'rght' => 2,
Expand All @@ -201,7 +202,7 @@ public function testTranslatingTree() {
$expected = array(array('FlagTree' => array(
'id' => 1,
'title' => 'Named 2',
'name' => '',
'name' => 'test',
'parent_id' => null,
'lft' => 1,
'rght' => 2,
Expand All @@ -218,6 +219,7 @@ public function testTranslatingTree() {
'id' => 1,
'parent_id' => null,
'title' => 'namen #1',
'name' => 'test',
'locale' => 'deu',
));
$this->Tree->save($data);
Expand All @@ -229,7 +231,7 @@ public function testTranslatingTree() {
'FlagTree' => array(
'id' => 1,
'title' => 'namen #1',
'name' => '',
'name' => 'test',
'parent_id' => null,
'lft' => 1,
'rght' => 2,
Expand All @@ -244,6 +246,7 @@ public function testTranslatingTree() {
$this->Tree->locale = 'eng';
$data = array(
'title' => array('eng' => 'New title', 'spa' => 'Nuevo leyenda'),
'name' => 'test',
'parent_id' => null
);
$this->Tree->create($data);
Expand All @@ -260,7 +263,7 @@ public function testTranslatingTree() {
'id' => 2,
'parent_id' => null,
'locale' => 'eng',
'name' => '',
'name' => 'test',
'title' => 'New title',
'flag' => 0,
'lft' => 3,
Expand Down
13 changes: 8 additions & 5 deletions lib/Cake/Test/Case/View/MediaViewTest.php
Expand Up @@ -132,11 +132,14 @@ public function testRenderWithUnknownFileTypeGeneric() {

$this->MediaView->response->expects($this->at(1))
->method('header')
->with(array(
'Date' => gmdate('D, d M Y H:i:s', time()) . ' GMT',
'Expires' => '0',
'Cache-Control' => 'private, must-revalidate, post-check=0, pre-check=0',
'Pragma' => 'no-cache'
->with($this->logicalAnd(
$this->arrayHasKey('Date'),
$this->arrayHasKey('Expires'),
$this->arrayHasKey('Cache-Control'),
$this->arrayHasKey('Pragma'),
$this->contains('0'),
$this->contains('private, must-revalidate, post-check=0, pre-check=0'),
$this->contains('no-cache')
));

$this->MediaView->response->expects($this->once())
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Utility/Inflector.php
Expand Up @@ -177,7 +177,7 @@ class Inflector {
'/Ä/' => 'Ae',
'/Ü/' => 'Ue',
'/Ö/' => 'Oe',
'/À|Á|Â|Ã|Ä|Å|Ǻ|Ā|Ă|Ą|Ǎ/' => 'A',
'/À|Á|Â|Ã|Å|Ǻ|Ā|Ă|Ą|Ǎ/' => 'A',
'/à|á|â|ã|å|ǻ|ā|ă|ą|ǎ|ª/' => 'a',
'/Ç|Ć|Ĉ|Ċ|Č/' => 'C',
'/ç|ć|ĉ|ċ|č/' => 'c',
Expand Down

0 comments on commit 6a98695

Please sign in to comment.