mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Merge branch 'master' into 2.4
This commit is contained in:
commit
f18d354f55
5 changed files with 27 additions and 5 deletions
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue