mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge branch '4.5' into 4
This commit is contained in:
commit
4121099484
@ -233,9 +233,7 @@ class Session
|
|||||||
if (self::config()->get('strict_user_agent_check') && isset($this->data['HTTP_USER_AGENT'])) {
|
if (self::config()->get('strict_user_agent_check') && isset($this->data['HTTP_USER_AGENT'])) {
|
||||||
if ($this->data['HTTP_USER_AGENT'] !== $this->userAgent($request)) {
|
if ($this->data['HTTP_USER_AGENT'] !== $this->userAgent($request)) {
|
||||||
$this->clearAll();
|
$this->clearAll();
|
||||||
$this->destroy();
|
$this->restart($request);
|
||||||
$this->started = false;
|
|
||||||
$this->start($request);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -248,7 +246,7 @@ class Session
|
|||||||
public function restart(HTTPRequest $request)
|
public function restart(HTTPRequest $request)
|
||||||
{
|
{
|
||||||
$this->destroy();
|
$this->destroy();
|
||||||
$this->init($request);
|
$this->start($request);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -376,6 +374,7 @@ class Session
|
|||||||
// http://nz1.php.net/manual/en/function.session-destroy.php
|
// http://nz1.php.net/manual/en/function.session-destroy.php
|
||||||
unset($_SESSION);
|
unset($_SESSION);
|
||||||
$this->data = null;
|
$this->data = null;
|
||||||
|
$this->started = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -145,12 +145,8 @@ class DatabaseAdapterRegistry
|
|||||||
$databaseConfig = $config;
|
$databaseConfig = $config;
|
||||||
}
|
}
|
||||||
// Search through all composer packages in vendor, updating $databaseConfig
|
// Search through all composer packages in vendor, updating $databaseConfig
|
||||||
foreach (glob(BASE_PATH . '/vendor/*', GLOB_ONLYDIR) as $vendor) {
|
foreach (glob(BASE_PATH . '/vendor/*/*/_configure_database.php') as $configFile) {
|
||||||
foreach (glob($vendor . '/*', GLOB_ONLYDIR) as $directory) {
|
include_once $configFile;
|
||||||
if (file_exists($directory . '/_configure_database.php')) {
|
|
||||||
include_once($directory . '/_configure_database.php');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
// Update modified variable
|
// Update modified variable
|
||||||
$config = $databaseConfig;
|
$config = $databaseConfig;
|
||||||
|
@ -600,7 +600,7 @@ class ArrayList extends ViewableData implements SS_List, Filterable, Sortable, L
|
|||||||
|
|
||||||
$firstRecord = $this->first();
|
$firstRecord = $this->first();
|
||||||
|
|
||||||
return array_key_exists($by, $firstRecord);
|
return is_array($firstRecord) ? array_key_exists($by, $firstRecord) : property_exists($by, $firstRecord);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -378,8 +378,8 @@ class i18nTextCollector
|
|||||||
// Merge
|
// Merge
|
||||||
if ($existingMessages) {
|
if ($existingMessages) {
|
||||||
$entitiesByModule[$module] = array_merge(
|
$entitiesByModule[$module] = array_merge(
|
||||||
$existingMessages,
|
$messages,
|
||||||
$messages
|
$existingMessages
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user