Merge remote-tracking branch 'upstream/4.3' into 4.3-4.4-2013-10-21-22-31-28
[civicrm-core.git] / CRM / Grant / BAO / Grant.php
index b9fcdca55ce57499debd72e01934161d767b9ed3..f0a91cfbb4e3ac654256c68bb3e562db5c722af8 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.3                                                |
+ | CiviCRM version 4.4                                                |
  +--------------------------------------------------------------------+
  | Copyright CiviCRM LLC (c) 2004-2013                                |
  +--------------------------------------------------------------------+
@@ -65,7 +65,7 @@ class CRM_Grant_BAO_Grant extends CRM_Grant_DAO_Grant {
     $status = array();
     $summary = array();
     $summary['total_grants'] = NULL;
-    $status = CRM_Grant_PseudoConstant::grantStatus();
+    $status = CRM_Core_PseudoConstant::get('CRM_Grant_DAO_Grant', 'status_id');
 
     foreach ($status as $id => $name) {
       $stats[$id] = array(
@@ -188,7 +188,7 @@ class CRM_Grant_BAO_Grant extends CRM_Grant_DAO_Grant {
       }
     }
     $grant = new CRM_Grant_DAO_Grant();
-    $grant->id = CRM_Utils_Array::value('grant', $ids);
+    $grant->id = CRM_Utils_Array::value('grant_id', $ids);
 
     $grant->copyValues($params);
 
@@ -204,7 +204,7 @@ class CRM_Grant_BAO_Grant extends CRM_Grant_DAO_Grant {
       "action=view&reset=1&id={$grant->id}&cid={$grant->contact_id}&context=home"
     );
 
-    $grantTypes = CRM_Grant_PseudoConstant::grantType();
+    $grantTypes = CRM_Core_PseudoConstant::get('CRM_Grant_DAO_Grant', 'grant_type_id');
     if (!CRM_Utils_Array::value('skipRecentView', $params)) {
       if(!isset($grant->contact_id) || !isset($grant->grant_type_id)){
         $grant->find(TRUE);