From 02fc859b3146244f5f4f3c2c4d9ffce229e06d40 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Tue, 6 Jan 2015 13:09:19 -0800 Subject: [PATCH] INFRA-132 - CRM/Admin - phpcbf --- CRM/Admin/Form/Extensions.php | 1 - CRM/Admin/Form/Job.php | 1 - CRM/Admin/Form/MailSettings.php | 3 ++- CRM/Admin/Form/MessageTemplates.php | 6 ++++-- CRM/Admin/Form/Options.php | 7 ++++--- CRM/Admin/Form/ParticipantStatusType.php | 3 ++- CRM/Admin/Form/PaymentProcessor.php | 7 +++---- CRM/Admin/Form/PaymentProcessorType.php | 6 +++--- CRM/Admin/Form/Preferences.php | 1 - CRM/Admin/Form/Preferences/Address.php | 3 --- CRM/Admin/Form/Preferences/Event.php | 2 +- CRM/Admin/Form/RelationshipType.php | 3 ++- CRM/Admin/Form/ScheduleReminders.php | 17 +++++++++-------- CRM/Admin/Form/Setting.php | 2 +- CRM/Admin/Form/Setting/Localization.php | 2 +- CRM/Admin/Form/Setting/Miscellaneous.php | 3 +-- CRM/Admin/Form/Setting/Path.php | 3 ++- CRM/Admin/Form/Setting/UpdateConfigBackend.php | 2 +- CRM/Admin/Form/Tag.php | 2 +- CRM/Admin/Form/WordReplacements.php | 3 ++- CRM/Admin/Page/AJAX.php | 2 +- CRM/Admin/Page/Admin.php | 3 ++- CRM/Admin/Page/EventTemplate.php | 2 +- CRM/Admin/Page/Extensions.php | 15 ++++++++++++--- CRM/Admin/Page/ExtensionsUpgrade.php | 2 +- CRM/Admin/Page/Job.php | 4 ++-- CRM/Admin/Page/JobLog.php | 4 ++-- CRM/Admin/Page/LabelFormats.php | 4 ++-- CRM/Admin/Page/Navigation.php | 3 ++- CRM/Admin/Page/Options.php | 5 +++-- CRM/Admin/Page/PaymentProcessor.php | 3 ++- CRM/Admin/Page/Tag.php | 2 +- 32 files changed, 70 insertions(+), 56 deletions(-) diff --git a/CRM/Admin/Form/Extensions.php b/CRM/Admin/Form/Extensions.php index f98dbca62b..44889c9687 100644 --- a/CRM/Admin/Form/Extensions.php +++ b/CRM/Admin/Form/Extensions.php @@ -57,7 +57,6 @@ class CRM_Admin_Form_Extensions extends CRM_Admin_Form { $this->assign('id', $this->_id); $this->assign('key', $this->_key); - switch ($this->_action) { case CRM_Core_Action::ADD: case CRM_Core_Action::DELETE: diff --git a/CRM/Admin/Form/Job.php b/CRM/Admin/Form/Job.php index f59350f3d8..2f1a741382 100644 --- a/CRM/Admin/Form/Job.php +++ b/CRM/Admin/Form/Job.php @@ -207,6 +207,5 @@ class CRM_Admin_Form_Job extends CRM_Admin_Form { CRM_Core_Session::setStatus($msg, ts('Warning: Update Greeting job enabled'), 'alert'); } - } } diff --git a/CRM/Admin/Form/MailSettings.php b/CRM/Admin/Form/MailSettings.php index 67465b6cc1..72ffd4ef07 100644 --- a/CRM/Admin/Form/MailSettings.php +++ b/CRM/Admin/Form/MailSettings.php @@ -84,7 +84,8 @@ class CRM_Admin_Form_MailSettings extends CRM_Admin_Form { $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); diff --git a/CRM/Admin/Form/MessageTemplates.php b/CRM/Admin/Form/MessageTemplates.php index aea941c058..dc7acc0765 100644 --- a/CRM/Admin/Form/MessageTemplates.php +++ b/CRM/Admin/Form/MessageTemplates.php @@ -138,7 +138,8 @@ class CRM_Admin_Form_MessageTemplates extends CRM_Admin_Form { 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' ), @@ -172,7 +173,8 @@ class CRM_Admin_Form_MessageTemplates extends CRM_Admin_Form { else { $this->addWysiwyg('msg_html', ts('HTML Message'), array( - 'cols' => '80', 'rows' => '8', + 'cols' => '80', + 'rows' => '8', 'onkeyup' => "return verify(this)", ) ); diff --git a/CRM/Admin/Form/Options.php b/CRM/Admin/Form/Options.php index 770fad68a6..13934263ad 100644 --- a/CRM/Admin/Form/Options.php +++ b/CRM/Admin/Form/Options.php @@ -101,7 +101,6 @@ class CRM_Admin_Form_Options extends CRM_Admin_Form { } } - $session->pushUserContext(CRM_Utils_System::url($url, $params)); $this->assign('id', $this->_id); @@ -177,7 +176,8 @@ class CRM_Admin_Form_Options extends CRM_Admin_Form { } if ($this->_gName == 'case_status') { - $classes = array('Opened' => ts('Opened'), + $classes = array( + 'Opened' => ts('Opened'), 'Closed' => ts('Closed'), ); @@ -295,7 +295,8 @@ class CRM_Admin_Form_Options extends CRM_Admin_Form { //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'), diff --git a/CRM/Admin/Form/ParticipantStatusType.php b/CRM/Admin/Form/ParticipantStatusType.php index 00df350801..cf98aa92fb 100644 --- a/CRM/Admin/Form/ParticipantStatusType.php +++ b/CRM/Admin/Form/ParticipantStatusType.php @@ -99,7 +99,8 @@ class CRM_Admin_Form_ParticipantStatusType extends CRM_Admin_Form { ); // 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) { diff --git a/CRM/Admin/Form/PaymentProcessor.php b/CRM/Admin/Form/PaymentProcessor.php index d4e4e91b15..5f44eca512 100644 --- a/CRM/Admin/Form/PaymentProcessor.php +++ b/CRM/Admin/Form/PaymentProcessor.php @@ -188,7 +188,7 @@ class CRM_Admin_Form_PaymentProcessor extends CRM_Admin_Form { ); $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)") ); @@ -200,13 +200,12 @@ class CRM_Admin_Form_PaymentProcessor extends CRM_Admin_Form { } $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; @@ -290,7 +289,7 @@ class CRM_Admin_Form_PaymentProcessor extends CRM_Admin_Form { 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; diff --git a/CRM/Admin/Form/PaymentProcessorType.php b/CRM/Admin/Form/PaymentProcessorType.php index a02bfd5842..5ad7af3e11 100644 --- a/CRM/Admin/Form/PaymentProcessorType.php +++ b/CRM/Admin/Form/PaymentProcessorType.php @@ -159,7 +159,7 @@ class CRM_Admin_Form_PaymentProcessorType extends CRM_Admin_Form { 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); @@ -192,7 +192,7 @@ class CRM_Admin_Form_PaymentProcessorType extends CRM_Admin_Form { return $defaults; } - $dao = new CRM_Financial_DAO_PaymentProcessorType( ); + $dao = new CRM_Financial_DAO_PaymentProcessorType( ); $dao->id = $this->_id; if (!$dao->find(TRUE)) { @@ -226,7 +226,7 @@ UPDATE civicrm_payment_processor SET is_default = 0"; 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); diff --git a/CRM/Admin/Form/Preferences.php b/CRM/Admin/Form/Preferences.php index 26c00a1f71..44ec82f348 100644 --- a/CRM/Admin/Form/Preferences.php +++ b/CRM/Admin/Form/Preferences.php @@ -146,7 +146,6 @@ class CRM_Admin_Form_Preferences extends CRM_Core_Form { public function buildQuickForm() { parent::buildQuickForm(); - if (!empty($this->_varNames)) { foreach ($this->_varNames as $groupName => $groupValues) { $formName = CRM_Utils_String::titleToVar($groupName); diff --git a/CRM/Admin/Form/Preferences/Address.php b/CRM/Admin/Form/Preferences/Address.php index 67f916e2f2..b6e447417b 100644 --- a/CRM/Admin/Form/Preferences/Address.php +++ b/CRM/Admin/Form/Preferences/Address.php @@ -99,7 +99,6 @@ class CRM_Admin_Form_Preferences_Address extends CRM_Admin_Form_Preferences { $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)) { @@ -129,7 +128,6 @@ class CRM_Admin_Form_Preferences_Address extends CRM_Admin_Form_Preferences { $defaults['mailing_format'] = $this->_config->mailing_format; } - parent::cbsDefaultValues($defaults); return $defaults; @@ -192,7 +190,6 @@ class CRM_Admin_Form_Preferences_Address extends CRM_Admin_Form_Preferences { $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) { diff --git a/CRM/Admin/Form/Preferences/Event.php b/CRM/Admin/Form/Preferences/Event.php index 2fe8529af2..ec63a66969 100644 --- a/CRM/Admin/Form/Preferences/Event.php +++ b/CRM/Admin/Form/Preferences/Event.php @@ -44,7 +44,7 @@ class CRM_Admin_Form_Preferences_Event extends CRM_Admin_Form_Preferences { $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( diff --git a/CRM/Admin/Form/RelationshipType.php b/CRM/Admin/Form/RelationshipType.php index 9c9df7ad12..ec1d851e5e 100644 --- a/CRM/Admin/Form/RelationshipType.php +++ b/CRM/Admin/Form/RelationshipType.php @@ -91,7 +91,8 @@ class CRM_Admin_Form_RelationshipType extends CRM_Admin_Form { 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) { diff --git a/CRM/Admin/Form/ScheduleReminders.php b/CRM/Admin/Form/ScheduleReminders.php index f6c63ba824..9bd699683d 100644 --- a/CRM/Admin/Form/ScheduleReminders.php +++ b/CRM/Admin/Form/ScheduleReminders.php @@ -88,12 +88,12 @@ class CRM_Admin_Form_ScheduleReminders extends CRM_Admin_Form { } } - 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', @@ -182,7 +182,8 @@ class CRM_Admin_Form_ScheduleReminders extends CRM_Admin_Form { //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 @@ -532,7 +533,7 @@ class CRM_Admin_Form_ScheduleReminders extends CRM_Admin_Form { $templateParams += array( 'msg_text' => $params['sms_body_text'], 'is_sms' => TRUE, - ); + ); } else { $templateParams += array( diff --git a/CRM/Admin/Form/Setting.php b/CRM/Admin/Form/Setting.php index 9c4bd5bc0b..14455159a7 100644 --- a/CRM/Admin/Form/Setting.php +++ b/CRM/Admin/Form/Setting.php @@ -215,7 +215,7 @@ class CRM_Admin_Form_Setting extends CRM_Core_Form { // 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. diff --git a/CRM/Admin/Form/Setting/Localization.php b/CRM/Admin/Form/Setting/Localization.php index 98a0d57ffa..ee08eba60a 100644 --- a/CRM/Admin/Form/Setting/Localization.php +++ b/CRM/Admin/Form/Setting/Localization.php @@ -303,7 +303,7 @@ class CRM_Admin_Form_Setting_Localization extends CRM_Admin_Form_Setting { } // 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); diff --git a/CRM/Admin/Form/Setting/Miscellaneous.php b/CRM/Admin/Form/Setting/Miscellaneous.php index 3e7b4b524c..bce3279a81 100644 --- a/CRM/Admin/Form/Setting/Miscellaneous.php +++ b/CRM/Admin/Form/Setting/Miscellaneous.php @@ -80,8 +80,7 @@ class CRM_Admin_Form_Setting_Miscellaneous extends CRM_Admin_Form_Setting { // 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); diff --git a/CRM/Admin/Form/Setting/Path.php b/CRM/Admin/Form/Setting/Path.php index 8bfc4f9e3a..fecceb069e 100644 --- a/CRM/Admin/Form/Setting/Path.php +++ b/CRM/Admin/Form/Setting/Path.php @@ -47,7 +47,8 @@ class CRM_Admin_Form_Setting_Path extends CRM_Admin_Form_Setting { 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'), diff --git a/CRM/Admin/Form/Setting/UpdateConfigBackend.php b/CRM/Admin/Form/Setting/UpdateConfigBackend.php index e8eec00338..ad18055e9e 100644 --- a/CRM/Admin/Form/Setting/UpdateConfigBackend.php +++ b/CRM/Admin/Form/Setting/UpdateConfigBackend.php @@ -141,7 +141,7 @@ class CRM_Admin_Form_Setting_UpdateConfigBackend extends CRM_Admin_Form_Setting //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, "/"); } } diff --git a/CRM/Admin/Form/Tag.php b/CRM/Admin/Form/Tag.php index bcc1689e2d..56eea10976 100644 --- a/CRM/Admin/Form/Tag.php +++ b/CRM/Admin/Form/Tag.php @@ -80,7 +80,7 @@ class CRM_Admin_Form_Tag extends CRM_Admin_Form { $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); } } diff --git a/CRM/Admin/Form/WordReplacements.php b/CRM/Admin/Form/WordReplacements.php index a6054baf94..de422b3abd 100644 --- a/CRM/Admin/Form/WordReplacements.php +++ b/CRM/Admin/Form/WordReplacements.php @@ -51,7 +51,8 @@ class CRM_Admin_Form_WordReplacements extends CRM_Core_Form { $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); diff --git a/CRM/Admin/Page/AJAX.php b/CRM/Admin/Page/AJAX.php index 3def0e680a..b001414bb0 100644 --- a/CRM/Admin/Page/AJAX.php +++ b/CRM/Admin/Page/AJAX.php @@ -73,7 +73,7 @@ class CRM_Admin_Page_AJAX { * 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(); diff --git a/CRM/Admin/Page/Admin.php b/CRM/Admin/Page/Admin.php index 1af54007b7..e62f83c667 100644 --- a/CRM/Admin/Page/Admin.php +++ b/CRM/Admin/Page/Admin.php @@ -57,7 +57,8 @@ class CRM_Admin_Page_Admin extends CRM_Core_Page { 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'), diff --git a/CRM/Admin/Page/EventTemplate.php b/CRM/Admin/Page/EventTemplate.php index df375ba3ac..8cc7a7ee3d 100644 --- a/CRM/Admin/Page/EventTemplate.php +++ b/CRM/Admin/Page/EventTemplate.php @@ -116,7 +116,7 @@ class CRM_Admin_Page_EventTemplate extends CRM_Core_Page_Basic { //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 diff --git a/CRM/Admin/Page/Extensions.php b/CRM/Admin/Page/Extensions.php index c357b1be54..8edf380a75 100644 --- a/CRM/Admin/Page/Extensions.php +++ b/CRM/Admin/Page/Extensions.php @@ -55,11 +55,11 @@ class CRM_Admin_Page_Extensions extends CRM_Core_Page_Basic { */ 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 ); } /** @@ -174,17 +174,21 @@ class CRM_Admin_Page_Extensions extends CRM_Core_Page_Basic { 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, @@ -303,18 +307,23 @@ class CRM_Admin_Page_Extensions extends CRM_Core_Page_Basic { 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'] . ')'; } diff --git a/CRM/Admin/Page/ExtensionsUpgrade.php b/CRM/Admin/Page/ExtensionsUpgrade.php index bb0931388a..b8aca70fa3 100644 --- a/CRM/Admin/Page/ExtensionsUpgrade.php +++ b/CRM/Admin/Page/ExtensionsUpgrade.php @@ -15,7 +15,7 @@ class CRM_Admin_Page_ExtensionsUpgrade extends CRM_Core_Page { $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), )); diff --git a/CRM/Admin/Page/Job.php b/CRM/Admin/Page/Job.php index 00dce28991..f53dc32e59 100644 --- a/CRM/Admin/Page/Job.php +++ b/CRM/Admin/Page/Job.php @@ -115,7 +115,8 @@ class CRM_Admin_Page_Job extends CRM_Core_Page_Basic { 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' ), @@ -134,7 +135,6 @@ class CRM_Admin_Page_Job extends CRM_Core_Page_Basic { $session->pushUserContext(CRM_Utils_System::url('civicrm/admin/job', 'reset=1')); } - return parent::run(); } diff --git a/CRM/Admin/Page/JobLog.php b/CRM/Admin/Page/JobLog.php index e0891b3b7e..ce697f3ada 100644 --- a/CRM/Admin/Page/JobLog.php +++ b/CRM/Admin/Page/JobLog.php @@ -77,7 +77,8 @@ class CRM_Admin_Page_JobLog extends CRM_Core_Page_Basic { 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' ), @@ -119,7 +120,6 @@ class CRM_Admin_Page_JobLog extends CRM_Core_Page_Basic { } $dao->find(); - $rows = array(); while ($dao->fetch()) { unset($row); diff --git a/CRM/Admin/Page/LabelFormats.php b/CRM/Admin/Page/LabelFormats.php index d0701c0e6c..bdc26e9637 100644 --- a/CRM/Admin/Page/LabelFormats.php +++ b/CRM/Admin/Page/LabelFormats.php @@ -130,8 +130,8 @@ class CRM_Admin_Page_LabelFormats extends CRM_Core_Page_Basic { */ 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) { diff --git a/CRM/Admin/Page/Navigation.php b/CRM/Admin/Page/Navigation.php index fb6877048c..0063f50b63 100644 --- a/CRM/Admin/Page/Navigation.php +++ b/CRM/Admin/Page/Navigation.php @@ -60,7 +60,8 @@ class CRM_Admin_Page_Navigation extends CRM_Core_Page_Basic { * * @return array (reference) of action links */ - public function &links() {} + public function &links() { + } /** * Get name of edit form diff --git a/CRM/Admin/Page/Options.php b/CRM/Admin/Page/Options.php index b733c112f0..67d02fa86c 100644 --- a/CRM/Admin/Page/Options.php +++ b/CRM/Admin/Page/Options.php @@ -125,7 +125,8 @@ class CRM_Admin_Page_Options extends CRM_Core_Page_Basic { 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' ), @@ -247,7 +248,7 @@ class CRM_Admin_Page_Options extends CRM_Core_Page_Basic { // 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'); } } diff --git a/CRM/Admin/Page/PaymentProcessor.php b/CRM/Admin/Page/PaymentProcessor.php index aa4a36b858..0b366fcc7a 100644 --- a/CRM/Admin/Page/PaymentProcessor.php +++ b/CRM/Admin/Page/PaymentProcessor.php @@ -106,7 +106,8 @@ class CRM_Admin_Page_PaymentProcessor extends CRM_Core_Page_Basic { //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' ), diff --git a/CRM/Admin/Page/Tag.php b/CRM/Admin/Page/Tag.php index e4ad61362a..dd817f2d55 100644 --- a/CRM/Admin/Page/Tag.php +++ b/CRM/Admin/Page/Tag.php @@ -136,7 +136,7 @@ class CRM_Admin_Page_Tag extends CRM_Core_Page_Basic { /** * Override function browse() - * + * * @param null $action * @param null $sort */ -- 2.25.1