Update on v3.0.0 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
This commit is contained in:
parent
972343a4eb
commit
79bcbde0d0
35
script.php
35
script.php
@ -24,39 +24,4 @@ use Joomla\CMS\Filesystem\Folder;
|
|||||||
*/
|
*/
|
||||||
class plgContentComponentbuilderCustomAdminHeadersTabsInstallerScript
|
class plgContentComponentbuilderCustomAdminHeadersTabsInstallerScript
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
|
||||||
* Called before any type of action
|
|
||||||
*
|
|
||||||
* @param string $route Which action is happening (install|uninstall|discover_install|update)
|
|
||||||
* @param Joomla\CMS\Installer\InstallerAdapter $adapter The object responsible for running this script
|
|
||||||
*
|
|
||||||
* @return boolean True on success
|
|
||||||
*/
|
|
||||||
public function preflight($route, $adapter)
|
|
||||||
{
|
|
||||||
// get application
|
|
||||||
$app = Factory::getApplication();
|
|
||||||
|
|
||||||
// the default for both install and update
|
|
||||||
$jversion = new JVersion();
|
|
||||||
if (!$jversion->isCompatible('3.8.0'))
|
|
||||||
{
|
|
||||||
$app->enqueueMessage('Please upgrade to at least Joomla! 3.8.0 before continuing!', 'error');
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ('install' === $route)
|
|
||||||
{
|
|
||||||
// check that componentbuilder is installed
|
|
||||||
$pathToCore = JPATH_ADMINISTRATOR . '/components/com_componentbuilder/helpers/componentbuilder.php';
|
|
||||||
if (!JFile::exists($pathToCore))
|
|
||||||
{
|
|
||||||
$app->enqueueMessage('Joomla Component Builder must first be installed from <a href="https://www.joomlacomponentbuilder.com/ " target="_blank">Joomla Component Builder</a>.', 'error');
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user