forked from GNUsocial/gnu-social
[MODULES] Fix small error in modules manager
This commit is contained in:
parent
04202b59ef
commit
8ca49ab511
@ -54,7 +54,7 @@ abstract class ModulesManager
|
|||||||
|
|
||||||
// Register event handlers
|
// Register event handlers
|
||||||
$methods = get_class_methods($class);
|
$methods = get_class_methods($class);
|
||||||
$events = F\select($methods, Common::swapArgs('startsWith', 'on'));
|
$events = F\select($methods, F\partial_right('App\Util\Common::startsWith', 'on'));
|
||||||
F\map($events,
|
F\map($events,
|
||||||
function (string $m) use ($class) {
|
function (string $m) use ($class) {
|
||||||
Event::addHandler(substr($m, 2), [$class, $m]);
|
Event::addHandler(substr($m, 2), [$class, $m]);
|
||||||
|
@ -74,7 +74,8 @@ class SchemaDefDriver extends StaticPHPDriver
|
|||||||
$metadata->setPrimaryTable(['name' => $schema['name'],
|
$metadata->setPrimaryTable(['name' => $schema['name'],
|
||||||
'indexes' => self::kv_to_name_col($schema['indexes']),
|
'indexes' => self::kv_to_name_col($schema['indexes']),
|
||||||
'uniqueConstraints' => self::kv_to_name_col($schema['unique keys']),
|
'uniqueConstraints' => self::kv_to_name_col($schema['unique keys']),
|
||||||
'options' => ['comment' => $schema['description']], ]);
|
'options' => ['comment' => $schema['description'] ?? ''],
|
||||||
|
]);
|
||||||
|
|
||||||
foreach ($schema['fields'] as $name => $opts) {
|
foreach ($schema['fields'] as $name => $opts) {
|
||||||
// Convert old to new types
|
// Convert old to new types
|
||||||
|
Loading…
Reference in New Issue
Block a user