$this->assign('id', $this->_id);
$this->assign('key', $this->_key);
-
switch ($this->_action) {
case CRM_Core_Action::ADD:
case CRM_Core_Action::DELETE:
CRM_Core_Session::setStatus($msg, ts('Warning: Update Greeting job enabled'), 'alert');
}
-
}
}
$this->add('checkbox', 'is_ssl', ts('Use SSL?'));
- $usedfor = array(1 => ts('Bounce Processing'),
+ $usedfor = array(
+ 1 => ts('Bounce Processing'),
0 => ts('Email-to-Activity Processing'),
);
$this->add('select', 'is_default', ts('Used For?'), $usedfor);
return;
}
- $breadCrumb = array(array('title' => ts('Message Templates'),
+ $breadCrumb = array(array(
+ 'title' => ts('Message Templates'),
'url' => CRM_Utils_System::url('civicrm/admin/messageTemplates',
'action=browse&reset=1'
),
else {
$this->addWysiwyg('msg_html', ts('HTML Message'),
array(
- 'cols' => '80', 'rows' => '8',
+ 'cols' => '80',
+ 'rows' => '8',
'onkeyup' => "return verify(this)",
)
);
}
}
-
$session->pushUserContext(CRM_Utils_System::url($url, $params));
$this->assign('id', $this->_id);
}
if ($this->_gName == 'case_status') {
- $classes = array('Opened' => ts('Opened'),
+ $classes = array(
+ 'Opened' => ts('Opened'),
'Closed' => ts('Closed'),
);
//get contact type for which user want to create a new greeting/addressee type, CRM-4575
if (in_array($this->_gName, array(
'email_greeting', 'postal_greeting', 'addressee')) && !$isReserved) {
- $values = array(1 => ts('Individual'),
+ $values = array(
+ 1 => ts('Individual'),
2 => ts('Household'),
3 => ts('Organization'),
4 => ts('Multiple Contact Merge'),
);
// make sure a malicious POST does not change these on reserved statuses
- if ($this->_isReserved)unset($params['name'], $params['class'], $params['is_active']);
+ if ($this->_isReserved) { unset($params['name'], $params['class'], $params['is_active']);
+ }
if ($this->_action & CRM_Core_Action::UPDATE) {
);
$types = CRM_Core_PseudoConstant::paymentProcessorType();
- $this->add( 'select', 'payment_processor_type_id', ts('Payment Processor Type'), $types, true,
+ $this->add( 'select', 'payment_processor_type_id', ts('Payment Processor Type'), $types, TRUE,
array('onchange' => "reload(true)")
);
}
$this->add('select', 'financial_account_id', ts('Financial Account'),
array('' => ts('- select -')) + $financialAccount,
- true
+ TRUE
);
// is this processor active ?
$this->add('checkbox', 'is_active', ts('Is this Payment Processor active?'));
$this->add('checkbox', 'is_default', ts('Is this Payment Processor the default?'));
-
foreach ($this->_fields as $field) {
if (empty($field['label'])) {
continue;
public function setDefaultValues() {
$defaults = array();
if ($this->_ppType) {
- $defaults['payment_processor_type_id'] = $this->_ppType;
+ $defaults['payment_processor_type_id'] = $this->_ppType;
}
if (!$this->_id) {
$defaults['is_active'] = $defaults['is_default'] = 1;
return;
}
- $attributes = CRM_Core_DAO::getAttribute( 'CRM_Financial_DAO_PaymentProcessorType' );
+ $attributes = CRM_Core_DAO::getAttribute( 'CRM_Financial_DAO_PaymentProcessorType' );
foreach ($this->_fields as $field) {
$required = CRM_Utils_Array::value('required', $field, FALSE);
return $defaults;
}
- $dao = new CRM_Financial_DAO_PaymentProcessorType( );
+ $dao = new CRM_Financial_DAO_PaymentProcessorType( );
$dao->id = $this->_id;
if (!$dao->find(TRUE)) {
CRM_Core_DAO::executeQuery($query, CRM_Core_DAO::$_nullArray);
}
- $dao = new CRM_Financial_DAO_PaymentProcessorType( );
+ $dao = new CRM_Financial_DAO_PaymentProcessorType( );
$dao->id = $this->_id;
$dao->is_default = CRM_Utils_Array::value('is_default', $values, 0);
public function buildQuickForm() {
parent::buildQuickForm();
-
if (!empty($this->_varNames)) {
foreach ($this->_varNames as $groupName => $groupValues) {
$formName = CRM_Utils_String::titleToVar($groupName);
$defaults['address_standardization_userid'] = $this->_config->address_standardization_userid;
$defaults['address_standardization_url'] = $this->_config->address_standardization_url;
-
$this->addressSequence = isset($newSequence) ? $newSequence : "";
if (empty($this->_config->address_format)) {
$defaults['mailing_format'] = $this->_config->mailing_format;
}
-
parent::cbsDefaultValues($defaults);
return $defaults;
$this->_params = $this->controller->exportValues($this->_name);
-
// check if county option has been set
$options = CRM_Core_OptionGroup::values('address_options', FALSE, FALSE, TRUE);
foreach ($options as $key => $title) {
$docLink = CRM_Utils_System::docURL2("CiviEvent Cart Checkout", NULL, NULL, NULL, NULL, "wiki");
// build an array containing all selectable option values for show_events
$optionValues = array();
- for ($i=10; $i <= 100; $i+=10) {
+ for ($i = 10; $i <= 100; $i += 10) {
$optionValues[$i] = $i;
}
$this->_varNames = array(
if ($this->_id &&
CRM_Core_DAO::getFieldValue('CRM_Contact_DAO_RelationshipType', $this->_id, 'is_reserved')
) {
- foreach (array('contactTypeA', 'contactTypeB', 'isActive') as $field)$$field->freeze();
+ foreach (array('contactTypeA', 'contactTypeB', 'isActive') as $field) { $$field->freeze();
+ }
}
if ($this->_action & CRM_Core_Action::VIEW) {
}
}
- if (!empty($_POST) && !empty($_POST['entity']) && empty($this->_context)) {
- $mappingID = $_POST['entity'][0];
- }
- elseif ($this->_mappingID) {
- $mappingID = $this->_mappingID;
- }
+ if (!empty($_POST) && !empty($_POST['entity']) && empty($this->_context)) {
+ $mappingID = $_POST['entity'][0];
+ }
+ elseif ($this->_mappingID) {
+ $mappingID = $this->_mappingID;
+ }
$this->add(
'text',
//reminder_frequency
$this->add('select', 'start_action_unit', ts('Frequency'), $freqUnitsDisplay, TRUE);
- $condition = array('before' => ts('before'),
+ $condition = array(
+ 'before' => ts('before'),
'after' => ts('after'),
);
//reminder_action
$templateParams += array(
'msg_text' => $params['sms_body_text'],
'is_sms' => TRUE,
- );
+ );
}
else {
$templateParams += array(
// save components to be enabled
if (array_key_exists('enableComponents', $params)) {
CRM_Core_BAO_Setting::setItem($params['enableComponents'],
- CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME,'enable_components');
+ CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'enable_components');
// unset params by emptying the values, so while retrieving we can detect and load from settings table
// instead of config-backend for backward compatibility. We could use unset() in later releases.
}
// if we manipulated the language list, return to the localization admin screen
- $return = (bool)(CRM_Utils_Array::value('makeMultilingual', $values) or CRM_Utils_Array::value('addLanguage', $values));
+ $return = (bool) (CRM_Utils_Array::value('makeMultilingual', $values) or CRM_Utils_Array::value('addLanguage', $values));
// save all the settings
parent::commonProcess($values);
// FIXME: for now, disable logging for multilingual sites OR if triggers are not permittted
$domain = new CRM_Core_DAO_Domain;
$domain->find(TRUE);
- $attribs = $domain->locales || !$validTriggerPermission ?
- array('disabled' => 'disabled') : array();
+ $attribs = $domain->locales || !$validTriggerPermission ? array('disabled' => 'disabled') : array();
$this->assign('validTriggerPermission', $validTriggerPermission);
$this->addYesNo('logging', ts('Logging'), NULL, NULL, $attribs);
public function buildQuickForm() {
CRM_Utils_System::setTitle(ts('Settings - Upload Directories'));
- $directories = array('uploadDir' => ts('Temporary Files'),
+ $directories = array(
+ 'uploadDir' => ts('Temporary Files'),
'imageUploadDir' => ts('Images'),
'customFileUploadDir' => ts('Custom Files'),
'customTemplateDir' => ts('Custom Templates'),
//CRM-15365 - Fix BaseURL to avoid wrong trailing slash on Windows installs
foreach ($params as $name => & $val) {
if ($val && in_array($name, array('newBaseURL'))) {
- $val = CRM_Utils_File::addTrailingSlash($val,"/");
+ $val = CRM_Utils_File::addTrailingSlash($val, "/");
}
}
$selectable = $this->add('checkbox', 'is_selectable', ts('Selectable?'));
// Selectable should be checked by default when creating a new tag
if ($this->_action == CRM_Core_Action::ADD) {
- $selectable->setValue(1);
+ $selectable->setValue(1);
}
}
$breadCrumbUrl = CRM_Utils_System::url('civicrm/admin/options/wordreplacements',
"reset=1"
);
- $breadCrumb = array(array('title' => ts('Word Replacements'),
+ $breadCrumb = array(array(
+ 'title' => ts('Word Replacements'),
'url' => $breadCrumbUrl,
));
CRM_Utils_System::appendBreadCrumb($breadCrumb);
* enabling/ disabling various objects
*/
public static function getStatusMsg() {
- require_once('api/v3/utils.php');
+ require_once 'api/v3/utils.php';
$recordID = CRM_Utils_Type::escape($_GET['id'], 'Integer');
$entity = CRM_Utils_Type::escape($_GET['entity'], 'String');
$ret = array();
CRM_Core_Session::setStatus($errorMessage, ts('Warning'), "alert", array('expires' => 0));
}
- $groups = array('Customize Data and Screens' => ts('Customize Data and Screens'),
+ $groups = array(
+ 'Customize Data and Screens' => ts('Customize Data and Screens'),
'Communications' => ts('Communications'),
'Localization' => ts('Localization'),
'Users and Permissions' => ts('Users and Permissions'),
//get event type.
if (isset($eventTypes[$eventTemplate->event_type_id])) {
- $allEventTemplates[$eventTemplate->id]['event_type'] = $eventTypes[$eventTemplate->event_type_id];
+ $allEventTemplates[$eventTemplate->id]['event_type'] = $eventTypes[$eventTemplate->event_type_id];
}
//form all action links
*/
public function preProcess() {
CRM_Utils_System::setTitle(ts('CiviCRM Extensions'));
- $destination = CRM_Utils_System::url( 'civicrm/admin/extensions',
+ $destination = CRM_Utils_System::url( 'civicrm/admin/extensions',
'reset=1' );
- $destination = urlencode( $destination );
- $this->assign( 'destination', $destination );
+ $destination = urlencode( $destination );
+ $this->assign( 'destination', $destination );
}
/**
case CRM_Extension_Manager::STATUS_UNINSTALLED:
$action += CRM_Core_Action::ADD;
break;
+
case CRM_Extension_Manager::STATUS_DISABLED:
$action += CRM_Core_Action::ENABLE;
$action += CRM_Core_Action::DELETE;
break;
+
case CRM_Extension_Manager::STATUS_DISABLED_MISSING:
$action += CRM_Core_Action::DELETE;
break;
+
case CRM_Extension_Manager::STATUS_INSTALLED:
case CRM_Extension_Manager::STATUS_INSTALLED_MISSING:
$action += CRM_Core_Action::DISABLE;
break;
+
default:
}
// TODO if extbrowser is enabled and extbrowser has newer version than extcontainer,
case CRM_Extension_Manager::STATUS_UNINSTALLED:
$extensionRow['statusLabel'] = ''; // ts('Uninstalled');
break;
+
case CRM_Extension_Manager::STATUS_DISABLED:
$extensionRow['statusLabel'] = ts('Disabled');
break;
+
case CRM_Extension_Manager::STATUS_INSTALLED:
$extensionRow['statusLabel'] = ts('Enabled'); // ts('Installed');
break;
+
case CRM_Extension_Manager::STATUS_DISABLED_MISSING:
$extensionRow['statusLabel'] = ts('Disabled (Missing)');
break;
+
case CRM_Extension_Manager::STATUS_INSTALLED_MISSING:
$extensionRow['statusLabel'] = ts('Enabled (Missing)'); // ts('Installed');
break;
+
default:
$extensionRow['statusLabel'] = '(' . $extensionRow['status'] . ')';
}
$runner = new CRM_Queue_Runner(array(
'title' => ts('Database Upgrades'),
'queue' => $queue,
- 'errorMode'=> CRM_Queue_Runner::ERROR_ABORT,
+ 'errorMode' => CRM_Queue_Runner::ERROR_ABORT,
'onEnd' => array('CRM_Admin_Page_ExtensionsUpgrade', 'onEnd'),
'onEndUrl' => CRM_Utils_System::url(self::END_URL, self::END_PARAMS),
));
public function run() {
// set title and breadcrumb
CRM_Utils_System::setTitle(ts('Settings - Scheduled Jobs'));
- $breadCrumb = array(array('title' => ts('Scheduled Jobs'),
+ $breadCrumb = array(array(
+ 'title' => ts('Scheduled Jobs'),
'url' => CRM_Utils_System::url('civicrm/admin',
'reset=1'
),
$session->pushUserContext(CRM_Utils_System::url('civicrm/admin/job', 'reset=1'));
}
-
return parent::run();
}
public function run() {
// set title and breadcrumb
CRM_Utils_System::setTitle(ts('Settings - Scheduled Jobs Log'));
- $breadCrumb = array(array('title' => ts('Administration'),
+ $breadCrumb = array(array(
+ 'title' => ts('Administration'),
'url' => CRM_Utils_System::url('civicrm/admin',
'reset=1'
),
}
$dao->find();
-
$rows = array();
while ($dao->fetch()) {
unset($row);
*/
public function browse($action = NULL) {
// Get list of configured Label Formats
- $labelFormatList= CRM_Core_BAO_LabelFormat::getList();
- $nameFormatList= CRM_Core_BAO_LabelFormat::getList(false, 'name_badge');
+ $labelFormatList = CRM_Core_BAO_LabelFormat::getList();
+ $nameFormatList = CRM_Core_BAO_LabelFormat::getList(FALSE, 'name_badge');
// Add action links to each of the Label Formats
foreach ($labelFormatList as & $format) {
*
* @return array (reference) of action links
*/
- public function &links() {}
+ public function &links() {
+ }
/**
* Get name of edit form
if (self::$_gName == 'acl_role') {
CRM_Utils_System::setTitle(ts('Manage ACL Roles'));
// set breadcrumb to append to admin/access
- $breadCrumb = array(array('title' => ts('Access Control'),
+ $breadCrumb = array(array(
+ 'title' => ts('Access Control'),
'url' => CRM_Utils_System::url('civicrm/admin/access',
'reset=1'
),
// retrieve financial account name for the payment instrument page
if ($gName = "payment_instrument") {
- foreach ($optionValue as $key => $option) {
+ foreach ($optionValue as $key => $option) {
$optionValue[$key]['financial_account'] = CRM_Financial_BAO_FinancialTypeAccount::getFinancialAccount($key, 'civicrm_option_value');
}
}
//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'),
+ $breadCrumb = array(array(
+ 'title' => ts('Administration'),
'url' => CRM_Utils_System::url('civicrm/admin',
'reset=1'
),
/**
* Override function browse()
- *
+ *
* @param null $action
* @param null $sort
*/