Location: PHPKode > projects > Pygalle > install.pygalle.php
 * @package		Pygalle
 * @copyright	Copyright (C) 2008 Erik Finnegan. All rights reserved.
 * @license		GNU/GPL, see LICENSE.php
 * @author 		hide@address.com
 * Joomla! and Pygalle EVE Corporate Intranet are free software.
 * This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses.
 * See COPYRIGHT.php for copyright notices and details.

defined('_JEXEC') or die('Restricted access');

function com_install() {
	include( JPATH_SITE.DS.'components'.DS.'com_pygalle'.DS.'utilities'.DS.'import.php');
	pyimport( 'log');
	$_log = PyLog::getInstance();

	// delete installer after reading - just like mission impossible
	// a new installer file would not be copied by the installer routine if the old was present!
	JFile::delete( JPATH_ADMINISTRATOR.DS.'components'.DS.'com_pygalle'.DS.'install.pygalle.php');
	// First make sure that this version of Joomla is 1.5 or greater
	$version = new JVersion();
	if ( (real)$version->RELEASE < 1.5 ) {
		echo "<h1 style=\"color: red;\">The 'Pygalle EVE Corporate Intranet' package will only work on Joomla version 1.5 or later!</h1>";
		return false;

	pyimport( 'install');
	if ( PygalleInstaller::isVersion('0.3')) {
	/* this is code to call unified item DB restructuring method
	if ( PygalleInstaller::isVersion('0.3')) {
	$pluginStatus = PygalleInstaller::checkPlugin();
	$_log->trace( $pluginStatus);
	<div class="header">Pygalle EVE corporate intranet component succesfully installed! <br>

	if ( $pluginStatus['installed'] ) {
		if ( !$pluginStatus['published'] ) {
			echo "<i>Don&rsquo;t forget to enable the Pygalle plugin!</i>";
	} else {
		echo "<i>Don&rsquo;t forget to install the Pygalle plugin, too, and enable it!</i>";

	Please report bugs and suggestions to <a href="mailto:erik.finnegan'at'pygalle.net">erik.finnegan 'at' pygalle.net</a>.

	return true;
Return current item: Pygalle