function pause()
 {
     // you can only pause autoresponder and rss campaigns
     $cid = JRequest::getVar('cid', '', 'post', 'array');
     if (!$cid) {
         $msg = JText::_('JM_INVALID_CAMPAIGNID');
         $error = 'error';
     } else {
         $error = '';
         $params =& JComponentHelper::getParams('com_joomailermailchimpintegration');
         $paramsPrefix = version_compare(JVERSION, '1.6.0', 'ge') ? 'params.' : '';
         $MCapi = $params->get($paramsPrefix . 'MCapi');
         $MC = new joomlamailerMCAPI($MCapi);
         $MCerrorHandler = new MCerrorHandler();
         foreach ($cid as $c) {
             $result = $MC->campaignPause($c);
             if (!$result) {
                 $msg = $MCerrorHandler->getErrorMsg($MC);
                 $error = 'error';
                 break;
             }
         }
         if (!$error) {
             $msg = JText::_('JM_CAMPAIGNS_PAUSED');
             $error = '';
         }
     }
     $link = 'index.php?option=com_joomailermailchimpintegration&view=campaignlist&filter_status=' . JRequest::getVar('type', 'sent');
     $this->setRedirect($link, $msg, $error);
 }