mirror of
https://github.com/joomla-extensions/jedchecker.git
synced 2024-11-23 21:27:35 +00:00
adding installation check for php version
This commit is contained in:
parent
0871349cbb
commit
b11194520c
@ -10,6 +10,7 @@
|
|||||||
<license>http://www.gnu.org/copyleft/gpl.html GNU/GPL</license>
|
<license>http://www.gnu.org/copyleft/gpl.html GNU/GPL</license>
|
||||||
<description><![CDATA[Jedchecker will check your extension files and will let you know in advance if there are any possible problems with your extension for submitting to the JED]]>
|
<description><![CDATA[Jedchecker will check your extension files and will let you know in advance if there are any possible problems with your extension for submitting to the JED]]>
|
||||||
</description>
|
</description>
|
||||||
|
<scriptfile>script.php</scriptfile>
|
||||||
<administration>
|
<administration>
|
||||||
<menu>COM_@@COMPONENTNAMEUPPERCASE@@</menu>
|
<menu>COM_@@COMPONENTNAMEUPPERCASE@@</menu>
|
||||||
<files folder="administrator/components/com_@@COMPONENTNAME@@">
|
<files folder="administrator/components/com_@@COMPONENTNAME@@">
|
||||||
|
@ -7,4 +7,33 @@
|
|||||||
* @license GNU General Public License version 2 or later; see LICENSE
|
* @license GNU General Public License version 2 or later; see LICENSE
|
||||||
*/
|
*/
|
||||||
|
|
||||||
defined('_JEXEC') or die('Restricted access');
|
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.5.6', '<')) {
|
||||||
|
$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);
|
||||||
|
}
|
||||||
|
}
|
@ -24,5 +24,4 @@ COM_JEDCHECKER_RULE_PH3="Rule PH3 - License tag missing or incorrect in XML inst
|
|||||||
COM_JEDCHECKER_RULE_PH3_DESC="An install file should include the license information in a license-tag. The license must be GPL or GPL compatible."
|
COM_JEDCHECKER_RULE_PH3_DESC="An install file should include the license information in a license-tag. The license must be GPL or GPL compatible."
|
||||||
COM_JEDCHECKER_EVERYTHING_SEEMS_TO_BE_FINE_WITH_THAT_RULE="Congrats! Everything seems to be fine with that rule!"
|
COM_JEDCHECKER_EVERYTHING_SEEMS_TO_BE_FINE_WITH_THAT_RULE="Congrats! Everything seems to be fine with that rule!"
|
||||||
COM_JEDCHECKER_DEVELOPED_BY="JEDchecker is primary developed by <a href='%s'>compojoom.com</a>"
|
COM_JEDCHECKER_DEVELOPED_BY="JEDchecker is primary developed by <a href='%s'>compojoom.com</a>"
|
||||||
|
COM_JEDCHECKER_PHP_VERSION_INCOMPATIBLE="JEDchecker is incompatible with the PHP version that you run on this site: %s. You would need at least PHP Version %s. Aborting installation"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user