コード例 #1
0
function civicrm_invoke()
{
    civicrm_init();
    plugin_init();
    $user = JFactory::getUser();
    /* bypass synchronize if running upgrade
     * to avoid any serious non-recoverable error
     * which might hinder the upgrade process.
     */
    require_once 'CRM/Utils/Array.php';
    if (CRM_Utils_Array::value('task', $_REQUEST) != 'civicrm/upgrade') {
        require_once 'CRM/Core/BAO/UFMatch.php';
        CRM_Core_BAO_UFMatch::synchronize($user, FALSE, 'Joomla', 'Individual', TRUE);
    }
    require_once 'CRM/Utils/System/Joomla.php';
    CRM_Utils_System_Joomla::addHTMLHead(NULL, TRUE);
    if (isset($_GET['task'])) {
        $args = explode('/', trim($_GET['task']));
    } else {
        $_GET['task'] = 'civicrm/dashboard';
        $_GET['reset'] = 1;
        $args = array('civicrm', 'dashboard');
    }
    CRM_Core_Invoke::invoke($args);
}
コード例 #2
0
function civicrm_invoke()
{
    civicrm_init();
    global $my;
    require_once 'CRM/Core/BAO/UFMatch.php';
    CRM_Core_BAO_UFMatch::synchronize($my, false, 'Mambo');
    $args = explode('/', trim($_GET['task']));
    CRM_Core_Invoke::invoke($args);
}
コード例 #3
0
ファイル: admin.civicrm.php プロジェクト: ksecor/civicrm
function civicrm_invoke()
{
    civicrm_init();
    plugin_init();
    $user = JFactory::getUser();
    require_once 'CRM/Core/BAO/UFMatch.php';
    CRM_Core_BAO_UFMatch::synchronize($user, false, 'Joomla', 'Individual');
    if (isset($_GET['task'])) {
        $args = explode('/', trim($_GET['task']));
        CRM_Core_Invoke::invoke($args);
    } else {
        $_GET['task'] = 'civicrm/dashboard';
        $_GET['reset'] = 1;
        $args = array('civicrm', 'dashboard');
        CRM_Core_Invoke::invoke($args);
    }
}
コード例 #4
0
ファイル: civicrm.php プロジェクト: bhirsch/civicrm
function civicrm_invoke()
{
    civicrm_init();
    // check and ensure that we have a valid session
    if (!empty($_POST)) {
        // the session should not be empty
        // however for standalone forms, it will not have any CiviCRM variables in the
        // session either, so dont check for it
        if (count($_SESSION) <= 1) {
            require_once 'CRM/Utils/System.php';
            $config =& CRM_Core_Config::singleton();
            CRM_Utils_System::redirect($config->userFrameworkBaseURL);
        }
    }
    // add all the values from the itemId param
    // overrride the GET values if conflict
    if (CRM_Utils_Array::value('Itemid', $_GET)) {
        $component =& JComponentHelper::getComponent('com_civicrm');
        $menu =& JSite::getMenu();
        $item = $menu->getItems('componentid', $component->id, true);
        $params = $menu->getParams($_GET['Itemid']);
        $args = array('task', 'id', 'gid', 'reset', 'pageId', 'action');
        foreach ($args as $a) {
            $val = $params->get($a, null);
            if ($val !== null) {
                $_GET[$a] = $val;
            }
        }
    }
    $task = CRM_Utils_Array::value('task', $_GET, '');
    $args = explode('/', trim($task));
    // check permission
    if (!civicrm_check_permission($args)) {
        echo "You do not have permission to execute this url.";
        return;
    }
    require_once 'CRM/Utils/System/Joomla.php';
    CRM_Utils_System_Joomla::addHTMLHead(null, true);
    $user = JFactory::getUser();
    require_once 'CRM/Core/BAO/UFMatch.php';
    CRM_Core_BAO_UFMatch::synchronize($user, false, 'Joomla', 'Individual');
    CRM_Core_Invoke::invoke($args);
}
コード例 #5
0
function civicrm_invoke()
{
    civicrm_init();
    // check and ensure that we have a valid session
    if (!empty($_POST)) {
        // the session should not be empty
        // however for standalone forms, it will not have any CiviCRM variables in the
        // session either, so dont check for it
        if (count($_SESSION) <= 1) {
            require_once 'CRM/Utils/System.php';
            $config = CRM_Core_Config::singleton();
            CRM_Utils_System::redirect($config->userFrameworkBaseURL);
        }
    }
    // add all the values from the itemId param
    // overrride the GET values if conflict
    if (CRM_Utils_Array::value('Itemid', $_GET)) {
        $component = JComponentHelper::getComponent('com_civicrm');
        $menu = JSite::getMenu();
        $params = $menu->getParams($_GET['Itemid']);
        $args = array('task', 'id', 'gid', 'pageId', 'action', 'csid');
        $view = CRM_Utils_Array::value('view', $_GET);
        if ($view) {
            $args[] = 'reset';
        }
        foreach ($args as $a) {
            $val = $params->get($a, NULL);
            if ($val !== NULL && $view) {
                $_GET[$a] = $val;
            }
        }
    }
    $task = CRM_Utils_Array::value('task', $_GET, '');
    $args = explode('/', trim($task));
    require_once 'CRM/Utils/System/Joomla.php';
    CRM_Utils_System_Joomla::addHTMLHead(NULL, TRUE);
    $user = JFactory::getUser();
    require_once 'CRM/Core/BAO/UFMatch.php';
    CRM_Core_BAO_UFMatch::synchronize($user, FALSE, 'Joomla', 'Individual', TRUE);
    CRM_Core_Invoke::invoke($args);
}