Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CRM-13283 misc sp acing problems #1

Merged
merged 1 commit into from
Jun 8, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions CRM/Core/Invoke.php
Original file line number Diff line number Diff line change
Expand Up @@ -348,16 +348,16 @@ public static function form($action, $contact_type, $contact_sub_type) {
*
* @param CRM_Core_Smarty $template
*/
public static function statusCheck($template) {
if (CRM_Core_Config::isUpgradeMode()) {
return;
}
$statusSeverity = 0;
$statusMessage = ts('System status OK');
// TODO: get status from CRM_Utils_Check, if cached
$template->assign('footer_status_severity', $statusSeverity);
$template->assign('footer_status_message', $statusMessage);
}
public static function statusCheck($template) {
if (CRM_Core_Config::isUpgradeMode()) {
return;
}
$statusSeverity = 0;
$statusMessage = ts('System status OK');
// TODO: get status from CRM_Utils_Check, if cached
$template->assign('footer_status_severity', $statusSeverity);
$template->assign('footer_status_message', $statusMessage);
}

/**
* @param bool $triggerRebuild
Expand Down
13 changes: 4 additions & 9 deletions CRM/Utils/Check/Env.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@ public function checkOutboundMail() {
* Check that domain email and org name are set
* @return array
*/

public function checkDomainNameEmail() {
$messages = array();

Expand Down Expand Up @@ -170,7 +169,6 @@ public function checkDomainNameEmail() {
* Checks if a default bounce handling mailbox is set up
* @return array
*/

public function checkDefaultMailbox() {
$messages = array();
$config = CRM_Core_Config::singleton();
Expand All @@ -196,7 +194,6 @@ public function checkDefaultMailbox() {
* Checks if cron has run in a reasonable amount of time
* @return array
*/

public function checkLastCron() {
$messages = array();

Expand Down Expand Up @@ -249,12 +246,11 @@ public function checkLastCron() {
* Checks if new versions are available
* @return array
*/

public function checkVersion() {
$messages = array();

if (CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'versionAlert', NULL, 1)) {
$vc = CRM_Utils_VersionCheck::singleton();
$vc = CRM_Utils_VersionCheck::singleton();
$newerVersion = $vc->isNewerVersionAvailable();

if ($newerVersion['version']) {
Expand Down Expand Up @@ -315,7 +311,6 @@ public function checkVersion() {
* Checks if extensions are set up properly
* @return array
*/

public function checkExtensions() {
$messages = array();
$extensionSystem = CRM_Extension_System::singleton();
Expand Down Expand Up @@ -419,7 +414,9 @@ public function checkExtensions() {
elseif (!empty($okextensions)) {
$msg .= ' ' . ts('Other extensions are up-to-date:') . ' ' . implode(', ', $okextensions);
}
$returnValues = array( // OK, return several data rows

// OK, return several data rows
$returnValues = array(
array('status' => $return, 'message' => $msg),
);

Expand Down Expand Up @@ -457,7 +454,6 @@ public function checkExtensionUpgrades() {
* Checks if CiviCRM database version is up-to-date
* @return array
*/

public function checkDbVersion() {
$messages = array();
$dbVersion = CRM_Core_BAO_Domain::version();
Expand Down Expand Up @@ -524,7 +520,6 @@ public function checkDbVersion() {
* ensure that all CiviCRM tables are InnoDB
* @return array
*/

public function checkDbEngine() {
$messages = array();

Expand Down
2 changes: 1 addition & 1 deletion CRM/Utils/Check/Message.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public function getSeverity() {

/**
* Set optional additional help text
* @param string help
* @param string $help
*/
public function addHelp($help) {
$this->help = $help;
Expand Down
4 changes: 2 additions & 2 deletions CRM/Utils/VersionCheck.php
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ public function isNewerVersionAvailable() {

if ($this->versionInfo && $this->localVersion) {
if (isset($this->versionInfo[$this->localMajorVersion])) {
switch(CRM_Utils_Array::value('status', $this->versionInfo[$this->localMajorVersion])) {
switch (CRM_Utils_Array::value('status', $this->versionInfo[$this->localMajorVersion])) {
case 'stable':
case 'lts':
case 'testing':
Expand Down Expand Up @@ -261,7 +261,7 @@ private function checkBranchForNewVersion($majorVersion) {
if (version_compare($this->localVersion, $release['version']) < 0) {
if (!$this->ignoreDate || $this->ignoreDate < $release['date']) {
$newerVersion['newest'] = $release['version'];
if (CRM_Utils_Array::value('security',$release)) {
if (CRM_Utils_Array::value('security', $release)) {
$newerVersion['security'] = $release['version'];
}
}
Expand Down
8 changes: 4 additions & 4 deletions api/v3/System.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,10 @@ function _civicrm_api3_system_flush_spec(&$params) {
function _civicrm_api3_system_check_spec(&$spec) {
// $spec['magicword']['api.required'] = 1;
$spec['show_hushed'] = array(
'api.default' => false,
'title' => 'show hushed',
'api.default' => FALSE,
'title' => 'Show hushed',
'type' => CRM_Utils_Type::T_BOOLEAN,
);
);
}

/**
Expand All @@ -105,7 +105,7 @@ function _civicrm_api3_system_check_spec(&$spec) {
function civicrm_api3_system_check($params) {
$returnValues = array();
$messages = CRM_Utils_Check::singleton()->checkAll(CRM_Utils_Array::value('show_hushed', $params));
foreach ( $messages as $msg) {
foreach ($messages as $msg) {
$returnValues[] = $msg->toArray();
}

Expand Down
1 change: 0 additions & 1 deletion tests/phpunit/CRM/Utils/versionCheckTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ public function newerVersionDataProvider() {
// notice on site running EOL version that doesn't have a security release
$data[] = array('4.2.19', $this->sampleVersionInfo, '4.5.5');


return $data;
}

Expand Down