RC6
This commit is contained in:
@@ -177,16 +177,7 @@ class App
|
||||
public function apply(string $name, $value)
|
||||
{
|
||||
if ($functions = $this->extension('hooks', $name)) {
|
||||
static $applied = [];
|
||||
|
||||
foreach ($functions as $function) {
|
||||
if (in_array($function, $applied[$name] ?? []) === true) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// mark the hook as triggered, to avoid endless loops
|
||||
$applied[$name][] = $function;
|
||||
|
||||
// bind the App object to the hook
|
||||
$value = $function->call($this, $value);
|
||||
}
|
||||
|
@@ -387,7 +387,7 @@ trait AppPlugins
|
||||
$this->extendCacheTypes([
|
||||
'apcu' => 'Kirby\Cache\ApcuCache',
|
||||
'file' => 'Kirby\Cache\FileCache',
|
||||
'memcached' => 'Kirby\Cache\MemCache',
|
||||
'memcached' => 'Kirby\Cache\MemCached',
|
||||
]);
|
||||
|
||||
$this->extendComponents(include static::$root . '/config/components.php');
|
||||
|
@@ -7,6 +7,7 @@ use Kirby\Exception\InvalidArgumentException;
|
||||
use Kirby\Exception\NotFoundException;
|
||||
use Kirby\Data\Data;
|
||||
use Kirby\Form\Field;
|
||||
use Kirby\Toolkit\A;
|
||||
use Kirby\Toolkit\F;
|
||||
use Kirby\Toolkit\I18n;
|
||||
use Kirby\Toolkit\Obj;
|
||||
@@ -197,10 +198,10 @@ class Blueprint
|
||||
if ($mixin === null) {
|
||||
$props = $props;
|
||||
} elseif (is_array($mixin) === true) {
|
||||
$props = array_replace_recursive($mixin, $props);
|
||||
$props = A::merge($mixin, $props, A::MERGE_REPLACE);
|
||||
} else {
|
||||
try {
|
||||
$props = array_replace_recursive(Data::read($mixin), $props);
|
||||
$props = A::merge(Data::read($mixin), $props, A::MERGE_REPLACE);
|
||||
} catch (Exception $e) {
|
||||
$props = $props;
|
||||
}
|
||||
|
@@ -91,11 +91,11 @@ trait HasChildren
|
||||
}
|
||||
|
||||
/**
|
||||
* Return all drafts for the site
|
||||
* Return all drafts of the model
|
||||
*
|
||||
* @return Pages
|
||||
*/
|
||||
public function drafts(): Pages
|
||||
public function drafts()
|
||||
{
|
||||
if (is_a($this->drafts, 'Kirby\Cms\Pages') === true) {
|
||||
return $this->drafts;
|
||||
|
@@ -191,10 +191,6 @@ class System
|
||||
*/
|
||||
public function isOk(): bool
|
||||
{
|
||||
if ($this->isInstallable() === false) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return in_array(false, array_values($this->status()), true) === false;
|
||||
}
|
||||
|
||||
|
@@ -337,6 +337,16 @@ class Database
|
||||
return $this->lastError;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the name of the database
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function name(): ?string
|
||||
{
|
||||
return $this->database;
|
||||
}
|
||||
|
||||
/**
|
||||
* Private method to execute database queries.
|
||||
* This is used by the query() and execute() methods
|
||||
|
@@ -72,7 +72,7 @@ class Sql
|
||||
return [
|
||||
'query' => $query,
|
||||
'bindings' => [
|
||||
$databaseBinding => $this->database->database,
|
||||
$databaseBinding => $this->database->name(),
|
||||
$tableBinding => $table,
|
||||
]
|
||||
];
|
||||
@@ -696,7 +696,7 @@ class Sql
|
||||
return [
|
||||
'query' => 'SELECT TABLE_NAME AS name FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = ' . $binding,
|
||||
'bindings' => [
|
||||
$binding => $this->database->database
|
||||
$binding => $this->database->name()
|
||||
]
|
||||
];
|
||||
}
|
||||
|
Reference in New Issue
Block a user