forked from joaktree/J3.x
/
joaktree.php
51 lines (43 loc) · 1.29 KB
/
joaktree.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<?php
/**
* Joomla! component Joaktree
* file front end component - joaktree.php
*
* @version 1.5.0
* @author Niels van Dantzig
* @package Joomla
* @subpackage Joaktree
* @license GNU/GPL
*
* Component for genealogy in Joomla!
*
* This component file was created using the Joomla Component Creator by Not Web Design
* http://www.notwebdesign.com/joomla_component_creator/
*
*/
// no direct access
defined('_JEXEC') or die('Restricted access');
// Require the base controller
defined('DS') or define('DS', DIRECTORY_SEPARATOR);
require_once JPATH_COMPONENT.DS.'controller.php';
require_once(JPATH_COMPONENT.DS.'helper'.DS.'helper.php');
//load the GedCom language file
$lang = JFactory::getLanguage();
$lang->load('com_joaktree.gedcom', JPATH_ADMINISTRATOR);
// Require specific controller if requested
$input = JFactory::getApplication()->input;
if($controller = $input->get('controller', null, 'word')) {
$path = JPATH_COMPONENT.DS.'controllers'.DS.$controller.'.php';
if (file_exists($path)) {
require_once $path;
} else {
$controller = '';
}
}
// Create the controller
$classname = 'JoaktreeController'.ucfirst($controller);
$controller = new $classname( );
$controller->execute( $input->get('task', null, 'word') );
// Redirect if set by the controller
$controller->redirect();
?>