From 2cb7adde873f88ae03bcfc58206d19f43ef84864 Mon Sep 17 00:00:00 2001
From: Ravish Nair <ravish.nair@webaccess.co.in>
Date: Thu, 4 Jul 2013 22:15:00 +0530
Subject: [PATCH] -- fix for CRM-13002

----------------------------------------
* CRM-13002: Cron Jobs in Joomla 2.5.11 Do not Run
  http://issues.civicrm.org/jira/browse/CRM-13002
---
 CRM/Utils/System/Joomla.php | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/CRM/Utils/System/Joomla.php b/CRM/Utils/System/Joomla.php
index fc7eb8f71b..bff2a134cf 100644
--- a/CRM/Utils/System/Joomla.php
+++ b/CRM/Utils/System/Joomla.php
@@ -587,7 +587,7 @@ class CRM_Utils_System_Joomla extends CRM_Utils_System_Base {
    * @param $loadUser boolean load cms user?
    * @param $throwError throw error on failure?
    */
-  function loadBootStrap($params = array(), $loadUser = TRUE, $throwError = TRUE, $loadDefines = TRUE) {
+  function loadBootStrap($params = array(), $loadUser = TRUE, $throwError = TRUE, $realPath = NULL, $loadDefines = TRUE) {
     // Setup the base path related constant.
     $joomlaBase = dirname(dirname(dirname(dirname(dirname(dirname(dirname(dirname(__FILE__))))))));
 
@@ -601,6 +601,9 @@ class CRM_Utils_System_Joomla extends CRM_Utils_System_Base {
     }
 
     // Get the framework.
+    if (file_exists($joomlaBase . '/libraries/import.legacy.php')) {
+      require $joomlaBase . '/libraries/import.legacy.php';  
+    }
     require $joomlaBase . '/libraries/import.php';
     require $joomlaBase . '/libraries/joomla/event/dispatcher.php';
     require $joomlaBase . '/configuration.php';
@@ -618,7 +621,6 @@ class CRM_Utils_System_Joomla extends CRM_Utils_System_Base {
     }
     else {
       require $joomlaBase . '/libraries/joomla/uri/uri.php';
-      require $joomlaBase . '/libraries/legacy/component/helper.php';
     }
 
     jimport('joomla.application.cli');
-- 
2.25.1