mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-18 18:46:17 +00:00
Merge branch '2.4' into 2.5
This commit is contained in:
commit
130ccf4714
11 changed files with 27 additions and 37 deletions
|
@ -28,8 +28,6 @@
|
|||
*/
|
||||
class DbAclSchema extends CakeSchema {
|
||||
|
||||
public $name = 'DbAcl';
|
||||
|
||||
public function before($event = array()) {
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -31,13 +31,6 @@ App::uses('AppController', 'Controller');
|
|||
*/
|
||||
class PagesController extends AppController {
|
||||
|
||||
/**
|
||||
* Controller name
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $name = 'Pages';
|
||||
|
||||
/**
|
||||
* This controller does not use a model
|
||||
*
|
||||
|
|
|
@ -19,8 +19,6 @@
|
|||
*/
|
||||
class DbAclSchema extends CakeSchema {
|
||||
|
||||
public $name = 'DbAcl';
|
||||
|
||||
public function before($event = array()) {
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -23,13 +23,6 @@ App::uses('AppController', 'Controller');
|
|||
*/
|
||||
class PagesController extends AppController {
|
||||
|
||||
/**
|
||||
* Controller name
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $name = 'Pages';
|
||||
|
||||
/**
|
||||
* This controller does not use a model
|
||||
*
|
||||
|
|
|
@ -31,13 +31,6 @@ App::uses('AppController', 'Controller');
|
|||
*/
|
||||
class CakeErrorController extends AppController {
|
||||
|
||||
/**
|
||||
* Controller name
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $name = 'CakeError';
|
||||
|
||||
/**
|
||||
* Uses Property
|
||||
*
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -26,13 +26,6 @@ App::uses('AppModel', 'Model');
|
|||
*/
|
||||
class Permission extends AppModel {
|
||||
|
||||
/**
|
||||
* Model name
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $name = 'Permission';
|
||||
|
||||
/**
|
||||
* Explicitly disable in-memory query caching
|
||||
*
|
||||
|
|
|
@ -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…
Add table
Reference in a new issue