Project

General

Profile

Revision 182

View differences:

trunk/install.extplorer.php
33 33
		'.$result->getMessage().'
34 34
		</pre>';
35 35
	}
36
	$database->setQuery( "SELECT id FROM #__components WHERE admin_menu_link = 'option=com_extplorer'" );
37
	$id = $database->loadResult();
36
	if( !is_callable( array( $database, 'loadNextRow' ))) {
38 37

  
39
	//add new admin menu images
40
	$database->setQuery( "UPDATE #__components SET admin_menu_img = '../administrator/components/com_extplorer/images/joomla_x_icon.png', admin_menu_link = 'option=com_extplorer' WHERE id=$id");
41
	$database->query();
38
		$database->setQuery( "SELECT id FROM #__components WHERE admin_menu_link = 'option=com_extplorer'" );
39
		$id = $database->loadResult();
40

  
41
		//add new admin menu images
42
		$database->setQuery( "UPDATE #__components SET admin_menu_img = '../administrator/components/com_extplorer/images/joomla_x_icon.png', admin_menu_link = 'option=com_extplorer' WHERE id=$id");
43
		$database->query();
44
	}
42 45
}
43 46
?>
trunk/extplorer.xml
2 2
<mosinstall type="component">
3 3
<!-- Mambo/Joomla! 1.0 Installer XML File -->
4 4
    <name>eXtplorer</name>
5
    <creationDate>9.11.2010</creationDate>
5
    <creationDate>04.01.2011</creationDate>
6 6
    <author>soeren, QuiX Project</author>
7 7
    <copyright>Soeren Eberhardt-Biermann, QuiX Project</copyright>
8 8
    <authorEmail>soeren|-at|-virtuemart.net</authorEmail>
trunk/CHANGELOG.txt
2 2
Changelog for eXtplorer
3 3
Version $Id$
4 4
****************************
5

  
6
- works with Joomla! 1.6 now
7

  
5 8
--- version 2.1.0 RC2 released ---
6 9

  
7 10
- updated to ExtJS 3.3.1
trunk/extplorer.j15.xml
3 3
<install type="component" version="1.5.0">
4 4
<!-- Joomla! 1.5 Installer XML File -->
5 5
    <name>eXtplorer</name>
6
    <creationDate>09.11.2010</creationDate>
6
    <creationDate>04.01.2011</creationDate>
7 7
    <author>soeren, QuiX Project</author>
8 8
    <copyright>Soeren Eberhardt-Biermann, QuiX Project</copyright>
9 9
    <license>GNU/GPL, alternative: MPL</license>
......
22 22
	  <li>Creating and Extracting Archives with Files and Directories,</li>
23 23
	  <li>Changing file permissions (chmod)</li></ul><br/>and much more.<br/><br/>
24 24
	  <strong>By default restricted to Superadministrators!</strong>
25
	]]></description>
25
	]]></description> 
26
	<!-- Runs on install/uninstall/update; New in J! 1.6 -->
27
    <scriptfile>script.php</scriptfile>
26 28
    <files>
27 29
        <filename>configuration.ext.php</filename>
28 30
        <filename>extplorer.php</filename>
......
66 68
    </uninstall>
67 69
    <installfile>install.extplorer.php</installfile>
68 70
    <administration>
69
        <menu>eXtplorer</menu>
71
        <menu img="../administrator/components/com_extplorer/images/joomla_x_icon.png">eXtplorer</menu>
70 72
        <files>		
71 73
				<filename>scripts.tar.gz</filename>
72 74
				<filename>CHANGELOG.txt</filename>
trunk/include/init.php
49 49
}
50 50

  
51 51
//------------------------------------------------------------------------------
52
// check for the existance of Joomla!/Mambo mainframe variable
53
	if ( !is_callable( array( $GLOBALS['mainframe'], 'getuser') )) {
54
		// login to use eXtplorer: (true/false)
55
		$GLOBALS["require_login"] = true;
56
	} else {
57
		$GLOBALS["require_login"] = false;
58
	}
59

  
60 52
	// if gzcompress is available, we can use Zip, Tar and TGz
61 53
	if ( extension_loaded("zlib")) {
62 54
		$GLOBALS["zip"] = $GLOBALS["tgz"] = true;
......
90 82
require_once(_EXT_PATH . '/application.php');
91 83
require_once(_EXT_PATH . '/include/functions.php');
92 84

  
85
// check if we need login
86
	if ( !ext_isjoomla() ) {
87
		// login to use eXtplorer: (true/false)
88
		$GLOBALS["require_login"] = true;
89
	} else {
90
		$GLOBALS["require_login"] = false;
91
	}
92

  
93 93
if (!class_exists('InputFilter')) {
94 94
	require_once( _EXT_PATH . '/libraries/inputfilter.php' );
95 95
}
......
99 99

  
100 100
$action 			= stripslashes(extGetParam( $_REQUEST, "action" ));
101 101
$default_lang		= !empty( $GLOBALS['mosConfig_lang'] ) ? $GLOBALS['mosConfig_lang'] : ext_Lang::detect_lang();
102
if( !@is_object( $mainframe )) {
103
	$mainframe = JFactory::getApplication('administrator');
104
}
102 105
$GLOBALS["language"] = basename($mainframe->getUserStateFromRequest( 'language', 'lang', $default_lang ));
103 106

  
104 107
// Get Item
......
252 255

  
253 256
$_SESSION['ext_'.$GLOBALS['file_mode'].'dir'] = $dir;
254 257
//------------------------------------------------------------------------------
255
?>
trunk/include/header.php
56 56
	}
57 57
	echo '<tr><td width="20%">';
58 58
	if( is_object( $GLOBALS['_VERSION'] ) || class_exists( 'jversion')) {
59
		echo "<a href=\"index2.php\">Back to ".( !empty($GLOBALS['_VERSION']->PRODUCT) ? @$GLOBALS['_VERSION']->PRODUCT : 'Joomla!' ).'</a>';
59
		echo '<a href="'.basename($_SERVER['SCRIPT_NAME']).'">Back to '.( !empty($GLOBALS['_VERSION']->PRODUCT) ? @$GLOBALS['_VERSION']->PRODUCT : 'Joomla!' ).'</a>';
60 60

  
61 61
	} else {
62 62
		echo ext_selectList('language_selector', $GLOBALS['language'], get_languages(), 1, '', 'onchange="document.location.href=\''.$GLOBALS['script_name'].'?lang=\' + this.options[this.selectedIndex].value;"');
trunk/script.php
1
<?php
2
// No direct access to this file
3
defined('_JEXEC') or die('Restricted access');
4
 
5
/**
6
 * Script file of eXtplorer component
7
 */
8
class com_extplorerInstallerScript
9
{
10
        /**
11
         * method to install the component
12
         *
13
         * @return void
14
         */
15
        function install($parent) 
16
        {
17
                // $parent is the class calling this method
18
                //$parent->getParent()->setRedirectURL('index.php?option=com_helloworld');
19
        }
20
 
21
        /**
22
         * method to uninstall the component
23
         *
24
         * @return void
25
         */
26
        function uninstall($parent) 
27
        {
28
                // $parent is the class calling this method
29
        }
30
 
31
        /**
32
         * method to update the component
33
         *
34
         * @return void
35
         */
36
        function update($parent) 
37
        {
38
                // $parent is the class calling this method
39
        }
40
 
41
        /**
42
         * method to run before an install/update/uninstall method
43
         *
44
         * @return void
45
         */
46
        function preflight($type, $parent) 
47
        {
48
                // $parent is the class calling this method
49
                // $type is the type of change (install, update or discover_install)
50
        }
51
 
52
        /**
53
         * method to run after an install/update/uninstall method
54
         *
55
         * @return void
56
         */
57
        function postflight($type, $parent) 
58
        {
59
			$db = jfactory::getdbo();
60
			$db->setQuery( "UPDATE `#__menu` SET link='index.php?option=com_extplorer&tmpl=component' WHERE link = 'index.php?option=com_extplorer'" );
61
			$db->query();
62
        }
63
}
64

  
0 65

  
trunk/admin.extplorer.php
37 37
 * I wouldn't recommend to let in Managers
38 38
 * allowed: Superadministrator
39 39
**/
40

  
41
// The eXtplorer version number
42
$GLOBALS['ext_version'] = '2.1.0';
43
$GLOBALS['ext_home'] = 'http://extplorer.sourceforge.net';
44

  
45
//------------------------------------------------------------------------------
46
if( defined( 'E_STRICT' ) ) { // Suppress Strict Standards Warnings
47
	error_reporting(E_ALL);
48
}
49
//------------------------------------------------------------------------------
50
umask(0002); // Added to make created files/dirs group writable
51
//------------------------------------------------------------------------------
52
require_once( dirname( __FILE__) . "/include/init.php" );	// Init
53

  
40 54
if( !@is_object($my) && is_callable(array('jfactory','getuser'))) {
41 55
	$my = JFactory::getUser();
42 56
}
57

  
43 58
if( @is_object($my)) {
44
	if ($my->usertype != 'Super Administrator') {
59
	
60
	if( ext_isJoomla('1.6', '>=' )) {
61
		$access = $my->authorise('core.admin');
62
	} else {
63
		$access = $my->usertype == 'Super Administrator';
64
	}
65
	
66
	if (!$access) {
45 67
		$url = htmlspecialchars($_SERVER['PHP_SELF']);
46 68
		if (headers_sent()) {
47 69
			echo "<script>document.location.href='$url';</script>\n";
......
52 74
		}
53 75
	}
54 76
}
55
// The joomlaXplorer version number
56
$GLOBALS['ext_version'] = '2.1.0';
57
$GLOBALS['ext_home'] = 'http://extplorer.sourceforge.net';
58 77

  
59
//------------------------------------------------------------------------------
60
if( defined( 'E_STRICT' ) ) { // Suppress Strict Standards Warnings
61
	error_reporting(E_ALL);
62
}
63
//------------------------------------------------------------------------------
64
umask(0002); // Added to make created files/dirs group writable
65
//------------------------------------------------------------------------------
66
require_once( dirname( __FILE__) . "/include/init.php" );	// Init
67

  
68 78
/** Needed to keep the filelist in the XML installer file up-to-date
69 79
$path = dirname(__FILE__);
70 80
$filelist = extReadDirectory( $path, '.', true, true );
......
193 203
if( ext_isXHR() ) {
194 204
	ext_exit();
195 205
}
196

  

Also available in: Unified diff