Merge pull request #6973 from joannechester/CRM-17407
[civicrm-core.git] / CRM / Activity / Page / UserDashboard.php
index 26299d503858208ff455c4bd95efa1afaadd909e..b9d5f89a2b0a70c115558f125cd5bda705c74123 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.6                                                |
+ | CiviCRM version 4.7                                                |
  +--------------------------------------------------------------------+
  | Copyright CiviCRM LLC (c) 2004-2015                                |
  +--------------------------------------------------------------------+
  *
  * @package CRM
  * @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
  */
 
 /**
- * This class is for building event(participation) block on user dashboard
+ * This class is for building event(participation) block on user dashboard.
  */
 class CRM_Activity_Page_UserDashboard extends CRM_Contact_Page_View_UserDashBoard {
 
@@ -55,7 +53,8 @@ class CRM_Activity_Page_UserDashboard extends CRM_Contact_Page_View_UserDashBoar
     $controller->reset();
     $controller->set('context', 'user');
     $controller->set('cid', $this->_contactId);
-    $controller->set('status', array(1 => 'on', 7 => 'on'));
+    // Limit to status "Scheduled" and "Available"
+    $controller->set('status', array('IN' => array(1, 7)));
     $controller->set('activity_role', 2);
     $controller->set('force', 1);
     $controller->process();
@@ -65,10 +64,9 @@ class CRM_Activity_Page_UserDashboard extends CRM_Contact_Page_View_UserDashBoar
   }
 
   /**
-   * the main function that is called when the page
-   * loads, it decides the which action has to be taken for the page.
+   * The main function that is called when the page loads.
    *
-   * @return void
+   * It decides the which action has to be taken for the page.
    */
   public function run() {
     parent::preProcess();