~dantrevino/ubuntu-us-florida-website/main

« back to all changes in this revision

Viewing changes to administrator/components/com_jce/installer.php

  • Committer: Dan Trevnio
  • Date: 2009-03-24 20:37:18 UTC
  • Revision ID: dantrevino@gmail.com-20090324203718-pg0e3lp4ztjjku9o
initialĀ siteĀ import

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?php
 
2
/**
 
3
* @version              $Id: admin.installer.php 9764 2007-12-30 07:48:11Z ircmaxell $
 
4
* @package              Joomla
 
5
* @subpackage   Installer
 
6
* @copyright    Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved.
 
7
* @license              GNU/GPL, see LICENSE.php
 
8
* Joomla! is free software. This version may have been modified pursuant
 
9
* to the GNU General Public License, and as distributed it includes or
 
10
* is derivative of works licensed under the GNU General Public License or
 
11
* other free or open source software licenses.
 
12
* See COPYRIGHT.php for copyright notices and details.
 
13
*/
 
14
 
 
15
// no direct access
 
16
defined('_JEXEC') or die('Restricted access');
 
17
 
 
18
/*
 
19
 * Make sure the user is authorized to view this page
 
20
 */
 
21
 
 
22
$ext = JRequest::getWord('type');
 
23
 
 
24
$subMenus = array(
 
25
        'Plugins'                       => 'plugin',
 
26
        'Languages'             => 'language',
 
27
        'Plugin Extensions' => 'extension'
 
28
);
 
29
JSubMenuHelper::addEntry(JText::_( 'Control Panel' ), '#" onclick="javascript:document.adminForm.type.value=\'\';document.adminForm.task.value=\'\';submitbutton(\'\');', !in_array( $ext, $subMenus));
 
30
JSubMenuHelper::addEntry(JText::_( 'Install' ), '#" onclick="javascript:document.adminForm.type.value=\'install\';document.adminForm.task.value=\'\';submitbutton(\'\');', !in_array( $ext, $subMenus));
 
31
 
 
32
 
 
33
foreach ($subMenus as $name => $extension) {
 
34
        JSubMenuHelper::addEntry(JText::_( $name ), '#" onclick="javascript:document.adminForm.type.value=\''.$extension.'\';submitbutton(\'manage\');', ($extension == $ext));
 
35
}
 
36
require_once( dirname( __FILE__ ) .DS. 'installer' .DS. 'controller.php' );
 
37
$controller = new InstallerController( array(
 
38
        'default_task' => 'installform', 
 
39
        'base_path' =>  dirname( __FILE__ ) .DS. 'installer'
 
40
) );
 
41
$task = JRequest::getWord('task');
 
42
if( $task == 'install' ){
 
43
        $task = 'doInstall';
 
44
}
 
45
$controller->execute( $task );
 
46
$controller->redirect();
 
 
b'\\ No newline at end of file'