More php 5.4 notice fixes and errors
authorDonald A. Lobo <lobo@civicrm.org>
Thu, 7 Mar 2013 21:59:32 +0000 (13:59 -0800)
committerDonald A. Lobo <lobo@civicrm.org>
Fri, 8 Mar 2013 01:11:55 +0000 (17:11 -0800)
CRM/Report/Form/Grant/Detail.php

index d1860ed244c79f74e8baa247263d6b4e0f8e449c..7c9e8c33319e05ee4143aefcbe962cb561cd0210 100644 (file)
@@ -104,11 +104,6 @@ class CRM_Report_Form_Grant_Detail extends CRM_Report_Form {
             'name' => 'grant_type_id',
             'title' => ts('Grant Type'),
           ),
-          'grant_program_id' =>
-          array( 
-            'name' => 'grant_program_id' ,
-            'title' => ts( 'Grant Program' ),
-          ),
           'status_id' =>
           array(
             'name' => 'status_id',
@@ -169,13 +164,6 @@ class CRM_Report_Form_Grant_Detail extends CRM_Report_Form {
             'operatorType' => CRM_Report_Form::OP_MULTISELECT,
             'options' => CRM_Grant_PseudoConstant::grantType(),
           ),
-          'grant_program'     => 
-          array(
-            'name' =>'grant_program_id' ,
-            'title'      => ts( 'Grant Program' ),
-            'operatorType'   => CRM_Report_Form::OP_MULTISELECT,
-            'options'      => CRM_Grant_BAO_GrantProgram::grantPrograms( ),
-          ),
           'status_id' =>
           array(
             'name' => 'status_id',
@@ -222,10 +210,6 @@ class CRM_Report_Form_Grant_Detail extends CRM_Report_Form {
           array(
             'title' => ts('Grant Type'),
           ),
-          'grant_program_id' => 
-          array( 
-            'title'        => ts( 'Grant Program' )
-          ),
           'status_id' =>
           array(
             'title' => ts('Grant Status'),
@@ -286,13 +270,13 @@ class CRM_Report_Form_Grant_Detail extends CRM_Report_Form {
   function from() {
     $this->_from = "
         FROM civicrm_grant {$this->_aliases['civicrm_grant']}
-                        LEFT JOIN civicrm_contact {$this->_aliases['civicrm_contact']} 
+                        LEFT JOIN civicrm_contact {$this->_aliases['civicrm_contact']}
                     ON ({$this->_aliases['civicrm_grant']}.contact_id  = {$this->_aliases['civicrm_contact']}.id  ) ";
     if ($this->_addressField) {
       $this->_from .= "
-                  LEFT JOIN civicrm_address {$this->_aliases['civicrm_address']} 
-                         ON {$this->_aliases['civicrm_contact']}.id = 
-                            {$this->_aliases['civicrm_address']}.contact_id AND 
+                  LEFT JOIN civicrm_address {$this->_aliases['civicrm_address']}
+                         ON {$this->_aliases['civicrm_contact']}.id =
+                            {$this->_aliases['civicrm_address']}.contact_id AND
                             {$this->_aliases['civicrm_address']}.is_primary = 1\n";
     }
   }
@@ -367,7 +351,7 @@ class CRM_Report_Form_Grant_Detail extends CRM_Report_Form {
         array_key_exists('civicrm_contact_id', $row)
       ) {
         $url = CRM_Utils_System::url('civicrm/contact/view',
-          'reset=1&cid=' . $row['civicrm_contact_id'], 
+          'reset=1&cid=' . $row['civicrm_contact_id'],
           $this->_absoluteUrl
         );
         $rows[$rowNum]['civicrm_contact_sort_name_link'] = $url;
@@ -381,12 +365,6 @@ class CRM_Report_Form_Grant_Detail extends CRM_Report_Form {
         }
         $entryFound = TRUE;
       }
-      if ( array_key_exists('civicrm_grant_grant_program_id', $row) ) {
-        if ( $value = $row['civicrm_grant_grant_program_id'] ) {
-          $rows[$rowNum]['civicrm_grant_grant_program_id'] = CRM_Grant_BAO_GrantProgram::grantPrograms( $value );
-        }
-        $entryFound = true;
-      }
       if (array_key_exists('civicrm_grant_status_id', $row)) {
         if ($value = $row['civicrm_grant_status_id']) {
           $rows[$rowNum]['civicrm_grant_status_id'] = CRM_Grant_PseudoConstant::grantStatus($value);