public function delete() { $requests = $this->form('selected'); if (empty($requests)) { $requests = array($this->request('delete')); } $requests = array_filter($requests); if (empty($requests)) { return; } $deleted = 0; foreach ($requests as $delete) { $Record = new ShoppImageSetting((int) $delete); if ($Record->delete()) { $deleted++; } } if ($deleted > 0) { $this->notice(Shopp::_n('%d setting deleted.', '%d settings deleted.', $deleted)); } }