Merge branch 'master' into 2.4

This commit is contained in:
mark_story 2013-08-28 12:35:07 -04:00
commit f18d354f55
5 changed files with 27 additions and 5 deletions

View file

@ -285,7 +285,8 @@
* 'path' => CACHE, //[optional] use system tmp directory - remember to use absolute path
* 'prefix' => 'cake_', //[optional] prefix every cache file with this string
* 'lock' => false, //[optional] use file locking
* 'serialize' => true, [optional]
* 'serialize' => true, //[optional]
* 'mask' => 0664, //[optional]
* ));
*
* APC (http://pecl.php.net/package/APC)

View file

@ -276,7 +276,8 @@
* 'path' => CACHE, //[optional] use system tmp directory - remember to use absolute path
* 'prefix' => 'cake_', //[optional] prefix every cache file with this string
* 'lock' => false, //[optional] use file locking
* 'serialize' => true, [optional]
* 'serialize' => true, //[optional]
* 'mask' => 0664, //[optional]
* ));
*
* APC (http://pecl.php.net/package/APC)

View file

@ -326,7 +326,7 @@ class I18n {
if (is_file($localeDef)) {
$definitions = self::loadLocaleDefinition($localeDef);
if ($definitions !== false) {
$this->_domains[$domain][$this->_lang][$this->category] = self::loadLocaleDefinition($localeDef);
$this->_domains[$domain][$this->_lang][$this->category] = $definitions;
$this->_noLocale = false;
return $domain;
}

View file

@ -407,10 +407,19 @@ class Sqlite extends DboSource {
return null;
}
if (isset($column['key']) && $column['key'] === 'primary' && $type === 'integer') {
$isPrimary = (isset($column['key']) && $column['key'] === 'primary');
if ($isPrimary && $type === 'integer') {
return $this->name($name) . ' ' . $this->columns['primary_key']['name'];
}
return parent::buildColumn($column);
$out = parent::buildColumn($column);
if ($isPrimary && $type === 'biginteger') {
$replacement = 'PRIMARY KEY';
if ($column['null'] === false) {
$replacement = 'NOT NULL ' . $replacement;
}
return str_replace($this->columns['primary_key']['name'], $replacement, $out);
}
return $out;
}
/**

View file

@ -264,6 +264,17 @@ class SqliteTest extends CakeTestCase {
$result = $this->Dbo->buildColumn($data);
$expected = '"huge" bigint(20) NOT NULL';
$this->assertEquals($expected, $result);
$data = array(
'name' => 'id',
'type' => 'biginteger',
'length' => 20,
'null' => false,
'key' => 'primary',
);
$result = $this->Dbo->buildColumn($data);
$expected = '"id" bigint(20) NOT NULL PRIMARY KEY';
$this->assertEquals($expected, $result);
}
/**