Merge branch '1.3' into merger

Conflicts:
	app/Config/acl.ini.php
	app/config/database.php.default
	app/webroot/css.php
	app/webroot/css/cake.generic.css
	cake/basics.php
	cake/bootstrap.php
	cake/config/paths.php
	cake/console/cake.php
	cake/console/error.php
	cake/console/libs/acl.php
	cake/console/libs/bake.php
	cake/console/libs/i18n.php
	cake/console/libs/shell.php
	cake/console/libs/tasks/extract.php
	cake/console/libs/tasks/plugin.php
	cake/console/libs/tasks/project.php
	cake/console/libs/testsuite.php
	cake/console/templates/default/classes/test.ctp
	cake/console/templates/default/views/home.ctp
	cake/console/templates/default/views/view.ctp
	cake/console/templates/skel/config/database.php.default
	cake/console/templates/skel/views/elements/email/text/default.ctp
	cake/console/templates/skel/webroot/css.php
	cake/dispatcher.php
	cake/libs/cache.php
	cake/libs/cake_session.php
	cake/libs/configure.php
	cake/libs/controller/component.php
	cake/libs/controller/components/auth.php
	cake/libs/controller/components/email.php
	cake/libs/controller/components/request_handler.php
	cake/libs/controller/components/security.php
	cake/libs/controller/controller.php
	cake/libs/controller/scaffold.php
	cake/libs/error.php
	cake/libs/magic_db.php
	cake/libs/model/behaviors/acl.php
	cake/libs/model/connection_manager.php
	cake/libs/model/datasources/dbo/dbo_mysqli.php
	cake/libs/model/model_behavior.php
	cake/libs/overloadable.php
	cake/libs/overloadable_php4.php
	cake/libs/overloadable_php5.php
	cake/libs/router.php
	cake/libs/view/errors/missing_action.ctp
	cake/libs/view/errors/missing_behavior_class.ctp
	cake/libs/view/errors/missing_behavior_file.ctp
	cake/libs/view/errors/missing_component_class.ctp
	cake/libs/view/errors/missing_component_file.ctp
	cake/libs/view/errors/missing_connection.ctp
	cake/libs/view/errors/missing_controller.ctp
	cake/libs/view/errors/missing_helper_class.ctp
	cake/libs/view/errors/missing_helper_file.ctp
	cake/libs/view/errors/missing_layout.ctp
	cake/libs/view/errors/missing_model.ctp
	cake/libs/view/errors/missing_scaffolddb.ctp
	cake/libs/view/errors/missing_table.ctp
	cake/libs/view/errors/missing_view.ctp
	cake/libs/view/errors/private_action.ctp
	cake/libs/view/errors/scaffold_error.ctp
	cake/libs/view/helpers/ajax.php
	cake/libs/view/helpers/javascript.php
	cake/libs/view/helpers/js.php
	cake/libs/view/helpers/session.php
	cake/libs/view/helpers/xml.php
	cake/libs/view/media.php
	cake/libs/view/pages/home.ctp
	cake/libs/view/scaffolds/edit.ctp
	cake/libs/view/scaffolds/index.ctp
	cake/libs/view/scaffolds/view.ctp
	cake/libs/view/view.php
	cake/libs/xml.php
	cake/tests/cases/console/cake.test.php
	cake/tests/cases/console/libs/acl.test.php
	cake/tests/cases/console/libs/api.test.php
	cake/tests/cases/console/libs/bake.test.php
	cake/tests/cases/console/libs/shell.test.php
	cake/tests/cases/console/libs/tasks/controller.test.php
	cake/tests/cases/console/libs/tasks/db_config.test.php
	cake/tests/cases/console/libs/tasks/fixture.test.php
	cake/tests/cases/console/libs/tasks/model.test.php
	cake/tests/cases/console/libs/tasks/plugin.test.php
	cake/tests/cases/console/libs/tasks/project.test.php
	cake/tests/cases/console/libs/tasks/test.test.php
	cake/tests/cases/console/libs/tasks/view.test.php
	cake/tests/cases/dispatcher.test.php
	cake/tests/cases/libs/cache/apc.test.php
	cake/tests/cases/libs/cake_session.test.php
	cake/tests/cases/libs/cake_test_case.test.php
	cake/tests/cases/libs/code_coverage_manager.test.php
	cake/tests/cases/libs/configure.test.php
	cake/tests/cases/libs/controller/component.test.php
	cake/tests/cases/libs/controller/components/auth.test.php
	cake/tests/cases/libs/controller/components/cookie.test.php
	cake/tests/cases/libs/controller/components/request_handler.test.php
	cake/tests/cases/libs/controller/components/session.test.php
	cake/tests/cases/libs/controller/controller.test.php
	cake/tests/cases/libs/controller/pages_controller.test.php
	cake/tests/cases/libs/error.test.php
	cake/tests/cases/libs/http_socket.test.php
	cake/tests/cases/libs/magic_db.test.php
	cake/tests/cases/libs/model/datasources/dbo/dbo_mssql.test.php
	cake/tests/cases/libs/model/datasources/dbo/dbo_mysql.test.php
	cake/tests/cases/libs/model/datasources/dbo/dbo_mysqli.test.php
	cake/tests/cases/libs/model/datasources/dbo_source.test.php
	cake/tests/cases/libs/model/models.php
	cake/tests/cases/libs/overloadable.test.php
	cake/tests/cases/libs/test_manager.test.php
	cake/tests/cases/libs/view/helpers/ajax.test.php
	cake/tests/cases/libs/view/helpers/javascript.test.php
	cake/tests/cases/libs/view/helpers/session.test.php
	cake/tests/cases/libs/view/helpers/xml.test.php
	cake/tests/cases/libs/view/media.test.php
	cake/tests/cases/libs/view/theme.test.php
	cake/tests/cases/libs/xml.test.php
	cake/tests/fixtures/aco_fixture.php
	cake/tests/fixtures/translate_fixture.php
	cake/tests/groups/acl.group.php
	cake/tests/groups/bake.group.php
	cake/tests/groups/behaviors.group.php
	cake/tests/groups/cache.group.php
	cake/tests/groups/components.group.php
	cake/tests/groups/configure.group.php
	cake/tests/groups/console.group.php
	cake/tests/groups/controller.group.php
	cake/tests/groups/database.group.php
	cake/tests/groups/helpers.group.php
	cake/tests/groups/i18n.group.php
	cake/tests/groups/javascript.group.php
	cake/tests/groups/lib.group.php
	cake/tests/groups/model.group.php
	cake/tests/groups/no_cross_contamination.group.php
	cake/tests/groups/routing_system.group.php
	cake/tests/groups/socket.group.php
	cake/tests/groups/test_suite.group.php
	cake/tests/groups/view.group.php
	cake/tests/groups/xml.group.php
	cake/tests/lib/cake_test_case.php
	cake/tests/lib/cake_test_model.php
	cake/tests/lib/cake_test_suite_dispatcher.php
	cake/tests/lib/cake_web_test_case.php
	cake/tests/lib/code_coverage_manager.php
	cake/tests/lib/reporter/cake_base_reporter.php
	cake/tests/lib/reporter/cake_cli_reporter.php
	cake/tests/lib/reporter/cake_text_reporter.php
	cake/tests/lib/templates/menu.php
	cake/tests/lib/templates/simpletest.php
	cake/tests/lib/test_manager.php
	cake/tests/test_app/controllers/tests_apps_controller.php
	cake/tests/test_app/libs/cache/test_app_cache.php
	cake/tests/test_app/libs/library.php
	cake/tests/test_app/libs/log/test_app_log.php
	cake/tests/test_app/plugins/test_plugin/config/load.php
	cake/tests/test_app/plugins/test_plugin/config/more.load.php
	cake/tests/test_app/plugins/test_plugin/controllers/components/other_component.php
	cake/tests/test_app/plugins/test_plugin/controllers/components/plugins_component.php
	cake/tests/test_app/plugins/test_plugin/controllers/components/test_plugin_component.php
	cake/tests/test_app/plugins/test_plugin/controllers/components/test_plugin_other_component.php
	cake/tests/test_app/plugins/test_plugin/controllers/test_plugin_controller.php
	cake/tests/test_app/plugins/test_plugin/controllers/tests_controller.php
	cake/tests/test_app/plugins/test_plugin/libs/cache/test_plugin_cache.php
	cake/tests/test_app/plugins/test_plugin/libs/log/test_plugin_log.php
	cake/tests/test_app/plugins/test_plugin/libs/test_plugin_library.php
	cake/tests/test_app/plugins/test_plugin/test_plugin_app_controller.php
	cake/tests/test_app/plugins/test_plugin/test_plugin_app_model.php
	cake/tests/test_app/plugins/test_plugin/vendors/sample/sample_plugin.php
	cake/tests/test_app/plugins/test_plugin/vendors/welcome.php
	cake/tests/test_app/plugins/test_plugin/views/helpers/other_helper.php
	cake/tests/test_app/plugins/test_plugin/views/helpers/plugged_helper.php
	cake/tests/test_app/vendors/Test/MyTest.php
	cake/tests/test_app/vendors/Test/hello.php
	cake/tests/test_app/vendors/sample/configure_test_vendor_sample.php
	cake/tests/test_app/vendors/shells/sample.php
	cake/tests/test_app/vendors/somename/some.name.php
	cake/tests/test_app/vendors/welcome.php
	cake/tests/test_app/views/elements/email/text/default.ctp
	cake/tests/test_app/views/layouts/default.ctp
	cake/tests/test_app/views/posts/test_nocache_tags.ctp
	lib/Cake/Cache/Engine/MemcacheEngine.php
	lib/Cake/Config/config.php
	lib/Cake/Console/Command/Task/ModelTask.php
	lib/Cake/Console/Templates/skel/webroot/css/cake.generic.css
	lib/Cake/Console/Templates/skel/webroot/test.php
	lib/Cake/Console/cake.bat
	lib/Cake/Controller/Component/CookieComponent.php
	lib/Cake/Log/CakeLog.php
	lib/Cake/Model/CakeSchema.php
	lib/Cake/Test/Case/Log/Engine/FileLog.php
	lib/Cake/Test/Case/View/Helper/FormHelperTest.php
	lib/Cake/Test/test_app/View/Emails/html/custom.ctp
	lib/Cake/Test/test_app/View/Emails/text/custom.ctp
	lib/Cake/TestSuite/templates/header.php
	lib/Cake/Utility/Sanitize.php
	lib/Cake/Utility/Validation.php
	lib/Cake/VERSION.txt
	lib/Cake/View/Helper/FormHelper.php
This commit is contained in:
Mark Story 2011-06-23 12:48:06 -07:00
commit 91a1cf81f3
49 changed files with 253 additions and 47 deletions

View file

@ -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

View file

@ -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
* ));
*
*/

View file

@ -0,0 +1,80 @@
<?php
/**
* This is core configuration file.
*
* Use it to configure core behaviour of Cake.
*
* PHP 5
*
* CakePHP(tm) : Rapid Development Framework (http://cakephp.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.
*
* @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project
* @package app.config
* @since CakePHP(tm) v 0.2.9
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
/**
* In this file you set up your database connection details.
*
* @package cake.config
*/
/**
* Database configuration class.
* You can specify multiple configurations for production, development and testing.
*
* driver => 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' => '',
);
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 496 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 783 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View file

@ -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)
);

View file

@ -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';

View file

@ -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 <config>');
$this->out("\tset db config <config>. uses 'default' if none is specified");
$this->out();
$this->out('Commands:');
$this->out();
$this->out("controller <name>");

View file

@ -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') {

View file

@ -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
* ));
*
*/

View file

@ -533,5 +533,5 @@ div.code-coverage-results span.result-good {
/** Elements **/
#url-rewriting-warning {
display:none;
display: none;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 496 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 783 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View file

@ -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);
if (isset($this->_values[$names[0]])) {
$this->_values[$names[0]] = Set::remove($this->_values[$names[0]], $names[1]);
}
$this->_delete('[' . implode('][', $names) . ']');
}

View file

@ -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) {

View file

@ -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,7 +276,7 @@ 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);
@ -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);
}
}

View file

@ -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) . ')';
}
}

View file

@ -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);
}

View file

@ -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.
*

View file

@ -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']));
}
/**

View file

@ -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

View file

@ -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);
}
}

View file

@ -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';
}

View file

@ -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'));

View file

@ -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('#<option value="15"[^>]*>15</option>#', $result[1]);
$this->assertPattern('#<option value="30"[^>]*>30</option>#', $result[1]);
$result = $this->Form->input('Random.start_time', array(
'type' => 'time',
'selected' => '18:15'
));
$this->assertPattern('#<option value="06"[^>]*>6</option>#', $result);
$this->assertPattern('#<option value="15"[^>]*>15</option>#', $result);
$this->assertPattern('#<option value="pm"[^>]*>pm</option>#', $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

View file

@ -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));
}
}

View file

@ -0,0 +1,35 @@
<?php
/**
* Short description for file.
*
* PHP versions 4 and 5
*
* CakePHP(tm) Tests <http://book.cakephp.org/view/1196/Testing>
* 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'),
);
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

View file

@ -1,6 +1,4 @@
<?php
/* SVN FILE: $Id$ */
/**
*
* PHP 5

View file

@ -1,6 +1,4 @@
<?php
/* SVN FILE: $Id$ */
/**
*
* PHP 5

View file

@ -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(<?php echo $baseDir; ?>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(<?php echo $baseDir; ?>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(<?php echo $baseDir; ?>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(<?php echo $baseDir; ?>img/test-error-icon.png);
border-color: #DF6300;
}
ul.tests li div { margin: 5px 0 8px 0; }

View file

@ -1,4 +1,5 @@
<?php
App::import('Model', 'ConnectionManager');
/**
* Washes strings from unwanted noise.
*

View file

@ -666,7 +666,7 @@ class Validation {
*/
public static function url($check, $strict = false) {
self::__populateIp();
$validChars = '([' . preg_quote('!"$&\'()*+,-.@_:;=~') . '\/0-9a-z\p{L}\p{N}]|(%[0-9a-f]{2}))';
$validChars = '([' . preg_quote('!"$&\'()*+,-.@_:;=~[]') . '\/0-9a-z\p{L}\p{N}]|(%[0-9a-f]{2}))';
$regex = '/^(?:(?:https?|ftps?|file|news|gopher):\/\/)' . (!empty($strict) ? '' : '?') .
'(?:' . self::$__pattern['IPv4'] . '|\[' . self::$__pattern['IPv6'] . '\]|' . self::$__pattern['hostname'] . ')(?::[1-9][0-9]{0,4})?' .
'(?:\/?|\/' . $validChars . '*)?' .

View file

@ -18,8 +18,3 @@
// +--------------------------------------------------------------------------------------------+ //
////////////////////////////////////////////////////////////////////////////////////////////////////
2.0.0-alpha

View file

@ -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') {