preliminary whitespace cleanup
authoreileen <eileen@fuzion.co.nz>
Mon, 3 Jun 2013 03:14:19 +0000 (15:14 +1200)
committereileen <eileen@fuzion.co.nz>
Mon, 3 Jun 2013 03:14:19 +0000 (15:14 +1200)
CRM/Core/BAO/FinancialTrxn.php
CRM/Core/BAO/OpenID.php
CRM/Core/BAO/UFField.php
CRM/Core/BAO/Website.php
CRM/Core/Component/Info.php
CRM/Core/JobManager.php
CRM/Core/ManagedEntities.php
CRM/Core/Page/AJAX.php
CRM/Core/Selector/Controller.php
CRM/Core/Smarty/plugins/modifier.substring.php

index 95a675df667c3d8ec978141dc9b58abcebdcacb5..bd9ee483baca13ea6ddee429f57d1a94aae08ed8 100644 (file)
@@ -129,7 +129,7 @@ class CRM_Core_BAO_FinancialTrxn extends CRM_Financial_DAO_FinancialTrxn {
       $condition = " AND ((ceft1.entity_table IS NOT NULL) OR (cft.payment_instrument_id IS NOT NULL AND ceft1.entity_table IS NULL)) ";
     }
     $query = "SELECT ceft.id, ceft.financial_trxn_id FROM `civicrm_financial_trxn` cft
-LEFT JOIN civicrm_entity_financial_trxn ceft 
+LEFT JOIN civicrm_entity_financial_trxn ceft
 ON ceft.financial_trxn_id = cft.id AND ceft.entity_table = 'civicrm_contribution'
 LEFT JOIN civicrm_entity_financial_trxn ceft1
 ON ceft1.financial_trxn_id = cft.id AND ceft1.entity_table = 'civicrm_financial_item'
@@ -137,8 +137,8 @@ LEFT JOIN civicrm_financial_item cfi ON ceft1.entity_table = 'civicrm_financial_
 WHERE ceft.entity_id = %1 AND (cfi.entity_table <> 'civicrm_financial_trxn' or cfi.entity_table is NULL)
 {$condition}
 ORDER BY cft.id {$orderBy}
-LIMIT 1;"; 
+LIMIT 1;";
+
     $params = array(1 => array($entity_id, 'Integer'));
     $dao = CRM_Core_DAO::executeQuery($query, $params);
     if ($dao->fetch()) {
@@ -163,7 +163,7 @@ LIMIT 1;";
   static function getFinancialTrxnTotal($entity_id) {
     $query = "
       SELECT (ft.amount+SUM(ceft.amount)) AS total FROM civicrm_entity_financial_trxn AS ft
-LEFT JOIN civicrm_entity_financial_trxn AS ceft ON ft.financial_trxn_id = ceft.entity_id 
+LEFT JOIN civicrm_entity_financial_trxn AS ceft ON ft.financial_trxn_id = ceft.entity_id
 WHERE ft.entity_table = 'civicrm_contribution' AND ft.entity_id = %1
         ";
 
@@ -236,7 +236,7 @@ WHERE  ef2.financial_trxn_id =%1
   static function getFinancialTrxnLineTotal($entity_id, $entity_table = 'civicrm_contribution') {
     $query = "SELECT lt.price_field_value_id AS id, ft.financial_trxn_id,ft.amount AS amount FROM civicrm_entity_financial_trxn AS ft
 LEFT JOIN civicrm_financial_item AS fi ON fi.id = ft.entity_id AND fi.entity_table = 'civicrm_line_item' AND ft.entity_table = 'civicrm_financial_item'
-LEFT JOIN civicrm_line_item AS lt ON lt.id = fi.entity_id AND lt.entity_table = %2 
+LEFT JOIN civicrm_line_item AS lt ON lt.id = fi.entity_id AND lt.entity_table = %2
 WHERE lt.entity_id = %1 ";
 
     $sqlParams = array(1 => array($entity_id, 'Integer'), 2 => array($entity_table, 'String'));
@@ -261,11 +261,11 @@ WHERE lt.entity_id = %1 ";
    */
   static function deleteFinancialTrxn($entity_id) {
     $query = "DELETE ceft1, cfi, ceft, cft FROM `civicrm_financial_trxn` cft
-LEFT JOIN civicrm_entity_financial_trxn ceft 
+LEFT JOIN civicrm_entity_financial_trxn ceft
   ON ceft.financial_trxn_id = cft.id AND ceft.entity_table = 'civicrm_contribution'
 LEFT JOIN civicrm_entity_financial_trxn ceft1
   ON ceft1.financial_trxn_id = cft.id AND ceft1.entity_table = 'civicrm_financial_item'
-LEFT JOIN civicrm_financial_item cfi 
+LEFT JOIN civicrm_financial_item cfi
   ON ceft1.entity_table = 'civicrm_financial_item' and cfi.id = ceft1.entity_id
 WHERE ceft.entity_id = %1";
     CRM_Core_DAO::executeQuery($query, array(1 => array($entity_id, 'Integer')));
@@ -282,7 +282,7 @@ WHERE ceft.entity_id = %1";
     if ((!CRM_Utils_Array::value('financial_type_id', $params) || !CRM_Utils_Array::value('contributionId', $params)) && !CRM_Utils_Array::value('oldPremium', $params)) {
       return;
     }
-    
+
     if (CRM_Utils_Array::value('cost', $params)) {
       $contributionStatuses = CRM_Contribute_PseudoConstant::contributionStatus(NULL, 'name');
       $financialAccountType = CRM_Contribute_PseudoConstant::financialAccountType($params['financial_type_id']);
@@ -340,7 +340,7 @@ WHERE ceft.entity_id = %1";
     $params['trxnParams']['from_financial_account_id'] = $params['to_financial_account_id'];
     $params['trxnParams']['to_financial_account_id'] = $financialAccount;
     $params['trxnParams']['total_amount'] = $amount;
-    $params['trxnParams']['fee_amount'] = 
+    $params['trxnParams']['fee_amount'] =
       $params['trxnParams']['net_amount'] = 0;
     $params['trxnParams']['status_id'] = CRM_Core_OptionGroup::getValue('contribution_status','Completed','name');
     $params['trxnParams']['contribution_id'] = isset($params['contribution']->id) ? $params['contribution']->id : $params['contribution_id'];
@@ -349,7 +349,7 @@ WHERE ceft.entity_id = %1";
       $financialTrxnID = CRM_Core_BAO_FinancialTrxn::getFinancialTrxnId($params['trxnParams']['contribution_id'], 'DESC');
       $params['entity_id'] = $financialTrxnID['financialTrxnId'];
     }
-    $fItemParams = 
+    $fItemParams =
       array(
         'financial_account_id' => $financialAccount,
         'contact_id' => CRM_Core_DAO::getFieldValue('CRM_Core_DAO_Domain', $domainId, 'contact_id'),
index eae3f9017d5d184c3428e033bd308af2001fa393..bd2306e58e8333e6375d206bca0f16e2f7c5bc41 100644 (file)
@@ -106,8 +106,8 @@ class CRM_Core_BAO_OpenID extends CRM_Core_DAO_OpenID {
     }
 
     $query = "
-SELECT civicrm_openid.openid, civicrm_location_type.name as locationType, civicrm_openid.is_primary as is_primary, 
-civicrm_openid.allowed_to_login as allowed_to_login, civicrm_openid.id as openid_id, 
+SELECT civicrm_openid.openid, civicrm_location_type.name as locationType, civicrm_openid.is_primary as is_primary,
+civicrm_openid.allowed_to_login as allowed_to_login, civicrm_openid.id as openid_id,
 civicrm_openid.location_type_id as locationTypeId
 FROM      civicrm_contact
 LEFT JOIN civicrm_openid ON ( civicrm_openid.contact_id = civicrm_contact.id )
index 7cf4f254fb82de7e677d18727ecc045ef1bd2206..43093458cf8c6951c0de0c33fd557faac18180c5 100644 (file)
@@ -176,7 +176,7 @@ class CRM_Core_BAO_UFField extends CRM_Core_DAO_UFField {
       $queryString = "
       SELECT cg.id as cgId
  FROM civicrm_custom_group cg
- INNER JOIN civicrm_custom_field cf 
+ INNER JOIN civicrm_custom_field cf
  ON cg.id = cf.custom_group_id
 WHERE cf.id IN (" . $customFieldIds . ") AND is_multiple = 1 LIMIT 0,1";
 
@@ -433,14 +433,14 @@ WHERE cf.id IN (" . $customFieldIds . ") AND is_multiple = 1 LIMIT 0,1";
     return TRUE;
   }
 
-  /* Function to find out whether given profile group uses $required 
+  /* Function to find out whether given profile group uses $required
    * and/or $optionalprofile types
-   *  
+   *
    * @param integer $ufGroupId  profile id
    * @param array   $required   array of types those are required
    * @param array   $optional   array of types those are optional
    *
-   * @return boolean $valid  
+   * @return boolean $valid
    * @static
    */
   static function checkValidProfileType($ufGroupId, $required, $optional = NULL) {
@@ -724,8 +724,8 @@ SELECT ufg.id as id
     }
 
     $query = "
-SELECT  id 
-  From  civicrm_uf_field 
+SELECT  id
+  From  civicrm_uf_field
  WHERE  (in_selector = 1 OR is_searchable = 1)
    AND  uf_group_id = {$profileID}";
 
index 42e6406e892ca2868cec3f89a2a75295fb41bc19..69befbbba84e88a354341b74e780ebd8116d5c29 100644 (file)
@@ -73,7 +73,7 @@ class CRM_Core_BAO_Website extends CRM_Core_DAO_Website {
     if (empty($params)) {
       return FALSE;
     }
-    
+
     $ids = self::allWebsites($contactID);
     foreach ($params as $key => $values) {
       $websiteId = CRM_Utils_Array::value('id', $values);
@@ -90,7 +90,7 @@ class CRM_Core_BAO_Website extends CRM_Core_DAO_Website {
         is_array($ids) && !empty($ids)
       ) {
         foreach ($ids as $id => $value) {
-          if (($value['website_type_id'] == $values['website_type_id']) 
+          if (($value['website_type_id'] == $values['website_type_id'])
             && CRM_Utils_Array::value('url', $value)) {
             $values['id'] = $id;
             unset($ids[$id]);
@@ -103,7 +103,7 @@ class CRM_Core_BAO_Website extends CRM_Core_DAO_Website {
         self::add($values);
       }
     }
-    
+
     if ($skipDelete && !empty($ids)) {
       self::del(array_keys($ids));
     }
index c53dae9a7ac9a0b238aea3dab1734e7815d13b53..4ee0ec4220f83531511bfb920760468e1945a32d 100644 (file)
 abstract class CRM_Core_Component_Info {
 
   /*
-     * Name of the class (minus component namespace path) 
-     * of the component invocation class'es name. 
+     * Name of the class (minus component namespace path)
+     * of the component invocation class'es name.
      */
   CONST COMPONENT_INVOKE_CLASS = 'Invoke';
 
   /*
-     * Name of the class (minus component namespace path) 
+     * Name of the class (minus component namespace path)
      * of the component configuration class'es name.
      */
   CONST COMPONENT_CONFIG_CLASS = 'Config';
 
   /*
-     * Name of the class (minus component namespace path) 
+     * Name of the class (minus component namespace path)
      * of the component BAO Query class'es name.
      */
   CONST COMPONENT_BAO_QUERY_CLASS = 'BAO_Query';
 
   /*
-     * Name of the class (minus component namespace path) 
+     * Name of the class (minus component namespace path)
      * of the component user dashboard plugin.
      */
   CONST COMPONENT_USERDASHBOARD_CLASS = 'Page_UserDashboard';
 
   /*
-     * Name of the class (minus component namespace path) 
+     * Name of the class (minus component namespace path)
      * of the component tab offered to contact record view.
      */
   CONST COMPONENT_TAB_CLASS = 'Page_Tab';
 
   /*
-     * Name of the class (minus component namespace path) 
+     * Name of the class (minus component namespace path)
      * of the component tab offered to contact record view.
      */
   CONST COMPONENT_ADVSEARCHPANE_CLASS = 'Form_Search_AdvancedSearchPane';
 
   /*
-     * Name of the directory (assumed in component directory) 
+     * Name of the directory (assumed in component directory)
      * where xml resources used by this component live.
      */
   CONST COMPONENT_XML_RESOURCES = 'xml';
 
   /*
-     * Name of the directory (assumed in xml resources path) 
+     * Name of the directory (assumed in xml resources path)
      * containing component menu definition XML file names.
      */
   CONST COMPONENT_MENU_XML = 'Menu';
@@ -101,11 +101,11 @@ abstract class CRM_Core_Component_Info {
    * Class constructor, sets name and namespace (those are stored
    * in the component registry (database) and no need to duplicate
    * them here, as well as populates the info variable.
-   * 
+   *
    * @param string $name name of the component
    * @param string $namespace namespace prefix for component's files
    * @access public
-   * 
+   *
    */
   public function __construct($name, $namespace, $componentID) {
     $this->name        = $name;
index 15e7429e14f7bd27ae1721630a9e551f973e9ef9..7cc6afc40380618a881b41187c7e6a38c8c9f0f5 100644 (file)
@@ -53,10 +53,10 @@ class CRM_Core_JobManager {
 
   /*
    * Class constructor
-   * 
+   *
    * @param void
    * @access public
-   * 
+   *
    */
   public function __construct() {
     $config = CRM_Core_Config::singleton();
@@ -66,10 +66,10 @@ class CRM_Core_JobManager {
   }
 
   /*
-   * 
+   *
    * @param void
    * @access private
-   * 
+   *
    */
   public function execute($auth = TRUE) {
 
@@ -94,10 +94,10 @@ class CRM_Core_JobManager {
 
   /*
    * Class destructor
-   * 
+   *
    * @param void
    * @access public
-   * 
+   *
    */
   public function __destruct() {}
 
@@ -141,11 +141,11 @@ class CRM_Core_JobManager {
   /*
    * Retrieves the list of jobs from the database,
    * populates class param.
-   * 
+   *
    * @param void
    * @return array ($id => CRM_Core_ScheduledJob)
    * @access private
-   * 
+   *
    */
   private function _getJobs() {
     $jobs = array();
@@ -163,10 +163,10 @@ class CRM_Core_JobManager {
   /*
    * Retrieves specific job from the database by id
    * and creates ScheduledJob object.
-   * 
+   *
    * @param void
    * @access private
-   * 
+   *
    */
   private function _getJob($id = NULL, $entity = NULL, $action = NULL) {
     if (is_null($id) && is_null($action)) {
@@ -190,7 +190,7 @@ class CRM_Core_JobManager {
     $this->singleRunParams[$key] = $params;
     $this->singleRunParams[$key]['version'] = 3;
   }
-  
+
   /*
    *
    * @return array|null collection of permissions, null if none
index 3e776466233a0f660c78a53b5fc1a79dbc7b5654..a1b08c8fa45895f7e64724426ddfda76bbfbd0b5 100644 (file)
@@ -262,6 +262,6 @@ class CRM_Core_ManagedEntities {
       'result' => $result,
     ));
     throw new Exception('API error: ' . $result['error_message']);
-  }  
+  }
 }
 
index a042cdc595836b3b33784e8cc10cba807b28a246..1dfd2ecb9b99c20322c95221c17c3c029b27ee82 100644 (file)
@@ -100,11 +100,11 @@ class CRM_Core_Page_AJAX {
     if (CRM_Utils_Array::value('id', $_REQUEST)) {
       $id = CRM_Utils_Type::escape($_REQUEST['id'], 'Integer');
     }
-    
+
     if (CRM_Utils_Array::value('context', $_REQUEST)) {
       $context = CRM_Utils_Type::escape($_REQUEST['context'], 'String');
     }
-    // return false if $id is null and 
+    // return false if $id is null and
     // $context is not civicrm_event or civicrm_contribution_page
     if (!$id || !in_array($context, array('civicrm_event', 'civicrm_contribution_page'))) {
       return false;
index edee502b1c6191386c5a39c6f7b95f4af4e27dfc..98c69decf7fcd02fc0cc5a2b5b0ef0b251dcd222 100644 (file)
@@ -222,7 +222,7 @@ class CRM_Core_Selector_Controller {
     $this->_sort = new CRM_Utils_Sort($this->_sortOrder, $this->_sortID);
 
     /*
-         * if we are in transfer mode, do not goto database, use the 
+         * if we are in transfer mode, do not goto database, use the
          * session values instead
          */
 
index 75747402db3f910b7a62b363b309e8987bf6e832..5cb1295b819b6dc408d528fbbe16e6485aeae815 100644 (file)
    * Version: 0.1
    * Date: 2006-16-02
    * Author: Thorsten Albrecht <thor_REMOVE.THIS_@wolke7.net>
-   * Purpose: "substring" allows you to retrieve a small part (substring) of a string. 
-   * Notes: The substring is specified by giving the start  position and the length. 
+   * Purpose: "substring" allows you to retrieve a small part (substring) of a string.
+   * Notes: The substring is specified by giving the start  position and the length.
    * Unlike the original function substr() in PHP the position of the characters
    * in the string starts at 1 (not at 0 as usual in php).
    * Example smarty code:
-   *   {$my_string|substring:2:4} 
+   *   {$my_string|substring:2:4}
    *   returns substring from character 2 until character 6
    * @link based on substr(): http://www.zend.com/manual/function.substr.php
    * @param string