From 5d6aaf6b8cb79a7772c30431d4d146d2688eaa9c Mon Sep 17 00:00:00 2001 From: Dmitry Smirnov Date: Sun, 3 May 2015 14:19:24 +1000 Subject: [PATCH] Corrections as per colemanw's review. --- CRM/Contact/BAO/GroupNestingCache.php | 2 +- CRM/Core/Controller.php | 2 +- CRM/Core/DAO.php | 2 +- CRM/Group/Form/Edit.php | 1 - CRM/Report/Form/Contribute/Sybunt.php | 10 +++++----- CRM/Utils/Rule.php | 2 +- CRM/Utils/String.php | 2 +- 7 files changed, 10 insertions(+), 11 deletions(-) diff --git a/CRM/Contact/BAO/GroupNestingCache.php b/CRM/Contact/BAO/GroupNestingCache.php index dfaa529f10..49cc6d7287 100644 --- a/CRM/Contact/BAO/GroupNestingCache.php +++ b/CRM/Contact/BAO/GroupNestingCache.php @@ -69,7 +69,7 @@ WHERE n.child_group_id = gc.id } if (self::checkCyclicGraph($tree)) { - CRM_Core_Error::fatal(ts('We detected a cycle which we can't handle. aborting')); + CRM_Core_Error::fatal(ts("We detected a cycle which we can't handle. aborting")); } // first reset the current cache entries diff --git a/CRM/Core/Controller.php b/CRM/Core/Controller.php index 0e30d6172f..2173882c91 100644 --- a/CRM/Core/Controller.php +++ b/CRM/Core/Controller.php @@ -855,7 +855,7 @@ class CRM_Core_Controller extends HTML_QuickForm_Controller { } public function invalidKeyCommon() { - $msg = ts('We can\'t load the requested web page. This page requires cookies to be enabled in your browser settings. Please check this setting and enable cookies (if they are not enabled). Then try again. If this error persists, contact the site administrator for assistance.') . '

' . ts('Site Administrators: This error may indicate that users are accessing this page using a domain or URL other than the configured Base URL. EXAMPLE: Base URL is http://example.org, but some users are accessing the page via http://www.example.org or a domain alias like http://myotherexample.org.') . '

' . ts('Error type: Could not find a valid session key.'); + $msg = ts("We can't load the requested web page. This page requires cookies to be enabled in your browser settings. Please check this setting and enable cookies (if they are not enabled). Then try again. If this error persists, contact the site administrator for assistance.") . '

' . ts('Site Administrators: This error may indicate that users are accessing this page using a domain or URL other than the configured Base URL. EXAMPLE: Base URL is http://example.org, but some users are accessing the page via http://www.example.org or a domain alias like http://myotherexample.org.') . '

' . ts('Error type: Could not find a valid session key.'); CRM_Core_Error::fatal($msg); } diff --git a/CRM/Core/DAO.php b/CRM/Core/DAO.php index 17a9451412..e1038d7a00 100644 --- a/CRM/Core/DAO.php +++ b/CRM/Core/DAO.php @@ -220,7 +220,7 @@ class CRM_Core_DAO extends DB_DataObject { break; case CRM_Utils_Type::T_TIME: - CRM_Core_Error::fatal('T_TIME shouldn't be used.'); + CRM_Core_Error::fatal("T_TIME shouldn't be used."); //$object->$dbName='000000'; //break; case CRM_Utils_Type::T_CCNUM: diff --git a/CRM/Group/Form/Edit.php b/CRM/Group/Form/Edit.php index 097507511c..7143eb20c9 100644 --- a/CRM/Group/Form/Edit.php +++ b/CRM/Group/Form/Edit.php @@ -84,7 +84,6 @@ class CRM_Group_Form_Edit extends CRM_Core_Form { * Set up variables to build the form. * * @return void - * @access protected */ public function preProcess() { $this->_id = $this->get('id'); diff --git a/CRM/Report/Form/Contribute/Sybunt.php b/CRM/Report/Form/Contribute/Sybunt.php index c692f2da7d..e214895f7b 100644 --- a/CRM/Report/Form/Contribute/Sybunt.php +++ b/CRM/Report/Form/Contribute/Sybunt.php @@ -514,17 +514,17 @@ class CRM_Report_Form_Contribute_Sybunt extends CRM_Report_Form { $previous_year = $current_year - 1; $previous_two_year = $current_year - 2; $previous_three_year = $current_year - 3; - $up to = $current_year - 4; + $upto = $current_year - 4; $interval[$previous_year] = $previous_year; $interval[$previous_two_year] = $previous_two_year; $interval[$previous_three_year] = $previous_three_year; - $interval["upto_{$up to}"] = "Up To {$up to}"; + $interval["upto_{$upto}"] = "Up To {$upto}"; foreach ($rows as $key => $row) { - $display["upto_{$up to}"] - = CRM_Utils_Array::value("upto_{$up to}", $display) - + CRM_Utils_Array::value("civicrm_upto_{$up to}", $row); + $display["upto_{$upto}"] + = CRM_Utils_Array::value("upto_{$upto}", $display) + + CRM_Utils_Array::value("civicrm_upto_{$upto}", $row); $display[$previous_year] = CRM_Utils_Array::value($previous_year, $display) + CRM_Utils_Array::value($previous_year, $row); diff --git a/CRM/Utils/Rule.php b/CRM/Utils/Rule.php index a27cca4444..f5b1df363f 100644 --- a/CRM/Utils/Rule.php +++ b/CRM/Utils/Rule.php @@ -510,7 +510,7 @@ class CRM_Utils_Rule { */ public static function boolean($value) { return preg_match( - '/(^(1|0)$)|(^(Y(es)?|N(o)?)$)|(^(T(rue)?|F(else)?)$)/i', $value + '/(^(1|0)$)|(^(Y(es)?|N(o)?)$)|(^(T(rue)?|F(alse)?)$)/i', $value ) ? TRUE : FALSE; } diff --git a/CRM/Utils/String.php b/CRM/Utils/String.php index fd627a9b5b..90a09b4534 100644 --- a/CRM/Utils/String.php +++ b/CRM/Utils/String.php @@ -413,7 +413,7 @@ class CRM_Utils_String { if (preg_match('/^(y(es)?|t(rue)?|1)$/i', $str)) { return '1'; } - elseif (preg_match('/^(n(o)?|f(else)?|0)$/i', $str)) { + elseif (preg_match('/^(n(o)?|f(alse)?|0)$/i', $str)) { return '0'; } else { -- 2.25.1