diff --git a/app/Config/acl.ini.php b/app/Config/acl.ini.php index 7d272f1de..5150edd82 100644 --- a/app/Config/acl.ini.php +++ b/app/Config/acl.ini.php @@ -6,7 +6,7 @@ ; * ; * PHP 5 ; * -; * CakePHP(tm) : Rapid Development Framework http://www.cakephp.org/ +; * CakePHP(tm) : Rapid Development Framework http://cakephp.org ; * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) ; * ; * Licensed under The MIT License diff --git a/app/Config/core.php b/app/Config/core.php index 1b6fe902b..ebe0ece58 100644 --- a/app/Config/core.php +++ b/app/Config/core.php @@ -281,6 +281,7 @@ * ), //[optional] * 'persistent' => true, // [optional] set this to false for non-persistent connections * 'compress' => false, // [optional] compress data in Memcache (slower, but uses less memory) + * 'persistent' => true, // [optional] set this to false for non-persistent connections * )); * */ diff --git a/app/config/database.php.default b/app/config/database.php.default new file mode 100644 index 000000000..d23755291 --- /dev/null +++ b/app/config/database.php.default @@ -0,0 +1,80 @@ + The name of a supported driver; valid options are as follows: + * Database/Mysql - MySQL 4 & 5, + * Database/Sqlite - SQLite (PHP5 only), + * Database/Postgres - PostgreSQL 7 and higher, + * Database/Sqlserver - Microsoft SQL Server 2005 and higher, + * Database/Oracle - Oracle 8 and higher + * + * You can add custom database drivers (or override existing drivers) by adding the + * appropriate file to app/Model/Datasource/Database. Drivers should be named 'MyDriver.php', + * + * + * persistent => true / false + * Determines whether or not the database should use a persistent connection + * + * host => + * the host you connect to the database. To add a socket or port number, use 'port' => # + * + * prefix => + * Uses the given prefix for all the tables in this database. This setting can be overridden + * on a per-table basis with the Model::$tablePrefix property. + * + * schema => + * For Postgres specifies which schema you would like to use the tables in. Postgres defaults to 'public'. + * + * encoding => + * For MySQL, Postgres specifies the character encoding to use when connecting to the + * database. Uses database default not specified. + * + */ +class DATABASE_CONFIG { + + public $default = array( + 'datasource' => 'Database/Mysql', + 'persistent' => false, + 'host' => 'localhost', + 'login' => 'user', + 'password' => 'password', + 'database' => 'database_name', + 'prefix' => '', + ); + + public $test = array( + 'datasource' => 'Database/Mysql', + 'persistent' => false, + 'host' => 'localhost', + 'login' => 'user', + 'password' => 'password', + 'database' => 'test_database_name', + 'prefix' => '', + ); +} diff --git a/app/webroot/img/test-error-icon.png b/app/webroot/img/test-error-icon.png new file mode 100644 index 000000000..07bb12411 Binary files /dev/null and b/app/webroot/img/test-error-icon.png differ diff --git a/app/webroot/img/test-fail-icon.png b/app/webroot/img/test-fail-icon.png new file mode 100644 index 000000000..f9d2f147e Binary files /dev/null and b/app/webroot/img/test-fail-icon.png differ diff --git a/app/webroot/img/test-pass-icon.png b/app/webroot/img/test-pass-icon.png new file mode 100644 index 000000000..99c5eb05a Binary files /dev/null and b/app/webroot/img/test-pass-icon.png differ diff --git a/app/webroot/img/test-skip-icon.png b/app/webroot/img/test-skip-icon.png new file mode 100644 index 000000000..749771c98 Binary files /dev/null and b/app/webroot/img/test-skip-icon.png differ diff --git a/lib/Cake/Cache/Engine/FileEngine.php b/lib/Cake/Cache/Engine/FileEngine.php index a86fdc0fa..755cb24fe 100644 --- a/lib/Cake/Cache/Engine/FileEngine.php +++ b/lib/Cake/Cache/Engine/FileEngine.php @@ -302,4 +302,4 @@ class FileEngine extends CacheEngine { } return true; } -} \ No newline at end of file +} diff --git a/lib/Cake/Cache/Engine/MemcacheEngine.php b/lib/Cake/Cache/Engine/MemcacheEngine.php index 8f82c4e9c..5f0cecddb 100644 --- a/lib/Cake/Cache/Engine/MemcacheEngine.php +++ b/lib/Cake/Cache/Engine/MemcacheEngine.php @@ -64,8 +64,8 @@ class MemcacheEngine extends CacheEngine { 'engine'=> 'Memcache', 'prefix' => Inflector::slug(APP_DIR) . '_', 'servers' => array('127.0.0.1'), - 'persistent' => true, - 'compress'=> false + 'compress'=> false, + 'persistent' => true ), $settings) ); @@ -211,4 +211,4 @@ class MemcacheEngine extends CacheEngine { } return true; } -} \ No newline at end of file +} diff --git a/lib/Cake/Config/config.php b/lib/Cake/Config/config.php index 560f14417..b6ee4db1b 100644 --- a/lib/Cake/Config/config.php +++ b/lib/Cake/Config/config.php @@ -16,5 +16,4 @@ * @since CakePHP(tm) v 1.1.11.4062 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ - return $config['Cake.version'] = '2.0.0-alpha'; diff --git a/lib/Cake/Console/Command/Task/ControllerTask.php b/lib/Cake/Console/Command/Task/ControllerTask.php index 1ff3d31b0..b64efeacb 100644 --- a/lib/Cake/Console/Command/Task/ControllerTask.php +++ b/lib/Cake/Console/Command/Task/ControllerTask.php @@ -477,6 +477,11 @@ class ControllerTask extends BakeTask { $this->out("\tName of the controller to bake. Can use Plugin.name"); $this->out("\tas a shortcut for plugin baking."); $this->out(); + $this->out('Params:'); + $this->out(); + $this->out('-connection '); + $this->out("\tset db config . uses 'default' if none is specified"); + $this->out(); $this->out('Commands:'); $this->out(); $this->out("controller "); diff --git a/lib/Cake/Console/Command/Task/ModelTask.php b/lib/Cake/Console/Command/Task/ModelTask.php index b4e4c8a0d..2c349101a 100644 --- a/lib/Cake/Console/Command/Task/ModelTask.php +++ b/lib/Cake/Console/Command/Task/ModelTask.php @@ -356,6 +356,7 @@ class ModelTask extends BakeTask { $default++; } } + $choices[$default] = 'none'; // Needed since index starts at 1 $this->_validations = $choices; return $choices; } @@ -394,6 +395,8 @@ class ModelTask extends BakeTask { if ($metaData['null'] != 1 && !in_array($fieldName, array($primaryKey, 'created', 'modified', 'updated'))) { if ($fieldName == 'email') { $guess = $methods['email']; + } elseif ($metaData['type'] == 'string' && $metaData['length'] == 36) { + $guess = $methods['uuid']; } elseif ($metaData['type'] == 'string') { $guess = $methods['notempty']; } elseif ($metaData['type'] == 'integer') { diff --git a/lib/Cake/Console/Templates/skel/Config/core.php b/lib/Cake/Console/Templates/skel/Config/core.php index 1b6fe902b..ebe0ece58 100644 --- a/lib/Cake/Console/Templates/skel/Config/core.php +++ b/lib/Cake/Console/Templates/skel/Config/core.php @@ -281,6 +281,7 @@ * ), //[optional] * 'persistent' => true, // [optional] set this to false for non-persistent connections * 'compress' => false, // [optional] compress data in Memcache (slower, but uses less memory) + * 'persistent' => true, // [optional] set this to false for non-persistent connections * )); * */ diff --git a/lib/Cake/Console/Templates/skel/webroot/css/cake.generic.css b/lib/Cake/Console/Templates/skel/webroot/css/cake.generic.css index 8d81bfce9..30e0c6bb0 100644 --- a/lib/Cake/Console/Templates/skel/webroot/css/cake.generic.css +++ b/lib/Cake/Console/Templates/skel/webroot/css/cake.generic.css @@ -533,5 +533,5 @@ div.code-coverage-results span.result-good { /** Elements **/ #url-rewriting-warning { - display:none; + display: none; } diff --git a/lib/Cake/Console/Templates/skel/webroot/img/img/test-error-icon.png b/lib/Cake/Console/Templates/skel/webroot/img/img/test-error-icon.png new file mode 100644 index 000000000..07bb12411 Binary files /dev/null and b/lib/Cake/Console/Templates/skel/webroot/img/img/test-error-icon.png differ diff --git a/lib/Cake/Console/Templates/skel/webroot/img/img/test-fail-icon.png b/lib/Cake/Console/Templates/skel/webroot/img/img/test-fail-icon.png new file mode 100644 index 000000000..f9d2f147e Binary files /dev/null and b/lib/Cake/Console/Templates/skel/webroot/img/img/test-fail-icon.png differ diff --git a/lib/Cake/Console/Templates/skel/webroot/img/img/test-pass-icon.png b/lib/Cake/Console/Templates/skel/webroot/img/img/test-pass-icon.png new file mode 100644 index 000000000..99c5eb05a Binary files /dev/null and b/lib/Cake/Console/Templates/skel/webroot/img/img/test-pass-icon.png differ diff --git a/lib/Cake/Console/Templates/skel/webroot/img/img/test-skip-icon.png b/lib/Cake/Console/Templates/skel/webroot/img/img/test-skip-icon.png new file mode 100644 index 000000000..749771c98 Binary files /dev/null and b/lib/Cake/Console/Templates/skel/webroot/img/img/test-skip-icon.png differ diff --git a/lib/Cake/Console/cake.bat b/lib/Cake/Console/cake.bat index 7497db609..9d7c32496 100644 --- a/lib/Cake/Console/cake.bat +++ b/lib/Cake/Console/cake.bat @@ -29,4 +29,4 @@ php -q "%lib%cake.php" -working "%CD% " %* echo. -exit /B %ERRORLEVEL% \ No newline at end of file +exit /B %ERRORLEVEL% diff --git a/lib/Cake/Controller/Component/CookieComponent.php b/lib/Cake/Controller/Component/CookieComponent.php index ef9175fea..a0cb7ffc1 100644 --- a/lib/Cake/Controller/Component/CookieComponent.php +++ b/lib/Cake/Controller/Component/CookieComponent.php @@ -286,14 +286,15 @@ class CookieComponent extends Component { foreach ($this->_values[$key] as $idx => $val) { $this->_delete("[$key][$idx]"); } - } else { - $this->_delete("[$key]"); } + $this->_delete("[$key]"); unset($this->_values[$key]); return; } $names = explode('.', $key, 2); - $this->_values[$names[0]] = Set::remove($this->_values[$names[0]], $names[1]); + if (isset($this->_values[$names[0]])) { + $this->_values[$names[0]] = Set::remove($this->_values[$names[0]], $names[1]); + } $this->_delete('[' . implode('][', $names) . ']'); } diff --git a/lib/Cake/Model/Behavior/AclBehavior.php b/lib/Cake/Model/Behavior/AclBehavior.php index c0203f7a4..487451953 100644 --- a/lib/Cake/Model/Behavior/AclBehavior.php +++ b/lib/Cake/Model/Behavior/AclBehavior.php @@ -101,7 +101,7 @@ class AclBehavior extends ModelBehavior { } $data = array( 'parent_id' => isset($parent[0][$type]['id']) ? $parent[0][$type]['id'] : null, - 'model' => $model->alias, + 'model' => $model->name, 'foreign_key' => $model->id ); if (!$created) { diff --git a/lib/Cake/Model/CakeSchema.php b/lib/Cake/Model/CakeSchema.php index 10c5e52d5..206f4a5a1 100644 --- a/lib/Cake/Model/CakeSchema.php +++ b/lib/Cake/Model/CakeSchema.php @@ -254,7 +254,7 @@ class CakeSchema extends Object { if ($prefix && strpos($table, $prefix) !== 0) { continue; } - $table = str_replace($prefix, '', $table); + $table = $this->_noPrefixTable($prefix, $table); if (in_array($fulltable, $currentTables)) { $key = array_search($fulltable, $currentTables); @@ -276,8 +276,8 @@ class CakeSchema extends Object { } if (in_array($withTable, $currentTables)) { $key = array_search($withTable, $currentTables); - $noPrefixWith = str_replace($prefix, '', $withTable); - + $noPrefixWith = $this->_noPrefixTable($prefix, $withTable); + $tables[$noPrefixWith] = $this->__columns($Object->$class); $tables[$noPrefixWith]['indexes'] = $db->index($Object->$class); $tables[$noPrefixWith]['tableParameters'] = $db->readTableParameters($withTable); @@ -297,7 +297,7 @@ class CakeSchema extends Object { if (strpos($table, $prefix) !== 0) { continue; } - $table = str_replace($prefix, '', $table); + $table = $this->_noPrefixTable($prefix, $table); } $Object = new AppModel(array( 'name' => Inflector::classify($table), 'table' => $table, 'ds' => $connection @@ -684,4 +684,15 @@ class CakeSchema extends Object { } return array_filter(compact('add', 'drop')); } + +/** + * Trim the table prefix from the full table name, and return the prefix-less table + * + * @param string $prefix Table prefix + * @param string $table Full table name + * @return string Prefix-less table name + */ + function _noPrefixTable($prefix, $table) { + return preg_replace('/^' . preg_quote($prefix) . '/', '', $table); + } } diff --git a/lib/Cake/Model/Datasource/Database/Sqlite.php b/lib/Cake/Model/Datasource/Database/Sqlite.php index f469c486d..f2bed314d 100644 --- a/lib/Cake/Model/Datasource/Database/Sqlite.php +++ b/lib/Cake/Model/Datasource/Database/Sqlite.php @@ -554,4 +554,4 @@ class Sqlite extends DboSource { } return $out; } -} \ No newline at end of file +} diff --git a/lib/Cake/Model/Datasource/DboSource.php b/lib/Cake/Model/Datasource/DboSource.php index 1b917d3fe..7ba047ed2 100644 --- a/lib/Cake/Model/Datasource/DboSource.php +++ b/lib/Cake/Model/Datasource/DboSource.php @@ -2677,7 +2677,7 @@ class DboSource extends DataSource { $group = array($group); } foreach($group as $index => $key) { - if ($model->isVirtualField($key)) { + if (is_object($model) && $model->isVirtualField($key)) { $group[$index] = '(' . $model->getVirtualField($key) . ')'; } } diff --git a/lib/Cake/Test/Case/Cache/Engine/MemcacheTest.php b/lib/Cake/Test/Case/Cache/Engine/MemcacheTest.php index 9ba96c27f..3d69f00fb 100644 --- a/lib/Cake/Test/Case/Cache/Engine/MemcacheTest.php +++ b/lib/Cake/Test/Case/Cache/Engine/MemcacheTest.php @@ -89,7 +89,8 @@ class MemcacheEngineTest extends CakeTestCase { 'servers' => array('127.0.0.1'), 'persistent' => true, 'compress' => false, - 'engine' => 'Memcache' + 'engine' => 'Memcache', + 'persistent' => true, ); $this->assertEqual($settings, $expecting); } diff --git a/lib/Cake/Test/Case/Controller/Component/CookieComponentTest.php b/lib/Cake/Test/Case/Controller/Component/CookieComponentTest.php index 04bb3fb8e..05f0171dc 100644 --- a/lib/Cake/Test/Case/Controller/Component/CookieComponentTest.php +++ b/lib/Cake/Test/Case/Controller/Component/CookieComponentTest.php @@ -513,6 +513,16 @@ class CookieComponentTest extends CakeTestCase { $this->assertNull($this->Cookie->read('User.email')); $this->Cookie->destroy(); } +/** + * Test deleting recursively with keys that don't exist. + * + * @return void + */ + function testDeleteChildrenNotExist() { + $this->assertNull($this->Controller->Cookie->delete('NotFound')); + $this->assertNull($this->Controller->Cookie->delete('Not.Found')); + } + /** * Helper method for generating old style encoded cookie values. * diff --git a/lib/Cake/Test/Case/Model/CakeSchemaTest.php b/lib/Cake/Test/Case/Model/CakeSchemaTest.php index 9fc9580fc..f7e76bee0 100644 --- a/lib/Cake/Test/Case/Model/CakeSchemaTest.php +++ b/lib/Cake/Test/Case/Model/CakeSchemaTest.php @@ -505,7 +505,8 @@ class CakeSchemaTest extends CakeTestCase { public $fixtures = array( 'core.post', 'core.tag', 'core.posts_tag', 'core.test_plugin_comment', 'core.datatype', 'core.auth_user', 'core.author', - 'core.test_plugin_article', 'core.user', 'core.comment' + 'core.test_plugin_article', 'core.user', 'core.comment', + 'core.prefix_test' ); /** @@ -658,6 +659,14 @@ class CakeSchemaTest extends CakeTestCase { ConnectionManager::create('schema_prefix', $config); $read = $this->Schema->read(array('connection' => 'schema_prefix', 'models' => false)); $this->assertTrue(empty($read['tables'])); + + $config['prefix'] = 'prefix_'; + ConnectionManager::create('schema_prefix2', $config); + $read = $this->Schema->read(array( + 'connection' => 'schema_prefix2', + 'name' => 'TestApp', + 'models' => false)); + $this->assertTrue(isset($read['tables']['prefix_tests'])); } /** diff --git a/lib/Cake/Test/Case/Model/ConnectionManagerTest.php b/lib/Cake/Test/Case/Model/ConnectionManagerTest.php index e2dcf443d..1cb56608b 100644 --- a/lib/Cake/Test/Case/Model/ConnectionManagerTest.php +++ b/lib/Cake/Test/Case/Model/ConnectionManagerTest.php @@ -5,7 +5,7 @@ * * PHP 5 * - * Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice diff --git a/lib/Cake/Test/Case/Model/Datasource/DboSourceTest.php b/lib/Cake/Test/Case/Model/Datasource/DboSourceTest.php index 290e9b4b2..a571d6d06 100644 --- a/lib/Cake/Test/Case/Model/Datasource/DboSourceTest.php +++ b/lib/Cake/Test/Case/Model/Datasource/DboSourceTest.php @@ -852,4 +852,15 @@ class DboSourceTest extends CakeTestCase { $result = $this->testDb->hasAny($Article, '1=2'); $this->assertFalse($result); } + +/** + * Test that group works without a model + * + * @return void + */ + function testGroupNoModel() { + $result = $this->db->group('created'); + $this->assertEqual(' GROUP BY created', $result); + } + } diff --git a/lib/Cake/Test/Case/Model/models.php b/lib/Cake/Test/Case/Model/models.php index 00e445022..bc6676a67 100644 --- a/lib/Cake/Test/Case/Model/models.php +++ b/lib/Cake/Test/Case/Model/models.php @@ -4734,3 +4734,15 @@ class MysqlTestModel extends Model { ); } } + +/** + * Test model for datasource prefixes + * + */ +class PrefixTestModel extends CakeTestModel { +} +class PrefixTestUseTableModel extends CakeTestModel { + var $name = 'PrefixTest'; + var $useTable = 'prefix_tests'; +} + diff --git a/lib/Cake/Test/Case/Utility/ValidationTest.php b/lib/Cake/Test/Case/Utility/ValidationTest.php index 4f707870f..d0cafb581 100644 --- a/lib/Cake/Test/Case/Utility/ValidationTest.php +++ b/lib/Cake/Test/Case/Utility/ValidationTest.php @@ -1813,6 +1813,7 @@ class ValidationTest extends CakeTestCase { $this->assertTrue(Validation::url('http://www.zwischenraume.de')); $this->assertTrue(Validation::url('http://www.zwischenraume.cz')); $this->assertTrue(Validation::url('http://www.last.fm/music/浜崎あゆみ'), 'utf8 path failed'); + $this->assertTrue(Validation::url('http://www.electrohome.ro/images/239537750-284232-215_300[1].jpg')); $this->assertTrue(Validation::url('http://cakephp.org:80')); $this->assertTrue(Validation::url('http://cakephp.org:443')); diff --git a/lib/Cake/Test/Case/View/Helper/FormHelperTest.php b/lib/Cake/Test/Case/View/Helper/FormHelperTest.php index 4be46a100..605cdceac 100644 --- a/lib/Cake/Test/Case/View/Helper/FormHelperTest.php +++ b/lib/Cake/Test/Case/View/Helper/FormHelperTest.php @@ -1939,11 +1939,10 @@ class FormHelperTest extends CakeTestCase { } /** - * test form->input() with datetime, date and time types + * test form->input() with time types. * - * @return void */ - public function testInputDatetime() { + public function testInputTime() { extract($this->dateRegex); $result = $this->Form->input('Contact.created', array('type' => 'time', 'timeFormat' => 24)); $result = explode(':', $result); @@ -1981,6 +1980,22 @@ class FormHelperTest extends CakeTestCase { $this->assertPattern('##', $result[1]); $this->assertPattern('##', $result[1]); + $result = $this->Form->input('Random.start_time', array( + 'type' => 'time', + 'selected' => '18:15' + )); + $this->assertPattern('##', $result); + $this->assertPattern('##', $result); + $this->assertPattern('##', $result); + } + +/** + * test form->input() with datetime, date and time types + * + * @return void + */ + function testInputDatetime() { + extract($this->dateRegex); $result = $this->Form->input('prueba', array( 'type' => 'datetime', 'timeFormat'=> 24 , 'dateFormat'=>'DMY' , 'minYear' => 2008, 'maxYear' => date('Y') + 1 ,'interval' => 15 diff --git a/lib/Cake/Test/Case/View/MediaViewTest.php b/lib/Cake/Test/Case/View/MediaViewTest.php index 37d6f5ec6..9e299d181 100644 --- a/lib/Cake/Test/Case/View/MediaViewTest.php +++ b/lib/Cake/Test/Case/View/MediaViewTest.php @@ -357,4 +357,24 @@ class MediaViewTest extends CakeTestCase { $result = $this->MediaView->render(); $this->assertFalse($result); } + +/** + * Test downloading files with UPPERCASE extensions. + * + * @return void + */ + function testRenderUpperExtesnion() { + $this->MediaView->viewVars = array( + 'path' => CAKE . 'Test' . DS . 'test_app' . DS . 'Vendor' . DS .'img' . DS, + 'id' => 'test_2.JPG', + 'extension' => 'JPG', + ); + + $result = $this->MediaView->render(); + + $fileName = TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'vendors' . DS .'img' . DS . 'test_2.JPG'; + $file = file_get_contents($fileName, 'r'); + $this->assertEqual(base64_encode($output), base64_encode($file)); + } + } diff --git a/lib/Cake/Test/Fixture/PrefixTestFixture.php b/lib/Cake/Test/Fixture/PrefixTestFixture.php new file mode 100644 index 000000000..c980be8b4 --- /dev/null +++ b/lib/Cake/Test/Fixture/PrefixTestFixture.php @@ -0,0 +1,35 @@ + + * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * + * Licensed under The Open Group Test Suite License + * Redistributions of files must retain the above copyright notice. + * + * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @package cake + * @subpackage cake.tests.fixtures + * @since CakePHP(tm) v 1.2.0.4667 + * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License + */ + +/** + * Short description for class. + * + * @package cake + * @subpackage cake.tests.fixtures + */ +class PrefixTestFixture extends CakeTestFixture { + + var $name = 'PrefixTest'; + var $table = 'prefix_prefix_tests'; + + var $fields = array( + 'id' => array('type' => 'integer', 'key' => 'primary'), + ); +} diff --git a/lib/Cake/Test/test_app/Vendor/img/test_2.JPG b/lib/Cake/Test/test_app/Vendor/img/test_2.JPG new file mode 100644 index 000000000..ca5197ae8 Binary files /dev/null and b/lib/Cake/Test/test_app/Vendor/img/test_2.JPG differ diff --git a/lib/Cake/Test/test_app/View/Emails/html/custom.ctp b/lib/Cake/Test/test_app/View/Emails/html/custom.ctp index c4ca78c70..d8ab8ab3c 100644 --- a/lib/Cake/Test/test_app/View/Emails/html/custom.ctp +++ b/lib/Cake/Test/test_app/View/Emails/html/custom.ctp @@ -1,6 +1,4 @@

G. Layout After Content And After Element With No Cache Tags

log('7. layout after content and after element with no cache tags') ?> - \ No newline at end of file + diff --git a/lib/Cake/Test/test_app/View/Posts/sequencial_nocache.ctp b/lib/Cake/Test/test_app/View/Posts/sequencial_nocache.ctp index ec8b6e2c8..1489e56a2 100644 --- a/lib/Cake/Test/test_app/View/Posts/sequencial_nocache.ctp +++ b/lib/Cake/Test/test_app/View/Posts/sequencial_nocache.ctp @@ -20,4 +20,4 @@

D. In View File

log('4. in view file') ?> - \ No newline at end of file + diff --git a/lib/Cake/TestSuite/templates/header.php b/lib/Cake/TestSuite/templates/header.php index afeb61f42..b52b7e27f 100644 --- a/lib/Cake/TestSuite/templates/header.php +++ b/lib/Cake/TestSuite/templates/header.php @@ -49,24 +49,24 @@ ul.tests li.error, ul.tests li.skipped, ul.tests li.fail { - background: #fff2f2 url(http://cakephp.org/img/test-fail-icon.png) 5px 5px no-repeat; + background: #fff2f2 url(img/test-fail-icon.png) 5px 5px no-repeat; border-top: 1px dotted red; border-bottom: 1px dotted red; padding:5px 10px 2px 25px; } ul.tests li.pass { background-color: #f2fff2; - background-image: url(http://cakephp.org/img/test-pass-icon.png); + background-image: url(img/test-pass-icon.png); border-color:green; } ul.tests li.skipped { background-color: #edf1ff; - background-image: url(http://cakephp.org/img/test-skip-icon.png); + background-image: url(img/test-skip-icon.png); border-color:navy; } ul.tests li.error { background-color: #ffffe5; - background-image: url(http://cakephp.org/img/test-error-icon.png); + background-image: url(img/test-error-icon.png); border-color: #DF6300; } ul.tests li div { margin: 5px 0 8px 0; } diff --git a/lib/Cake/Utility/Folder.php b/lib/Cake/Utility/Folder.php index b69cdf4f1..1bc724dab 100644 --- a/lib/Cake/Utility/Folder.php +++ b/lib/Cake/Utility/Folder.php @@ -746,4 +746,4 @@ class Folder { $lastChar = $path[strlen($path) - 1]; return $lastChar === '/' || $lastChar === '\\'; } -} \ No newline at end of file +} diff --git a/lib/Cake/Utility/Inflector.php b/lib/Cake/Utility/Inflector.php index a2df40dc7..1b0733586 100644 --- a/lib/Cake/Utility/Inflector.php +++ b/lib/Cake/Utility/Inflector.php @@ -559,4 +559,4 @@ class Inflector { } // Store the initial state -Inflector::reset(); \ No newline at end of file +Inflector::reset(); diff --git a/lib/Cake/Utility/Sanitize.php b/lib/Cake/Utility/Sanitize.php index e2d5b75aa..6c70ce4ed 100644 --- a/lib/Cake/Utility/Sanitize.php +++ b/lib/Cake/Utility/Sanitize.php @@ -1,4 +1,5 @@ 0 ): echo $this->element('exception_stack_trace'); endif; -?> \ No newline at end of file +?> diff --git a/lib/Cake/View/Errors/error500.ctp b/lib/Cake/View/Errors/error500.ctp index 7914f607b..7f05547a4 100644 --- a/lib/Cake/View/Errors/error500.ctp +++ b/lib/Cake/View/Errors/error500.ctp @@ -25,4 +25,4 @@ if (Configure::read('debug') > 0 ): echo $this->element('exception_stack_trace'); endif; -?> \ No newline at end of file +?> diff --git a/lib/Cake/View/Helper/FormHelper.php b/lib/Cake/View/Helper/FormHelper.php index 7927f96dd..9e4a8919e 100644 --- a/lib/Cake/View/Helper/FormHelper.php +++ b/lib/Cake/View/Helper/FormHelper.php @@ -1983,9 +1983,8 @@ class FormHelper extends AppHelper { if (!empty($timeFormat)) { $time = explode(':', $days[1]); - $check = str_replace(':', '', $days[1]); - if (($check > 115959) && $timeFormat == '12') { + if (($time[0] > 12) && $timeFormat == '12') { $time[0] = $time[0] - 12; $meridian = 'pm'; } elseif ($time[0] == '00' && $timeFormat == '12') { diff --git a/lib/Cake/View/Helper/NumberHelper.php b/lib/Cake/View/Helper/NumberHelper.php index 4da89c394..e545fa8c7 100644 --- a/lib/Cake/View/Helper/NumberHelper.php +++ b/lib/Cake/View/Helper/NumberHelper.php @@ -259,4 +259,4 @@ class NumberHelper extends AppHelper { $this->_currencies[$formatName] = $options + $this->_currencyDefaults; } -} \ No newline at end of file +}