Skip to content
Snippets Groups Projects
Commit ac79474d authored by Tim Steiner's avatar Tim Steiner
Browse files

Set up a file to be used by any UNL modules that need to load Zend Framework.

git-svn-id: file:///tmp/wdn_thm_drupal/branches/drupal-7.x@95 20a16fea-79d4-4915-8869-1ea9d5ebf173
parent f623f86f
No related branches found
No related tags found
No related merge requests found
......@@ -3,3 +3,4 @@ name = UNL CAS
description = Enables UNL CAS authentication/registration of users.
core = 7.x
files[] = unl_cas.module
files[] = unl_loader.php
......@@ -7,12 +7,8 @@ function unl_cas_enable()
function unl_cas_init()
{
drupal_flush_all_caches();
set_include_path(get_include_path() . PATH_SEPARATOR . dirname(__FILE__) . '/../../libraries' );
require_once 'Zend/Loader/Autoloader.php';
$autoloader = Zend_Loader_Autoloader::getInstance();
$autoloader->registerNamespace('Unl_');
require_once dirname(__FILE__) . '/unl_loader.php';
unl_load_zend_framework();
$cas = unl_cas_get_adapter();
......
<?php
function unl_load_zend_framework()
{
static $isLoaded = FALSE;
if ($isLoaded) {
return;
}
set_include_path(get_include_path() . PATH_SEPARATOR . dirname(__FILE__) . '/../../libraries' );
require_once 'Zend/Loader/Autoloader.php';
$autoloader = Zend_Loader_Autoloader::getInstance();
$autoloader->registerNamespace('Unl_');
$isLoaded = TRUE;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment