<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.5 |
+ | CiviCRM version 4.6 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2014 |
+--------------------------------------------------------------------+
/**
*
*/
- function __construct() {
+ public function __construct() {
/**
* deprecated property to check if this is a drupal install. The correct method is to have functions on the UF classes for all UF specific
* functions and leave the codebase oblivious to the type of CMS
*
* @return uid if user exists, false otherwise
*
- * @access public
*/
- function createUser(&$params, $mail) {
+ public function createUser(&$params, $mail) {
$baseDir = JPATH_SITE;
require_once $baseDir . '/components/com_users/models/registration.php';
* @param integer $ufID User ID in CMS
* @param string $ufName User name
*/
- function updateCMSName($ufID, $ufName) {
+ public function updateCMSName($ufID, $ufName) {
$ufID = CRM_Utils_Type::escape($ufID, 'Integer');
$ufName = CRM_Utils_Type::escape($ufName, 'String');
*
* @return void
*/
- function checkUserNameEmailExists(&$params, &$errors, $emailName = 'email') {
+ public function checkUserNameEmailExists(&$params, &$errors, $emailName = 'email') {
$config = CRM_Core_Config::singleton();
$dao = new CRM_Core_DAO();
* @param string $pageTitle
*
* @return void
- * @access public
*/
- function setTitle($title, $pageTitle = NULL) {
+ public function setTitle($title, $pageTitle = NULL) {
if (!$pageTitle) {
$pageTitle = $title;
}
* @internal param string $url
*
* @return void
- * @access public
*/
- function appendBreadCrumb($breadCrumbs) {
+ public function appendBreadCrumb($breadCrumbs) {
$template = CRM_Core_Smarty::singleton();
$bc = $template->get_template_vars('breadcrumb');
* @internal param string $bc the new breadcrumb to be appended
*
* @return void
- * @access public
*/
- function resetBreadCrumb() {
+ public function resetBreadCrumb() {
return;
}
* @internal param string $head the new string to be appended
*
* @return void
- * @access public
*/
- static function addHTMLHead($string = NULL) {
+ public static function addHTMLHead($string = NULL) {
if ($string) {
$document = JFactory::getDocument();
$document->addCustomTag($string);
* @see CRM_Core_Region::render()
*
* @return bool TRUE if we support this operation in this CMS, FALSE otherwise
- * @access public
*/
public function addScriptUrl($url, $region) {
return FALSE;
* @see CRM_Core_Region::render()
*
* @return bool TRUE if we support this operation in this CMS, FALSE otherwise
- * @access public
*/
public function addScript($code, $region) {
return FALSE;
* @see CRM_Core_Region::render()
*
* @return bool TRUE if we support this operation in this CMS, FALSE otherwise
- * @access public
*/
public function addStyleUrl($url, $region) {
if ($region == 'html-header') {
* @see CRM_Core_Region::render()
*
* @return bool TRUE if we support this operation in this CMS, FALSE otherwise
- * @access public
*/
public function addStyle($code, $region) {
if ($region == 'html-header') {
* @param bool $forceBackend
*
* @return string an HTML string containing a link to the given path.
- * @access public
*/
function url($path = NULL, $query = NULL, $absolute = TRUE,
$fragment = NULL, $htmlize = TRUE,
* @return void
* access public
*/
- function mapConfigToSSL() {
+ public function mapConfigToSSL() {
// dont need to do anything, let CMS handle their own switch to SSL
return;
}
* @param $action the default action if one is pre-specified
*
* @return string the url to post the form
- * @access public
*/
- function postURL($action) {
+ public function postURL($action) {
if (!empty($action)) {
return $action;
}
* @param object $user handle to the user object
*
* @return void
- * @access public
*/
- function setEmail(&$user) {
+ public function setEmail(&$user) {
global $database;
$query = "SELECT email FROM #__users WHERE id='$user->id'";
$database->setQuery($query);
* @return mixed false if no auth
* array(
contactID, ufID, unique string ) if success
- * @access public
*/
- function authenticate($name, $password, $loadCMSBootstrap = FALSE) {
+ public function authenticate($name, $password, $loadCMSBootstrap = FALSE) {
require_once 'DB.php';
$config = CRM_Core_Config::singleton();
*
* @param array $data array with user specific data
*
- * @access public
*/
- function setUserSession($data) {
+ public function setUserSession($data) {
list($userID, $ufID) = $data;
$user = new JUser( $ufID );
$session = JFactory::getSession();
*
* @param string $message the message to set
*
- * @access public
*/
- function setMessage($message) {
+ public function setMessage($message) {
return;
}
*
* @return bool
*/
- function loadUser($user) {
+ public function loadUser($user) {
return TRUE;
}
- function permissionDenied() {
+ public function permissionDenied() {
CRM_Core_Error::fatal(ts('You do not have permission to access this page.'));
}
- function logout() {
+ public function logout() {
session_destroy();
header("Location:index.php");
}
*
* @return string the used locale or null for none
*/
- function getUFLocale() {
+ public function getUFLocale() {
if (defined('_JEXEC')) {
$conf = JFactory::getConfig();
$locale = $conf->get('language');
/**
* @return string
*/
- function getVersion() {
+ public function getVersion() {
if (class_exists('JVersion')) {
$version = new JVersion;
return $version->getShortVersion();
*
* @return bool
*/
- function loadBootStrap($params = array(), $loadUser = TRUE, $throwError = TRUE, $realPath = NULL, $loadDefines = TRUE) {
+ public 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__))))))));
*
* @return string $userID logged in user unique identifier
*/
- function getLoggedInUniqueIdentifier() {
+ public function getLoggedInUniqueIdentifier() {
$user = JFactory::getUser();
return $this->getUniqueIdentifierFromUserObject($user);
}
* @param object $user object as described by the CMS
* @return mixed <NULL, number>
*/
- function getUserIDFromUserObject($user) {
+ public function getUserIDFromUserObject($user) {
return !empty($user->id) ? $user->id : NULL;
}
* @return mixed $uniqueIdentifer Unique identifier from the user Framework system
*
*/
- function getUniqueIdentifierFromUserObject($user) {
+ public function getUniqueIdentifierFromUserObject($user) {
return ($user->guest) ? NULL : $user->email;
}
*
* @return array CRM_Core_Module
*/
- function getModules() {
+ public function getModules() {
$result = array();
$db = JFactory::getDbo();
* - $siteName,
* - $siteRoot
*/
- function getDefaultSiteSettings($dir){
+ public function getDefaultSiteSettings($dir){
$config = CRM_Core_Config::singleton();
$url = preg_replace(
'|/administrator|',
*
* @return string
*/
- function getUserRecordUrl($contactID) {
+ public function getUserRecordUrl($contactID) {
$uid = CRM_Core_BAO_UFMatch::getUFId($contactID);
$userRecordUrl = NULL;
// if logged in user is super user, then he can view other users joomla profile
* Is the current user permitted to add a user
* @return bool
*/
- function checkPermissionAddUser() {
+ public function checkPermissionAddUser() {
if (JFactory::getUser()->authorise('core.create', 'com_users')) {
return TRUE;
}
* Output code from error function
* @param string $content
*/
- function outputError($content) {
+ public function outputError($content) {
if (class_exists('JErrorPage')) {
$error = new Exception($content);
JErrorPage::render($error);
/**
* Append to coreResourcesList
*/
- function appendCoreResources(&$list) {
+ public function appendCoreResources(&$list) {
$list[] = 'js/crm.joomla.js';
}
}
-