Fix bulk trashing/restoring not working for newsletters/forms on PHP 5.3 [MAILPOET-835]

This commit is contained in:
Alexey Stoletniy
2017-02-24 15:10:38 +03:00
parent 37ac31cdac
commit bfc04bfa87

View File

@ -78,7 +78,7 @@ class Model extends \Sudzy\ValidModel {
static function bulkTrash($orm) {
$model = get_called_class();
$count = self::bulkAction($orm, function($ids) use($model) {
self::rawExecute(join(' ', array(
$model::rawExecute(join(' ', array(
'UPDATE `'.$model::$_table.'`',
'SET `deleted_at` = NOW()',
'WHERE `id` IN ('.rtrim(str_repeat('?,', count($ids)), ',').')'
@ -106,7 +106,7 @@ class Model extends \Sudzy\ValidModel {
static function bulkRestore($orm) {
$model = get_called_class();
$count = self::bulkAction($orm, function($ids) use($model) {
self::rawExecute(join(' ', array(
$model::rawExecute(join(' ', array(
'UPDATE `'.$model::$_table.'`',
'SET `deleted_at` = NULL',
'WHERE `id` IN ('.rtrim(str_repeat('?,', count($ids)), ',').')'