1
0
Fork 0

Fixes several database errors, removes "relation" handling

This commit is contained in:
Michael 2021-02-25 05:13:49 +00:00
commit 99a145f7cf
11 changed files with 39 additions and 176 deletions

View file

@ -218,7 +218,7 @@ class Hook
} else {
// remove orphan hooks
$condition = ['hook' => $name, 'file' => $hook[0], 'function' => $hook[1]];
self::delete($condition, ['cascade' => false]);
self::delete($condition);
}
}
@ -250,13 +250,12 @@ class Hook
* We have to clear the cached routerDispatchData because addons can provide routes
*
* @param array $condition
* @param array $options
* @return bool
* @throws \Exception
*/
public static function delete(array $condition, array $options = [])
public static function delete(array $condition)
{
$result = DBA::delete('hook', $condition, $options);
$result = DBA::delete('hook', $condition);
if ($result) {
DI::cache()->delete('routerDispatchData');