Add Idiorm to MailPoetVendor namespace

[MAILPOET-2545]
This commit is contained in:
Jan Jakeš
2019-11-25 17:40:12 +01:00
committed by Jack Kitterhing
parent eb130c1aea
commit 60889c53f4
116 changed files with 632 additions and 507 deletions

View File

@@ -6,6 +6,7 @@ use Carbon\Carbon;
use MailPoet\Entities\ScheduledTaskEntity;
use MailPoet\Util\Helpers;
use MailPoet\WP\Functions as WPFunctions;
use MailPoetVendor\Idiorm\ORM;
/**
* @property int $id
@@ -117,12 +118,12 @@ class ScheduledTask extends Model {
function delete() {
try {
\ORM::get_db()->beginTransaction();
ORM::get_db()->beginTransaction();
ScheduledTaskSubscriber::where('task_id', $this->id)->deleteMany();
parent::delete();
\ORM::get_db()->commit();
ORM::get_db()->commit();
} catch (\Exception $error) {
\ORM::get_db()->rollBack();
ORM::get_db()->rollBack();
throw $error;
}
}