prevent deletion of WP Users segment in Segments listing

This commit is contained in:
Jonathan Labreuille
2016-05-20 18:35:40 +02:00
parent 8c56c8da5e
commit d10a29598d
3 changed files with 22 additions and 2 deletions

View File

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