<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.4 |
+ | CiviCRM version 4.5 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2013 |
+ | Copyright CiviCRM LLC (c) 2004-2014 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
/**
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2013
+ * @copyright CiviCRM LLC (c) 2004-2014
* $Id$
*
*/
}
/**
- * Function to set variables up before form is built
+ * Set variables up before form is built
*
* @return void
* @access public
}
/**
- * This function sets the default values for the form.
+ * Set default values for the form.
*
* @access public
*
}
/**
- * Build the form for the approval/rejection mailing
+ * Build the form object for the approval/rejection mailing
*
* @param
*
$this->_mailingID,
'subject'
);
- $preview['viewURL'] = CRM_Utils_System::url('civicrm/mailing/view', "reset=1&id={$this->_mailingID}");
+
+ $mailingKey = $this->_mailingID;
+ if ($hash = CRM_Mailing_BAO_Mailing::getMailingHash($mailingKey)) {
+ $mailingKey = $hash;
+ }
+
+ $preview['viewURL'] = CRM_Utils_System::url('civicrm/mailing/view', "reset=1&id={$mailingKey}");
$preview['type'] = $this->_mailing->body_html ? 'html' : 'text';
$preview['attachment'] = CRM_Core_BAO_File::attachmentInfo('civicrm_mailing', $this->_mailingID);