<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.3 |
+ | CiviCRM version 4.4 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2013 |
+--------------------------------------------------------------------+
jimport('joomla.application.component.helper');
jimport('joomla.database.table');
- $JUserTable = &JTable::getInstance('User', 'JTable');
+ $JUserTable = JTable::getInstance('User', 'JTable');
$db = $JUserTable->getDbo();
$query = $db->getQuery(TRUE);
function setUserSession($data) {
list($userID, $ufID) = $data;
$user = new JUser( $ufID );
- $session = &JFactory::getSession();
+ $session = JFactory::getSession();
$session->set('user', $user);
parent::setUserSession($data);
function getUFLocale() {
if (defined('_JEXEC')) {
$conf = JFactory::getConfig();
- $locale = $conf->getValue('config.language');
+ $locale = $conf->get('language');
return str_replace('-', '_', $locale);
}
return NULL;
// Get the framework.
if (file_exists($joomlaBase . '/libraries/import.legacy.php')) {
- require $joomlaBase . '/libraries/import.legacy.php';
+ require $joomlaBase . '/libraries/import.legacy.php';
}
require $joomlaBase . '/libraries/import.php';
require $joomlaBase . '/libraries/joomla/event/dispatcher.php';
$loginURL .= 'index.php?option=com_users&view=login';
return $loginURL;
}
-
+
public function getLoginDestination(&$form) {
return;
}
+
+ /**
+ * Return default Site Settings
+ * @return array array
+ * - $url, (Joomla - non admin url)
+ * - $siteName,
+ * - $siteRoot
+ */
+ function getDefaultSiteSettings($dir){
+ $config = CRM_Core_Config::singleton();
+ $url = preg_replace(
+ '|/administrator|',
+ '',
+ $config->userFrameworkBaseURL
+ );
+ $siteRoot = preg_replace(
+ '|/media/civicrm/.*$|',
+ '',
+ $config->imageUploadDir
+ );
+ return array($url, NULL, $siteRoot);
+ }
}