PageRenderTime 40ms CodeModel.GetById 17ms RepoModel.GetById 0ms app.codeStats 0ms

/redirect/code/trunk/administrator/components/com_redirect/install/install.php

https://bitbucket.org/eddieajau/the-art-of-joomla-archive
PHP | 49 lines | 24 code | 9 blank | 16 comment | 3 complexity | d9836a06edbda2dee6d527caceb6fae2 MD5 | raw file
  1. <?php
  2. /**
  3. * @version $Id: install.php 390 2010-11-05 11:35:33Z eddieajau $
  4. * @package NewLifeInIT
  5. * @subpackage com_redirect
  6. * @copyright Copyright 2005 - 2010 New Life in IT Pty Ltd. All rights reserved.
  7. * @license GNU General Public License <http://www.gnu.org/copyleft/gpl.html>
  8. * @link http://www.theartofjoomla.com
  9. */
  10. defined('_JEXEC') or die('Invalid Request.');
  11. // Load the component language file
  12. $language = JFactory::getLanguage();
  13. $language->load('com_redirect');
  14. // PHP 5 check
  15. if (version_compare(PHP_VERSION, '5.2.4', '<')) {
  16. $this->parent->abort(JText::_('J_USE_PHP5'));
  17. return false;
  18. }
  19. // Include dependancies.
  20. require_once dirname(__FILE__).'/helper.php';
  21. require_once dirname(dirname(__FILE__)).'/version.php';
  22. // Install the modules.
  23. $modules = PackageInstallerHelper::installModules($this);
  24. if ($modules === false) {
  25. return false;
  26. }
  27. // Install the plugins.
  28. $plugins = PackageInstallerHelper::installPlugins($this);
  29. if ($plugins === false) {
  30. return false;
  31. }
  32. // Fix the link bug.
  33. PackageInstallerHelper::fixLink('com_redirect');
  34. // Perform upgrades.
  35. // Display the results.
  36. PackageInstallerHelper::displayInstalled(
  37. $modules,
  38. $plugins,
  39. JText::sprintf('COM_REDIRECT_INSTALLED', RedirectVersion::VERSION.'.'.RedirectVersion::SUBVERSION.' '.RedirectVersion::STATUS)
  40. );