Browse Source

Merge branch 'master' into 2.5

Conflicts:
	lib/Cake/VERSION.txt
mark_story 12 years ago
parent
commit
5544fcc4c2

+ 10 - 0
app/Config/Schema/db_acl.php

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

+ 1 - 1
app/Config/core.php

@@ -275,7 +275,7 @@
  * 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.
  */
-	//Configure::write('Config.timezone', 'Europe/Paris')
+	//Configure::write('Config.timezone', 'Europe/Paris');
 
 /**
  *

+ 3 - 1
build.xml

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

+ 2 - 0
lib/Cake/I18n/L10n.php

@@ -135,6 +135,7 @@ class L10n {
 		/* Kalaallisut (Greenlandic) */ 'kal' => 'kl',
 		/* Korean */ 'kor' => 'ko',
 		/* Latvian */ 'lav' => 'lv',
+		/* Limburgish */ 'lim' => 'li',
 		/* Lithuanian */ 'lit' => 'lt',
 		/* Macedonian */ 'mkd' => '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-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'),
+		'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'),
 		'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'),

+ 6 - 2
lib/Cake/Network/Email/MailTransport.php

@@ -67,11 +67,15 @@ class MailTransport extends AbstractTransport {
 		if (ini_get('safe_mode')) {
 			//@codingStandardsIgnoreStart
 			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)) {
+			$error = error_get_last();
+			$msg = 'Could not send email: ' . isset($error['message']) ? $error['message'] : 'unknown';
 			//@codingStandardsIgnoreEnd
-			throw new SocketException(__d('cake_dev', 'Could not send email.'));
+			throw new SocketException($msg);
 		}
 	}
 

+ 33 - 0
lib/Cake/Test/Case/View/Helper/FormHelperTest.php

@@ -3783,6 +3783,39 @@ class FormHelperTest extends CakeTestCase {
 	}
 
 /**
+ * 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
  * that an array with less between elements works.
  *