From 450f494db218293fd6631c5b20493a21c7a96526 Mon Sep 17 00:00:00 2001 From: eileen Date: Mon, 13 May 2013 14:28:58 +1200 Subject: [PATCH] CRM-12595 fix formatting in CRM/Utils files --- CRM/Utils/Cache/SerializeCache.php | 29 +++++++++++++++++++++++++++-- CRM/Utils/File.php | 2 +- CRM/Utils/Geocode/Yahoo.php | 2 +- CRM/Utils/Hook/Drupal6.php | 3 +-- CRM/Utils/Migrate/Import.php | 2 +- CRM/Utils/Recent.php | 1 - CRM/Utils/Request.php | 2 +- CRM/Utils/SoapServer.php | 4 ++-- CRM/Utils/Sort.php | 2 +- CRM/Utils/System/Soap.php | 2 +- CRM/Utils/System/UnitTests.php | 2 +- CRM/Utils/Type.php | 2 +- CRM/Utils/Weight.php | 2 +- 13 files changed, 39 insertions(+), 16 deletions(-) diff --git a/CRM/Utils/Cache/SerializeCache.php b/CRM/Utils/Cache/SerializeCache.php index 7378783467..df29d3abd2 100644 --- a/CRM/Utils/Cache/SerializeCache.php +++ b/CRM/Utils/Cache/SerializeCache.php @@ -1,4 +1,29 @@ 50) - return CIVICRM_TEMPLATE_COMPILEDIR ."CRM_".md5($key).".php"; + return CIVICRM_TEMPLATE_COMPILEDIR ."CRM_".md5($key).".php"; return CIVICRM_TEMPLATE_COMPILEDIR .$key.".php"; } @@ -40,7 +65,7 @@ class CRM_Utils_Cache_SerializeCache implements CRM_Utils_Cache_Interface { return; } $this->_cache[$key] = $value; - file_put_contents ($this->fileName ($key),"fileName ($key)," $target)), '', 'success'); + CRM_Core_Session::setStatus(ts('Removed directory %1', array(1 => $target)), '', 'success'); } return TRUE; } diff --git a/CRM/Utils/Geocode/Yahoo.php b/CRM/Utils/Geocode/Yahoo.php index 7db603e23d..ee90f814bb 100644 --- a/CRM/Utils/Geocode/Yahoo.php +++ b/CRM/Utils/Geocode/Yahoo.php @@ -170,7 +170,7 @@ class CRM_Utils_Geocode_Yahoo { 1 => $ret['postal'], 2 => $current_pc_suffix ? "$current_pc-$current_pc_suffix" : $current_pc )); - + CRM_Core_Session::setStatus($msg, ts('Postal Code Mismatch'), 'error'); } $skip_postal = TRUE; diff --git a/CRM/Utils/Hook/Drupal6.php b/CRM/Utils/Hook/Drupal6.php index f4a8a85445..7601e515fc 100644 --- a/CRM/Utils/Hook/Drupal6.php +++ b/CRM/Utils/Hook/Drupal6.php @@ -1,5 +1,4 @@ buildModuleList(); - + return $this->runHooks($this->allModules, $fnSuffix, $numParams, $arg1, $arg2, $arg3, $arg4, $arg5 ); diff --git a/CRM/Utils/Migrate/Import.php b/CRM/Utils/Migrate/Import.php index 968fe3d8b4..861ac7d73f 100644 --- a/CRM/Utils/Migrate/Import.php +++ b/CRM/Utils/Migrate/Import.php @@ -307,7 +307,7 @@ AND v.name = %1 $triggerRebuild = FALSE; if($count == $total) { $triggerRebuild = TRUE; - } + } $indexExist = FALSE; CRM_Core_BAO_CustomField::createField($customField, 'add', $indexExist, $triggerRebuild); } diff --git a/CRM/Utils/Recent.php b/CRM/Utils/Recent.php index d35ab5f376..9383535d82 100644 --- a/CRM/Utils/Recent.php +++ b/CRM/Utils/Recent.php @@ -1,5 +1,4 @@ ufClass) . '.php'); - + if ($this->ufClass == 'CRM_Utils_System_Joomla'){ $loadCMSBootstrap = true; } - + eval('$result =& ' . $this->ufClass . '::authenticate($name, $pass, $loadCMSBootstrap );'); if (empty($result)) { diff --git a/CRM/Utils/Sort.php b/CRM/Utils/Sort.php index 27a59a1364..e5cd4b82db 100644 --- a/CRM/Utils/Sort.php +++ b/CRM/Utils/Sort.php @@ -121,7 +121,7 @@ class CRM_Utils_Sort { * * @return void * @access public - */ + */ function __construct(&$vars, $defaultSortOrder = NULL) { $this->_vars = array(); $this->_response = array(); diff --git a/CRM/Utils/System/Soap.php b/CRM/Utils/System/Soap.php index a622dbcb6f..10d6e1384e 100644 --- a/CRM/Utils/System/Soap.php +++ b/CRM/Utils/System/Soap.php @@ -183,7 +183,7 @@ class CRM_Utils_System_Soap extends CRM_Utils_System_Base { function getUFLocale() { return NULL; } - + /** * Get user login URL for hosting CMS (method declared in each CMS system class) * diff --git a/CRM/Utils/System/UnitTests.php b/CRM/Utils/System/UnitTests.php index 9e3789411c..65a1d12038 100644 --- a/CRM/Utils/System/UnitTests.php +++ b/CRM/Utils/System/UnitTests.php @@ -173,6 +173,6 @@ class CRM_Utils_System_UnitTests extends CRM_Utils_System_Drupal { public function getLoginURL($destination = '') { throw new Exception("Method not implemented: getLoginURL"); } - + } diff --git a/CRM/Utils/Type.php b/CRM/Utils/Type.php index cc6d670fd1..e794297021 100644 --- a/CRM/Utils/Type.php +++ b/CRM/Utils/Type.php @@ -237,7 +237,7 @@ class CRM_Utils_Type { * @param mixed $data The variable * @param string $type The type * @param boolean $abort Should we abort if invalid - * @name string $name The name of the attribute + * @name string $name The name of the attribute * * @return mixed The data, escaped if necessary * @access public diff --git a/CRM/Utils/Weight.php b/CRM/Utils/Weight.php index 0bd72a7551..8ebcfdf617 100644 --- a/CRM/Utils/Weight.php +++ b/CRM/Utils/Weight.php @@ -353,7 +353,7 @@ class CRM_Utils_Weight { 'url' => $returnURL, 'filter' => $filter, ); - + $signer = new CRM_Utils_Signer(CRM_Core_Key::privateKey(), self::$SIGNABLE_FIELDS); $queryParams['_sgn'] = $signer->sign($queryParams); $baseURL = CRM_Utils_System::url('civicrm/admin/weight', $queryParams); -- 2.25.1