Enhanced deletion script to allow access to db object directly.

This allows the user to choose wheather better issue plain SQL or operate on the objects (suggested)
This commit is contained in:
Christian Wolf 2019-05-23 17:54:38 +02:00
parent 8b25925ec4
commit e6db7787ef

View File

@ -331,7 +331,7 @@ abstract class AbstractCommonClubsModel
$q->where("id = {$this->id}");
}
protected function prepareDelete()
protected function prepareDelete($db)
{}
public function delete()
@ -345,7 +345,7 @@ abstract class AbstractCommonClubsModel
$q->where("id = {$this->id}");
$db->transactionStart();
$this->prepareDelete();
$this->prepareDelete($db);
$db->setQuery($q);
$db->execute();
$db->transactionCommit();