From: Edward Date: Thu, 20 Feb 2014 06:40:26 +0000 (+0800) Subject: MessagePreview.php X-Git-Url: http://git.roojs.org/?p=Pman.Core;a=commitdiff_plain;h=fb07b2fbdbea2e39adbfb82863793c586e5f5866 MessagePreview.php --- diff --git a/MessagePreview.php b/MessagePreview.php index ad784664..b4238f3d 100644 --- a/MessagePreview.php +++ b/MessagePreview.php @@ -38,14 +38,11 @@ class Pman_Core_MessagePreview extends Pman { function post() { - if(empty($_REQUEST['_id'])){ - $this->jerr('id got error'); - } - if(empty($_REQUEST['_action'])){ - $this->jerr('preview type not set'); + if(empty($_REQUEST['_id']) || empty($_REQUEST['_table'])){ + $this->jerr('Missing Options'); } - $msg = DB_DataObject::factory('crm_mailing_list_message'); + $msg = DB_DataObject::factory($_REQUEST['_table']); $msg->get($_REQUEST['_id']);