Merge branch 'master' into 2.5

Conflicts:
	lib/Cake/VERSION.txt
This commit is contained in:
mark_story 2014-03-03 21:20:58 -05:00
commit 5544fcc4c2
6 changed files with 55 additions and 4 deletions

View file

@ -33,6 +33,9 @@ class DbAclSchema extends CakeSchema {
public function after($event = array()) { public function after($event = array()) {
} }
/**
* ACO - Access Control Object - Something that is wanted
*/
public $acos = array( public $acos = array(
'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'length' => 10, 'key' => 'primary'), 'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'length' => 10, 'key' => 'primary'),
'parent_id' => array('type' => 'integer', 'null' => true, 'default' => null, 'length' => 10), 'parent_id' => array('type' => 'integer', 'null' => true, 'default' => null, 'length' => 10),
@ -44,6 +47,9 @@ class DbAclSchema extends CakeSchema {
'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1)) 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1))
); );
/**
* ARO - Access Request Object - Something that wants something
*/
public $aros = array( public $aros = array(
'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'length' => 10, 'key' => 'primary'), 'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'length' => 10, 'key' => 'primary'),
'parent_id' => array('type' => 'integer', 'null' => true, 'default' => null, 'length' => 10), 'parent_id' => array('type' => 'integer', 'null' => true, 'default' => null, 'length' => 10),
@ -55,6 +61,10 @@ class DbAclSchema extends CakeSchema {
'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1)) 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1))
); );
/**
* Used by the Cake::Model:Permission class.
* Checks if the given $aro has access to action $action in $aco.
*/
public $aros_acos = array( public $aros_acos = array(
'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'length' => 10, 'key' => 'primary'), 'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'length' => 10, 'key' => 'primary'),
'aro_id' => array('type' => 'integer', 'null' => false, 'length' => 10, 'key' => 'index'), 'aro_id' => array('type' => 'integer', 'null' => false, 'length' => 10, 'key' => 'index'),

View file

@ -275,7 +275,7 @@
* then the value of `Config.timezone` will be used. This feature allows you to set users' timezone just * then the value of `Config.timezone` will be used. This feature allows you to set users' timezone just
* once instead of passing it each time in function calls. * once instead of passing it each time in function calls.
*/ */
//Configure::write('Config.timezone', 'Europe/Paris') //Configure::write('Config.timezone', 'Europe/Paris');
/** /**
* *

View file

@ -29,7 +29,9 @@
<exclude name="Console/cake.bat" /> <exclude name="Console/cake.bat" />
<exclude name="Console/cake.php" /> <exclude name="Console/cake.php" />
<exclude name="Console/cake" /> <exclude name="Console/cake" />
<exclude name="Test/**" /> <exclude name="Test/bake_compare/**" />
<exclude name="Test/Case/**" />
<exclude name="Test/test_app/**" />
</fileset> </fileset>
<!-- <!--

View file

@ -135,6 +135,7 @@ class L10n {
/* Kalaallisut (Greenlandic) */ 'kal' => 'kl', /* Kalaallisut (Greenlandic) */ 'kal' => 'kl',
/* Korean */ 'kor' => 'ko', /* Korean */ 'kor' => 'ko',
/* Latvian */ 'lav' => 'lv', /* Latvian */ 'lav' => 'lv',
/* Limburgish */ 'lim' => 'li',
/* Lithuanian */ 'lit' => 'lt', /* Lithuanian */ 'lit' => 'lt',
/* Macedonian */ 'mkd' => 'mk', /* Macedonian */ 'mkd' => 'mk',
/* Macedonian - bibliographic */ 'mac' => 'mk', /* Macedonian - bibliographic */ 'mac' => 'mk',
@ -277,6 +278,7 @@ class L10n {
'ko-kp' => array('language' => 'Korea (North)', 'locale' => 'ko_kp', 'localeFallback' => 'kor', 'charset' => 'kr', 'direction' => 'ltr'), 'ko-kp' => array('language' => 'Korea (North)', 'locale' => 'ko_kp', 'localeFallback' => 'kor', 'charset' => 'kr', 'direction' => 'ltr'),
'ko-kr' => array('language' => 'Korea (South)', 'locale' => 'ko_kr', 'localeFallback' => 'kor', 'charset' => 'kr', 'direction' => 'ltr'), 'ko-kr' => array('language' => 'Korea (South)', 'locale' => 'ko_kr', 'localeFallback' => 'kor', 'charset' => 'kr', 'direction' => 'ltr'),
'koi8-r' => array('language' => 'Russian', 'locale' => 'koi8_r', 'localeFallback' => 'rus', 'charset' => 'koi8-r', 'direction' => 'ltr'), 'koi8-r' => array('language' => 'Russian', 'locale' => 'koi8_r', 'localeFallback' => 'rus', 'charset' => 'koi8-r', 'direction' => 'ltr'),
'li' => array('language' => 'Limburgish', 'locale' => 'lim', 'localeFallback' => 'nld', 'charset' => 'utf-8', 'direction' => 'ltr'),
'lt' => array('language' => 'Lithuanian', 'locale' => 'lit', 'localeFallback' => 'lit', 'charset' => 'utf-8', 'direction' => 'ltr'), 'lt' => array('language' => 'Lithuanian', 'locale' => 'lit', 'localeFallback' => 'lit', 'charset' => 'utf-8', 'direction' => 'ltr'),
'lv' => array('language' => 'Latvian', 'locale' => 'lav', 'localeFallback' => 'lav', 'charset' => 'utf-8', 'direction' => 'ltr'), 'lv' => array('language' => 'Latvian', 'locale' => 'lav', 'localeFallback' => 'lav', 'charset' => 'utf-8', 'direction' => 'ltr'),
'mk' => array('language' => 'FYRO Macedonian', 'locale' => 'mkd', 'localeFallback' => 'mkd', 'charset' => 'utf-8', 'direction' => 'ltr'), 'mk' => array('language' => 'FYRO Macedonian', 'locale' => 'mkd', 'localeFallback' => 'mkd', 'charset' => 'utf-8', 'direction' => 'ltr'),

View file

@ -67,11 +67,15 @@ class MailTransport extends AbstractTransport {
if (ini_get('safe_mode')) { if (ini_get('safe_mode')) {
//@codingStandardsIgnoreStart //@codingStandardsIgnoreStart
if (!@mail($to, $subject, $message, $headers)) { if (!@mail($to, $subject, $message, $headers)) {
throw new SocketException(__d('cake_dev', 'Could not send email.')); $error = error_get_last();
$msg = 'Could not send email: ' . isset($error['message']) ? $error['message'] : 'unknown';
throw new SocketException($msg);
} }
} elseif (!@mail($to, $subject, $message, $headers, $params)) { } elseif (!@mail($to, $subject, $message, $headers, $params)) {
$error = error_get_last();
$msg = 'Could not send email: ' . isset($error['message']) ? $error['message'] : 'unknown';
//@codingStandardsIgnoreEnd //@codingStandardsIgnoreEnd
throw new SocketException(__d('cake_dev', 'Could not send email.')); throw new SocketException($msg);
} }
} }

View file

@ -3782,6 +3782,39 @@ class FormHelperTest extends CakeTestCase {
$this->assertTags($result, $expected); $this->assertTags($result, $expected);
} }
/**
* testRadioDifferentModel
* Refs #2911
*
* @return void
*/
public function testRadioDifferentModel() {
$this->Form->create('User');
$result = $this->Form->radio(
'Model.field',
array('v1' => 'option A', 'v2' => 'option B'),
array('label' => true, 'legend' => false, 'value' => false)
);
$expected = array(
array('input' => array(
'type' => 'radio', 'name' => 'data[Model][field]',
'value' => 'v1', 'id' => 'ModelFieldV1'
)),
array('label' => array('for' => 'ModelFieldV1')),
'option A',
'/label',
array('input' => array(
'type' => 'radio', 'name' => 'data[Model][field]',
'value' => 'v2', 'id' => 'ModelFieldV2'
)),
array('label' => array('for' => 'ModelFieldV2')),
'option B',
'/label'
);
$this->assertTags($result, $expected);
}
/** /**
* Test radio inputs with between as string or array. Also ensure * Test radio inputs with between as string or array. Also ensure
* that an array with less between elements works. * that an array with less between elements works.