Merge remote-tracking branch 'upstream/4.3' into 4.3-4.4-2013-10-28-14-52-15
[civicrm-core.git] / CRM / Core / JobManager.php
index 15e7429e14f7bd27ae1721630a9e551f973e9ef9..5a64877e1e5ce03a7aef5bb2532d82947e501c1f 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.3                                                |
+ | CiviCRM version 4.4                                                |
  +--------------------------------------------------------------------+
  | Copyright CiviCRM LLC (c) 2004-2013                                |
  +--------------------------------------------------------------------+
@@ -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,16 +141,17 @@ 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();
     $dao = new CRM_Core_DAO_Job();
     $dao->orderBy('name');
+    $dao->domain_id = CRM_Core_Config::domainID();
     $dao->find();
     while ($dao->fetch()) {
       $temp = array();
@@ -163,10 +164,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 +191,7 @@ class CRM_Core_JobManager {
     $this->singleRunParams[$key] = $params;
     $this->singleRunParams[$key]['version'] = 3;
   }
-  
+
   /*
    *
    * @return array|null collection of permissions, null if none