Skip to content
This repository was archived by the owner on Aug 10, 2022. It is now read-only.

Commit ecfc983

Browse files
author
Michael Babker
committed
Fix preflight check
1 parent 7427fae commit ecfc983

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

plugins/installer/webinstaller/webinstaller.script.php

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -136,15 +136,17 @@ class plginstallerwebinstallerInstallerScript extends JInstallerScript
136136
*/
137137
public function preflight($type, $parent)
138138
{
139-
if (parent::preflight($type, $parent))
139+
if (!parent::preflight($type, $parent))
140140
{
141-
// Disallow installs on 4.0 as the plugin is part of core
142-
if (version_compare(JVERSION, '4.0', '>='))
143-
{
144-
JLog::add(JText::_('PLG_INSTALLER_WEBINSTALLER_ERROR_PLUGIN_INCLUDED_IN_CORE'), JLog::WARNING, 'jerror');
141+
return false;
142+
}
145143

146-
return false;
147-
}
144+
// Disallow installs on 4.0 as the plugin is part of core
145+
if (version_compare(JVERSION, '4.0', '>='))
146+
{
147+
JLog::add(JText::_('PLG_INSTALLER_WEBINSTALLER_ERROR_PLUGIN_INCLUDED_IN_CORE'), JLog::WARNING, 'jerror');
148+
149+
return false;
148150
}
149151

150152
return true;

0 commit comments

Comments
 (0)