diff --git a/app/Config/core.php b/app/Config/core.php index 6586b2b02..ba7a9d0ea 100644 --- a/app/Config/core.php +++ b/app/Config/core.php @@ -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) diff --git a/lib/Cake/Console/Templates/skel/Config/core.php b/lib/Cake/Console/Templates/skel/Config/core.php index 22a80b71f..4f91b05e6 100644 --- a/lib/Cake/Console/Templates/skel/Config/core.php +++ b/lib/Cake/Console/Templates/skel/Config/core.php @@ -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) diff --git a/lib/Cake/I18n/I18n.php b/lib/Cake/I18n/I18n.php index a522bdaa8..d3da164b7 100644 --- a/lib/Cake/I18n/I18n.php +++ b/lib/Cake/I18n/I18n.php @@ -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; } diff --git a/lib/Cake/Model/Datasource/Database/Sqlite.php b/lib/Cake/Model/Datasource/Database/Sqlite.php index da61aa273..8251fc34b 100644 --- a/lib/Cake/Model/Datasource/Database/Sqlite.php +++ b/lib/Cake/Model/Datasource/Database/Sqlite.php @@ -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; } /** diff --git a/lib/Cake/Test/Case/Model/Datasource/Database/SqliteTest.php b/lib/Cake/Test/Case/Model/Datasource/Database/SqliteTest.php index 564fe593e..a121da575 100644 --- a/lib/Cake/Test/Case/Model/Datasource/Database/SqliteTest.php +++ b/lib/Cake/Test/Case/Model/Datasource/Database/SqliteTest.php @@ -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); } /**