/
mobilize.php
49 lines (38 loc) · 1.55 KB
/
mobilize.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
<?php
/**
* @version $Id: uniform.php 19094 2012-11-30 02:27:22Z thailv $
* @package JSNUniform
* @subpackage Uniform
* @author JoomlaShine Team <support@joomlashine.com>
* @copyright Copyright (C) 2012 JoomlaShine.com. All Rights Reserved.
* @license GNU/GPL v2 or later http://www.gnu.org/licenses/gpl-2.0.html
*
* Websites: http://www.joomlashine.com
* Technical Support: Feedback - http://www.joomlashine.com/contact-us/get-support.html
*/
defined('_JEXEC') or die('Restricted access');
// Get application object
$app = JFactory::getApplication();
// Get input object
$input = $app->input;
// Access check
if (!JFactory::getUser()->authorise('core.manage', $input->getCmd('option')))
{
return JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR'));
}
// Initialize common assets
require_once JPATH_COMPONENT_ADMINISTRATOR . '/bootstrap.php';
JLoader::register('JSNMobilizeHelper', JPATH_COMPONENT_ADMINISTRATOR . '/helpers/mobilize.php');
// Check if all dependency is installed
require_once JPATH_COMPONENT_ADMINISTRATOR . '/dependency.php';
// Register include path for class that working with database table
JTable::addIncludePath(JPATH_COMPONENT_ADMINISTRATOR . '/tables');
if (strpos('installer + update + upgrade', $input->getCmd('view')) !== false OR JSNVersion::isJoomlaCompatible('3.'))
{
// Get the appropriate controller
$controller = JSNBaseController::getInstance('JSNMobilize');
// Perform the request task
$controller->execute($input->getCmd('task'));
// Redirect if set by the controller
$controller->redirect();
}