/** * Run the page. * * This method is called after the page is created. It checks for the * type of action and executes that action. * Finally it calls the parent's run method. * * @return void * @access public * */ function run() { // set title and breadcrumb CRM_Utils_System::setTitle(ts('Settings - Payment Processor')); $breadCrumb = array(array('title' => ts('Global Settings'), 'url' => CRM_Utils_System::url('civicrm/admin/setting', 'reset=1'))); CRM_Utils_System::appendBreadCrumb($breadCrumb); return parent::run(); }
/** * Run the page. * * This method is called after the page is created. It checks for the * type of action and executes that action. * Finally it calls the parent's run method. * * @return void * @access public * */ function run() { // set title and breadcrumb CRM_Utils_System::setTitle(ts('Settings - Scheduled Jobs Log')); $breadCrumb = array(array('title' => ts('Administration'), 'url' => CRM_Utils_System::url('civicrm/admin', 'reset=1'))); CRM_Utils_System::appendBreadCrumb($breadCrumb); return parent::run(); }
function run() { $this->_mailing_id = CRM_Utils_Request::retrieve('mid', $this); require_once 'CRM/Mailing/BAO/Mailing.php'; $report =& CRM_Mailing_BAO_Mailing::report($this->_mailing_id); $this->assign('report', $report); CRM_Utils_System::setTitle(ts('CiviMail Report: %1', array(1 => $report['mailing']['name']))); parent::run(); }
/** * Class constructor. * * @param string $title * Title of the page. * @param int $mode * Mode of the page. * */ public function __construct($title = NULL, $mode = NULL) { parent::__construct($title, $mode); $this->account_id = CRM_Utils_Request::retrieve('account_id', 'Integer', CRM_Core_DAO::$_nullObject, true); $this->assign('account_id', $this->account_id); $this->assign('civicrm_fields', CRM_Myemma_Utils::buildCiviCRMFieldList()); $this->assign('location_types', CRM_Myemma_Utils::locationTypes()); $this->assign('my_emma_fields', CRM_Myemma_Utils::buildMyEmmaFieldList($this->account_id)); }
/** * Run the page. * * This method is called after the page is created. It checks for the * type of action and executes that action. * Finally it calls the parent's run method. */ public function run() { // set title and breadcrumb CRM_Utils_System::setTitle(ts('Settings - SMS Provider')); $breadCrumb = array(array('title' => ts('SMS Provider'), 'url' => CRM_Utils_System::url('civicrm/admin/sms/provider', 'reset=1'))); CRM_Utils_System::appendBreadCrumb($breadCrumb); $this->_id = CRM_Utils_Request::retrieve('id', 'String', $this, FALSE, 0); $this->_action = CRM_Utils_Request::retrieve('action', 'String', $this, FALSE, 0); return parent::run(); }
function run() { $action = CRM_Utils_Request::retrieve('action', 'String', $this, false, 0); $this->assign('action', $action); $id = CRM_Utils_Request::retrieve('id', 'Positive', $this, false, 0); if (!$action) { $this->browse(); } parent::run(); }
/** * Run the page. * * This method is called after the page is created. It checks for the * type of action and executes that action. * Finally it calls the parent's run method. * * @return void */ public function run() { CRM_Utils_System::setTitle(ts('Query Runner')); $this->_id = CRM_Utils_Request::retrieve('id', 'String', $this, FALSE, 0); $this->_action = CRM_Utils_Request::retrieve('action', 'String', $this, FALSE, 0); if ($this->_action == 'export') { $session = CRM_Core_Session::singleton(); $session->pushUserContext(CRM_Utils_System::url('civicrm/query-runner', 'reset=1')); } return parent::run(); }
/** * Run the page. * * This method is called after the page is created. It checks for the * type of action and executes that action. * Finally it calls the parent's run method. */ public function run() { // set title and breadcrumb CRM_Utils_System::setTitle(ts('Settings - Payment Processor')); //CRM-15546 $paymentProcessorTypes = CRM_Core_PseudoConstant::get('CRM_Financial_DAO_PaymentProcessor', 'payment_processor_type_id', array('labelColumn' => 'name', 'flip' => 1)); $this->assign('defaultPaymentProcessorType', $paymentProcessorTypes['PayPal']); $breadCrumb = array(array('title' => ts('Administration'), 'url' => CRM_Utils_System::url('civicrm/admin', 'reset=1'))); CRM_Utils_System::appendBreadCrumb($breadCrumb); return parent::run(); }
/** * Run the page. * * This method is called after the page is created. It checks for the * type of action and executes that action. * Finally it calls the parent's run method. */ public function run() { // set title and breadcrumb CRM_Utils_System::setTitle(ts('Settings - Scheduled Jobs')); $breadCrumb = array(array('title' => ts('Scheduled Jobs'), 'url' => CRM_Utils_System::url('civicrm/admin', 'reset=1'))); CRM_Utils_System::appendBreadCrumb($breadCrumb); $this->_id = CRM_Utils_Request::retrieve('id', 'String', $this, FALSE, 0); $this->_action = CRM_Utils_Request::retrieve('action', 'String', $this, FALSE, 0); if ($this->_action == 'export') { $session = CRM_Core_Session::singleton(); $session->pushUserContext(CRM_Utils_System::url('civicrm/admin/job', 'reset=1')); } return parent::run(); }
/** * Run the page. * * This method is called after the page is created. It checks for the * type of action and executes that action. * Finally it calls the parent's run method. * * @return void * @access public * */ function run() { CRM_Utils_System::setTitle(ts('Appraisal Criteria')); // get the requested action $action = CRM_Utils_Request::retrieve('action', 'String', $this, false, 'browse'); // default to 'browse' // assign vars to templates $this->assign('action', $action); $id = CRM_Utils_Request::retrieve('id', 'Positive', $this, false, 0); // what action to take ? if ($action & (CRM_Core_Action::UPDATE | CRM_Core_Action::ADD)) { $this->edit($action, $id); } // parent run return parent::run(); }
/** * Run the page. * * This method is called after the page is created. It checks for the type * of action and executes that action. Finally it calls the parent's run * method. */ public function run() { // get the requested action, default to 'browse' $action = CRM_Utils_Request::retrieve('action', 'String', $this, FALSE, 'browse'); // assign vars to templates $this->assign('action', $action); $id = CRM_Utils_Request::retrieve('id', 'Positive', $this, FALSE, 0); $context = CRM_Utils_Request::retrieve('context', 'String', $this, FALSE); if ($context == 'nonDupe') { CRM_Core_Session::setStatus(ts('Selected contacts have been marked as not duplicates'), ts('Changes Saved'), 'success'); } // assign permissions vars to template $this->assign('hasperm_administer_dedupe_rules', CRM_Core_Permission::check('administer dedupe rules')); $this->assign('hasperm_merge_duplicate_contacts', CRM_Core_Permission::check('merge duplicate contacts')); // which action to take? if ($action & (CRM_Core_Action::UPDATE | CRM_Core_Action::ADD)) { $this->edit($action, $id); } if ($action & CRM_Core_Action::DELETE) { $this->delete($id); } // browse the rules $this->browse(); // parent run return parent::run(); }
/** * Run the basic page (run essentially starts execution for that page). * * @return void */ function run() { $this->preProcess(); return parent::run(); }
/** * Run the page. * * This method is called after the page is created. It checks for the * type of action and executes that action. * Finally it calls the parent's run method. * * @return void */ public function run() { // get the requested action $action = CRM_Utils_Request::retrieve('action', 'String', $this, FALSE, 'browse'); // assign vars to templates $this->assign('action', $action); $id = CRM_Utils_Request::retrieve('id', 'Positive', $this, FALSE, 0); // what action to take ? if ($action & (CRM_Core_Action::UPDATE | CRM_Core_Action::ADD | CRM_Core_Action::PREVIEW)) { $this->edit($action, $id, TRUE); } // finally browse the custom groups $this->browse(); // parent run return parent::run(); }
/** * Run the page. * * This method is called after the page is created. It checks for the * type of action and executes that action. * Finally it calls the parent's run method. * * @param * @return void * @access public */ function run() { // get the requested action $action = CRM_Utils_Request::retrieve('action', 'String', $this, false, 'browse'); if ($action & CRM_Core_Action::REVERT) { $id = CRM_Utils_Request::retrieve('id', 'Positive', $this, false); CRM_Contribute_BAO_PCP::setIsActive($id, 0); $session = CRM_Core_Session::singleton(); $session->pushUserContext(CRM_Utils_System::url(CRM_Utils_System::currentPath(), 'reset=1')); } elseif ($action & CRM_Core_Action::RENEW) { $id = CRM_Utils_Request::retrieve('id', 'Positive', $this, false); CRM_Contribute_BAO_PCP::setIsActive($id, 1); $session = CRM_Core_Session::singleton(); $session->pushUserContext(CRM_Utils_System::url(CRM_Utils_System::currentPath(), 'reset=1')); } elseif ($action & CRM_Core_Action::DELETE) { $id = CRM_Utils_Request::retrieve('id', 'Positive', $this, false); $session = CRM_Core_Session::singleton(); $session->pushUserContext(CRM_Utils_System::url(CRM_Utils_System::currentPath(), 'reset=1&action=browse')); $controller = new CRM_Core_Controller_Simple('CRM_Contribute_Form_PCP_PCP', 'Personal Campaign Page', CRM_Core_Action::DELETE); //$this->setContext( $id, $action ); $controller->set('id', $id); $controller->process(); return $controller->run(); } // finally browse $this->browse(); // parent run parent::run(); }
/** * Run the page. * * This method is called after the page is created. It checks for the * type of action and executes that action. * Finally it calls the parent's run method. */ public function run() { // get the requested action $action = CRM_Utils_Request::retrieve('action', 'String', $this, FALSE, 'browse'); // assign vars to templates $this->assign('action', $action); $id = CRM_Utils_Request::retrieve('id', 'Positive', $this, FALSE, 0); $this->assign('id', $id); $this->edit($action, $id, FALSE, FALSE); // this is special case where we need to call browse to list premium if ($action == CRM_Core_Action::UPDATE) { $this->browse(); } // parent run return parent::run(); }
/** * Run the page. * * This method is called after the page is created. It checks for the * type of action and executes that action. * Finally it calls the parent's run method. * * @return void */ public function run() { // get the requested action $action = CRM_Utils_Request::retrieve('action', 'String', $this, FALSE, 'browse'); // assign vars to templates $this->assign('action', $action); $id = CRM_Utils_Request::retrieve('id', 'Positive', $this, FALSE, 0); // set breadcrumb to append to admin/access $breadCrumb = array(array('title' => ts('Access Control'), 'url' => CRM_Utils_System::url('civicrm/admin/access', 'reset=1'))); CRM_Utils_System::appendBreadCrumb($breadCrumb); // what action to take ? if ($action & (CRM_Core_Action::UPDATE | CRM_Core_Action::ADD | CRM_Core_Action::DELETE)) { $this->edit($action, $id); } // finally browse the acl's $this->browse(); // parent run return parent::run(); }
/** * Browse all rule groups. */ public function run() { $gid = CRM_Utils_Request::retrieve('gid', 'Positive', $this, FALSE, 0); $action = CRM_Utils_Request::retrieve('action', 'String', $this, FALSE, 0); $context = CRM_Utils_Request::retrieve('context', 'String', $this); $session = CRM_Core_Session::singleton(); $contactIds = $session->get('selectedSearchContactIds'); if ($context == 'search' || !empty($contactIds)) { $context = 'search'; $this->assign('backURL', $session->readUserContext()); } if ($action & CRM_Core_Action::RENEW) { // empty cache $rgid = CRM_Utils_Request::retrieve('rgid', 'Positive', $this, FALSE, 0); if ($rgid) { $contactType = CRM_Core_DAO::getFieldValue('CRM_Dedupe_DAO_RuleGroup', $rgid, 'contact_type'); $cacheKeyString = "merge {$contactType}"; $cacheKeyString .= $rgid ? "_{$rgid}" : '_0'; $cacheKeyString .= $gid ? "_{$gid}" : '_0'; CRM_Core_BAO_PrevNextCache::deleteItem(NULL, $cacheKeyString); } $urlQry = "reset=1&action=update&rgid={$rgid}"; if ($gid) { $urlQry .= "&gid={$gid}"; } CRM_Utils_System::redirect(CRM_Utils_System::url('civicrm/contact/dedupefind', $urlQry)); } elseif ($action & CRM_Core_Action::MAP) { // do a batch merge if requested $rgid = CRM_Utils_Request::retrieve('rgid', 'Positive', $this, FALSE, 0); $result = CRM_Dedupe_Merger::batchMerge($rgid, $gid, 'safe', TRUE, 75); $skippedCount = CRM_Utils_Request::retrieve('skipped', 'Positive', $this, FALSE, 0); $skippedCount = $skippedCount + count($result['skipped']); $mergedCount = CRM_Utils_Request::retrieve('merged', 'Positive', $this, FALSE, 0); $mergedCount = $mergedCount + count($result['merged']); if (empty($result['merged']) && empty($result['skipped'])) { $message = ''; if ($mergedCount >= 1) { $message = ts("%1 pairs of duplicates were merged", array(1 => $mergedCount)); } if ($skippedCount >= 1) { $message = $message ? "{$message} and " : ''; $message .= ts("%1 pairs of duplicates were skipped due to conflict", array(1 => $skippedCount)); } $message .= ts(" during the batch merge process with safe mode."); CRM_Core_Session::setStatus($message, ts('Merge Complete'), 'success'); $urlQry = "reset=1&action=update&rgid={$rgid}"; if ($gid) { $urlQry .= "&gid={$gid}"; } CRM_Utils_System::redirect(CRM_Utils_System::url('civicrm/contact/dedupefind', $urlQry)); } else { $urlQry = "reset=1&action=map&rgid={$rgid}"; if ($gid) { $urlQry .= "&gid={$gid}"; } $urlQry .= "&skipped={$skippedCount}&merged={$mergedCount}"; CRM_Utils_System::jsRedirect(CRM_Utils_System::url('civicrm/contact/dedupefind', $urlQry), ts('Batch Merge Task in progress'), ts('The batch merge task is still in progress. This page will be refreshed automatically.')); } } if ($action & CRM_Core_Action::UPDATE || $action & CRM_Core_Action::BROWSE) { $cid = CRM_Utils_Request::retrieve('cid', 'Positive', $this, FALSE, 0); $rgid = CRM_Utils_Request::retrieve('rgid', 'Positive', $this, FALSE, 0); $this->action = CRM_Core_Action::UPDATE; //calculate the $contactType if ($rgid) { $contactType = CRM_Core_DAO::getFieldValue('CRM_Dedupe_DAO_RuleGroup', $rgid, 'contact_type'); } $sourceParams = 'snippet=4'; if ($gid) { $sourceParams .= "&gid={$gid}"; } if ($rgid) { $sourceParams .= "&rgid={$rgid}"; } if ($context == 'conflicts') { $sourceParams .= "&selected=1"; } $this->assign('sourceUrl', CRM_Utils_System::url('civicrm/ajax/dedupefind', $sourceParams, FALSE, NULL, FALSE)); //reload from cache table $cacheKeyString = "merge {$contactType}"; $cacheKeyString .= $rgid ? "_{$rgid}" : '_0'; $cacheKeyString .= $gid ? "_{$gid}" : '_0'; $stats = CRM_Dedupe_Merger::getMergeStatsMsg($cacheKeyString); if ($stats) { CRM_Core_Session::setStatus($stats); // reset so we not displaying same message again CRM_Dedupe_Merger::resetMergeStats($cacheKeyString); } $join = "LEFT JOIN civicrm_dedupe_exception de ON ( pn.entity_id1 = de.contact_id1 AND\n pn.entity_id2 = de.contact_id2 )"; $where = "de.id IS NULL"; if ($context == 'conflicts') { $where .= " AND pn.is_selected = 1"; } $this->_mainContacts = CRM_Core_BAO_PrevNextCache::retrieve($cacheKeyString, $join, $where); if (empty($this->_mainContacts)) { if ($context == 'conflicts') { // if the current screen was intended to list only selected contacts, move back to full dupe list $sourceParams = 'reset=1&action=update'; if ($gid) { $sourceParams .= "&gid={$gid}"; } if ($rgid) { $sourceParams .= "&rgid={$rgid}"; } CRM_Utils_System::redirect(CRM_Utils_System::url(CRM_Utils_System::currentPath(), $sourceParams)); } if ($gid) { $foundDupes = $this->get("dedupe_dupes_{$gid}"); if (!$foundDupes) { $foundDupes = CRM_Dedupe_Finder::dupesInGroup($rgid, $gid); } $this->set("dedupe_dupes_{$gid}", $foundDupes); } elseif (!empty($contactIds)) { $foundDupes = $this->get("search_dedupe_dupes_{$gid}"); if (!$foundDupes) { $foundDupes = CRM_Dedupe_Finder::dupes($rgid, $contactIds); } $this->get("search_dedupe_dupes_{$gid}", $foundDupes); } else { $foundDupes = $this->get('dedupe_dupes'); if (!$foundDupes) { $foundDupes = CRM_Dedupe_Finder::dupes($rgid); } $this->set('dedupe_dupes', $foundDupes); } if (!$foundDupes) { $ruleGroup = new CRM_Dedupe_BAO_RuleGroup(); $ruleGroup->id = $rgid; $ruleGroup->find(TRUE); $session = CRM_Core_Session::singleton(); $session->setStatus(ts('No possible duplicates were found using %1 rule.', array(1 => $ruleGroup->name)), ts('None Found'), 'info'); $url = CRM_Utils_System::url('civicrm/contact/deduperules', 'reset=1'); if ($context == 'search') { $url = $session->readUserContext(); } CRM_Utils_System::redirect($url); } else { $cids = array(); foreach ($foundDupes as $dupe) { $cids[$dupe[0]] = 1; $cids[$dupe[1]] = 1; } $cidString = implode(', ', array_keys($cids)); $sql = "SELECT id, display_name FROM civicrm_contact WHERE id IN ({$cidString}) ORDER BY sort_name"; $dao = new CRM_Core_DAO(); $dao->query($sql); $displayNames = array(); while ($dao->fetch()) { $displayNames[$dao->id] = $dao->display_name; } // FIXME: sort the contacts; $displayName // is already sort_name-sorted, so use that // (also, consider sorting by dupe count first) // lobo - change the sort to by threshold value // so the more likely dupes are sorted first $session = CRM_Core_Session::singleton(); $userId = $session->get('userID'); $mainContacts = $permission = array(); foreach ($foundDupes as $dupes) { $srcID = $dupes[0]; $dstID = $dupes[1]; if ($dstID == $userId) { $srcID = $dupes[1]; $dstID = $dupes[0]; } /*** * Eliminate this since it introduces 3 queries PER merge row * and hence is very expensive * CRM-8822 * if ( !array_key_exists( $srcID, $permission ) ) { * $permission[$srcID] = CRM_Contact_BAO_Contact_Permission::allow( $srcID, CRM_Core_Permission::EDIT ); * } * if ( !array_key_exists( $dstID, $permission ) ) { * $permission[$dstID] = CRM_Contact_BAO_Contact_Permission::allow( $dstID, CRM_Core_Permission::EDIT ); * } * * $canMerge = ( $permission[$dstID] && $permission[$srcID] ); * */ // we'll do permission checking during the merge process $canMerge = TRUE; $mainContacts[] = $row = array('srcID' => $srcID, 'srcName' => $displayNames[$srcID], 'dstID' => $dstID, 'dstName' => $displayNames[$dstID], 'weight' => $dupes[2], 'canMerge' => $canMerge); $data = CRM_Core_DAO::escapeString(serialize($row)); $values[] = " ( 'civicrm_contact', {$srcID}, {$dstID}, '{$cacheKeyString}', '{$data}' ) "; } if ($cid) { $this->_cid = $cid; } if ($gid) { $this->_gid = $gid; } $this->_rgid = $rgid; $this->_mainContacts = $mainContacts; CRM_Core_BAO_PrevNextCache::setItem($values); $session = CRM_Core_Session::singleton(); if ($this->_cid) { $session->pushUserContext(CRM_Utils_System::url('civicrm/contact/deduperules', "action=update&rgid={$this->_rgid}&gid={$this->_gid}&cid={$this->_cid}")); } else { $session->pushUserContext(CRM_Utils_System::url('civicrm/contact/dedupefind', "reset=1&action=update&rgid={$this->_rgid}")); } } } else { if ($cid) { $this->_cid = $cid; } if ($gid) { $this->_gid = $gid; } $this->_rgid = $rgid; } $this->assign('action', $this->action); $this->browse(); } else { $this->action = CRM_Core_Action::UPDATE; $this->edit($this->action); $this->assign('action', $this->action); } $this->assign('context', $context); // parent run return parent::run(); }
/** * Run the page. * * This method is called after the page is created. It checks for the * type of action and executes that action. * Finally it calls the parent's run method. * * @return void * @access public * */ function run() { $this->_gid = CRM_Utils_Request::retrieve('gid', 'Positive', $this, FALSE, 0); $this->assign('gid', $this->_gid); if ($this->_gid) { //get optionGroup name in case of email/postal greeting or addressee, CRM-4575 $this->_gName = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_OptionGroup', $this->_gid, 'name'); $groupTitle = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_OptionGroup', $this->_gid, 'title', 'id'); // Some option groups do not have a title set if (!$groupTitle) { $groupTitle = $this->_gName; } CRM_Utils_System::setTitle(ts('%1 - Option Values', array(1 => $groupTitle))); } $breadCrumb = array(array('title' => ts('Option Groups'), 'url' => CRM_Utils_System::url('civicrm/admin/options', 'reset=1'))); CRM_Utils_System::appendBreadCrumb($breadCrumb); return parent::run(); }
/** * Run the page. * * This method is called after the page is created. It checks for the * type of action and executes that action. * Finally it calls the parent's run method. */ public function run() { $context = CRM_Utils_Request::retrieve('context', 'String', $this); $this->set("context", $context); // assign vars to templates $id = CRM_Utils_Request::retrieve('id', 'Positive', $this, FALSE, 0); $action = CRM_Utils_Request::retrieve('action', 'String', $this, FALSE, 'browse'); // default to 'browse' // what action to take ? if ($action & (CRM_Core_Action::UPDATE | CRM_Core_Action::ADD | CRM_Core_Action::CLOSE | CRM_Core_Action::REOPEN | CRM_Core_Action::EXPORT)) { $this->edit($action, $id); } // parent run return parent::run(); }
/** * Run the page. * * This method is called after the page is created. It checks for the * type of action and executes that action. * Finally it calls the parent's run method. * * @return void * @access public * */ function run() { // get the requested action $action = CRM_Utils_Request::retrieve('action', $this, false, 'browse'); // default to 'browse' // assign vars to templates $this->assign('action', $action); $id = CRM_Utils_Request::retrieve('id', $this, false, 0); // what action to take ? if ($action & (CRM_CORE_ACTION_UPDATE | CRM_CORE_ACTION_ADD | CRM_CORE_ACTION_PREVIEW)) { $this->edit($action, $id, true); } // finally browse the custom groups $this->browse(); // parent run parent::run(); }
function run($args = null, $pageArgs = null, $sort = null) { return parent::run($args, $pageArgs, "component_type, is_default desc, name"); }
/** * Run the page. * * This method is called after the page is created. It checks for the * type of action and executes that action. * Finally it calls the parent's run method. * * @return void * @access public * */ function run() { // get the requested action $action = CRM_Utils_Request::retrieve('action', 'String', $this, FALSE, 'browse'); // assign vars to templates $this->assign('action', $action); $id = CRM_Utils_Request::retrieve('id', 'Positive', $this, FALSE, 0); // set breadcrumb to append to admin/access $breadCrumb = array(array('title' => ts('Access Control'), 'url' => CRM_Utils_System::url('civicrm/admin/access', 'reset=1'))); CRM_Utils_System::appendBreadCrumb($breadCrumb); // what action to take ? if ($action & (CRM_Core_Action::ADD | CRM_Core_Action::DELETE)) { $this->edit($action, $id); } if ($action & CRM_Core_Action::UPDATE) { $this->edit($action, $id); if (isset($id)) { $aclName = CRM_Core_DAO::getFieldValue('CRM_ACL_DAO_ACL', $id); CRM_Utils_System::setTitle(ts('Edit ACL - %1', array(1 => $aclName))); } } // finally browse the acl's if ($action & CRM_Core_Action::BROWSE) { $this->browse(); } // parent run return parent::run(); }
/** * Run the page. * * This method is called after the page is created. It checks for the * type of action and executes that action. * Finally it calls the parent's run method. */ public function run() { // set title and breadcrumb CRM_Utils_System::setTitle(ts('Settings - Date Preferences')); return parent::run(); }
/** * Run the basic page. */ public function run() { $sort = 'mapping_type asc'; return parent::run($sort); }
/** * @param null $args * @param null $pageArgs * @param null $sort * * @throws Exception */ function run($args = NULL, $pageArgs = NULL, $sort = NULL) { // handle the revert action and offload the rest to parent if (CRM_Utils_Request::retrieve('action', 'String', $this) & CRM_Core_Action::REVERT) { $id = CRM_Utils_Request::retrieve('id', 'Positive', $this); if (!$this->checkPermission($id, NULL)) { CRM_Core_Error::fatal(ts('You do not have permission to revert this template.')); } $this->_revertedId = $id; CRM_Core_BAO_MessageTemplate::revert($id); } $this->assign('selectedChild', CRM_Utils_Request::retrieve('selectedChild', 'String', $this)); return parent::run($args, $pageArgs, $sort); }
/** * Run the page. * * This method is called after the page is created. It checks for the * type of action and executes that action. * Finally it calls the parent's run method. * * @return void * @access public * */ function run() { // get the requested action $action = CRM_Utils_Request::retrieve('action', 'String', $this, false, 'browse'); // default to 'browse' // assign vars to templates $this->assign('action', $action); $id = CRM_Utils_Request::retrieve('id', 'Positive', $this, false, 0); // set breadcrumb to append to admin/access $breadCrumb = array(array('title' => ts('Access Control'), 'url' => CRM_Utils_System::url('civicrm/admin/access', 'reset=1'))); CRM_Utils_System::appendBreadCrumb($breadCrumb); CRM_Utils_System::setTitle(ts('Assign Users to Roles')); // what action to take ? if ($action & (CRM_Core_Action::UPDATE | CRM_Core_Action::ADD | CRM_Core_Action::DELETE)) { $this->edit($action, $id); } // reset cache if enabled/disabled if ($action & (CRM_Core_Action::DISABLE | CRM_Core_Action::ENABLE)) { require_once 'CRM/ACL/BAO/Cache.php'; CRM_ACL_BAO_Cache::resetCache(); } // finally browse the acl's $this->browse(); // parent run parent::run(); }
/** * Run the page. * * This method is called after the page is created. It checks for the * type of action and executes that action. * Finally it calls the parent's run method. * * @return void * @access public * */ function run() { // get the requested action $action = CRM_Utils_Request::retrieve('action', 'String', $this, false, 'browse'); // default to 'browse' // assign vars to templates $this->assign('action', $action); $id = CRM_Utils_Request::retrieve('id', 'Positive', $this, false, 0); // what action to take ? if ($action & (CRM_Core_Action::UPDATE | CRM_Core_Action::ADD)) { $this->edit($action, $id); } // finally browse the custom groups $this->browse(); // parent run parent::run(); }
function run() { $this->_mailing_id = CRM_Utils_Request::retrieve('mid', 'Positive', $this); // check that the user has permission to access mailing id require_once 'CRM/Mailing/BAO/Mailing.php'; CRM_Mailing_BAO_Mailing::checkPermission($this->_mailing_id); require_once 'CRM/Mailing/BAO/Mailing.php'; $report =& CRM_Mailing_BAO_Mailing::report($this->_mailing_id); // #6835 Email Mutithreading //if ( count($report['jobs']) > 1 ) { // CRM_Core_Error::statusBounce(ts('Selected Mailing has more than one live job.')); //} //get contents of mailing CRM_Mailing_BAO_Mailing::getMailingContent($report, $this); //assign backurl $context = CRM_Utils_Request::retrieve('context', 'String', $this); $cid = CRM_Utils_Request::retrieve('cid', 'Positive', $this); if ($context == 'activitySelector') { $backUrl = CRM_Utils_System::url('civicrm/contact/view', "reset=1&cid={$cid}&selectedChild=activity"); $backUrlTitle = ts('Back to Activities'); } else { if ($context == 'activity') { $atype = CRM_Utils_Request::retrieve('atype', 'Positive', $this); $aid = CRM_Utils_Request::retrieve('aid', 'Positive', $this); $backUrl = CRM_Utils_System::url('civicrm/activity/view', "atype={$atype}&action=view&reset=1&id={$aid}&cid={$cid}&context=activity"); $backUrlTitle = ts('Back to Activity'); } else { $backUrl = CRM_Utils_System::url('civicrm/mailing', 'reset=1'); $backUrlTitle = ts('Back to CiviMail'); } } $this->assign('backUrl', $backUrl); $this->assign('backUrlTitle', $backUrlTitle); $this->assign('report', $report); CRM_Utils_System::setTitle(ts('CiviMail Report: %1', array(1 => $report['mailing']['name']))); parent::run(); }
/** * Run the page. * * This method is called after the page is created. It checks for the * type of action and executes that action. * Finally it calls the parent's run method. * * @return void * @access public * */ function run() { $this->_sid = CRM_Utils_Request::retrieve('sid', 'Positive', $this, FALSE, 0); $this->assign('sid', $this->_sid); // set title and breadcrumb CRM_Utils_System::setTitle(ts('Settings - Resource Configuration Option')); /*$breadCrumb = array(array('title' => ts('Administration'), 'url' => CRM_Utils_System::url('civicrm/admin', 'reset=1' ), )); CRM_Utils_System::appendBreadCrumb($breadCrumb); */ return parent::run(); }
/** * Run the page. * * This method is called after the page is created. It checks for the * type of action and executes that action. * Finally it calls the parent's run method. * * @return void * @access public * */ function run() { // set title and breadcrumb CRM_Utils_System::setTitle(ts('Settings - Manage Resource')); /*$breadCrumb = array(array('title' => ts('Administration'), 'url' => CRM_Utils_System::url('civicrm/admin', 'reset=1' ), )); CRM_Utils_System::appendBreadCrumb($breadCrumb);*/ return parent::run(); }