mirror of
https://github.com/joomla-extensions/jedchecker.git
synced 2024-11-27 23:36:38 +00:00
e148a221c4
Removes the SplFileInfo::getExtension call in favour of a method that can use a lesser version of PHP. Changed the preflight PHP version check to 5.3.1 (same minimum as the Joomla Platform).
39 lines
1.3 KiB
PHP
39 lines
1.3 KiB
PHP
<?php
|
|
/**
|
|
* @author Daniel Dimitrov - compojoom.com
|
|
* @date: 02.06.12
|
|
*
|
|
* @copyright Copyright (C) 2008 - 2012 compojoom.com . All rights reserved.
|
|
* @license GNU General Public License version 2 or later; see LICENSE
|
|
*/
|
|
|
|
defined('_JEXEC') or die('Restricted access');
|
|
|
|
|
|
class com_jedcheckerInstallerScript
|
|
{
|
|
protected $extension = 'com_jedchecker';
|
|
|
|
function preflight( $type, $parent ) {
|
|
$this->parent = $parent;
|
|
if (version_compare(PHP_VERSION, '5.3.1', '<')) {
|
|
$this->loadLanguage();
|
|
Jerror::raiseWarning(null, JText::sprintf('COM_JEDCHECKER_PHP_VERSION_INCOMPATIBLE', PHP_VERSION, '5.3.6'));
|
|
return false;
|
|
}
|
|
}
|
|
|
|
|
|
public function loadLanguage()
|
|
{
|
|
$extension = $this->extension;
|
|
$jlang =& JFactory::getLanguage();
|
|
$path = $this->parent->getParent()->getPath('source') . '/administrator';
|
|
$jlang->load($extension, $path, 'en-GB', true);
|
|
$jlang->load($extension, $path, $jlang->getDefault(), true);
|
|
$jlang->load($extension, $path, null, true);
|
|
$jlang->load($extension . '.sys', $path, 'en-GB', true);
|
|
$jlang->load($extension . '.sys', $path, $jlang->getDefault(), true);
|
|
$jlang->load($extension . '.sys', $path, null, true);
|
|
}
|
|
} |