mirror of
https://github.com/joomla-extensions/patchtester.git
synced 2025-01-10 17:24:39 +00:00
Remove Joomla 4 check as this only runs on Joomla 4 Fixes #232
This commit is contained in:
parent
96fe1e3143
commit
702712a62e
@ -89,7 +89,7 @@ class PullModel extends AbstractModel
|
||||
$params = ComponentHelper::getParams('com_patchtester');
|
||||
|
||||
// Decide based on repository settings whether patch will be applied through Github or CIServer
|
||||
if (version_compare(JVERSION, '4', 'ge') && (bool) $params->get('ci_switch', 1))
|
||||
if ((bool) $params->get('ci_switch', 1))
|
||||
{
|
||||
return $this->applyWithCIServer($id);
|
||||
}
|
||||
@ -266,7 +266,7 @@ class PullModel extends AbstractModel
|
||||
$this->appendPatchChain($lastInserted, $id);
|
||||
|
||||
// On Joomla 4 or later, remove the autoloader file
|
||||
if (version_compare(JVERSION, '4', 'ge') && file_exists(JPATH_LIBRARIES . '/autoload_psr4.php'))
|
||||
if (file_exists(JPATH_LIBRARIES . '/autoload_psr4.php'))
|
||||
{
|
||||
File::delete(JPATH_LIBRARIES . '/autoload_psr4.php');
|
||||
}
|
||||
@ -591,7 +591,7 @@ class PullModel extends AbstractModel
|
||||
$this->saveAppliedPatch($pull->number, $parsedFiles, $pull->head->sha);
|
||||
|
||||
// On Joomla 4 or later, remove the autoloader file
|
||||
if (version_compare(JVERSION, '4', 'ge') && file_exists(JPATH_LIBRARIES . '/autoload_psr4.php'))
|
||||
if (file_exists(JPATH_LIBRARIES . '/autoload_psr4.php'))
|
||||
{
|
||||
File::delete(JPATH_LIBRARIES . '/autoload_psr4.php');
|
||||
}
|
||||
@ -689,9 +689,7 @@ class PullModel extends AbstractModel
|
||||
$params = ComponentHelper::getParams('com_patchtester');
|
||||
|
||||
// Decide based on repository settings whether patch will be applied through Github or CIServer
|
||||
if (version_compare(JVERSION, '4', 'ge') && ((bool) $params->get('ci_switch', 1)
|
||||
|| $id === $this->getPatchChain($id)->insert_id)
|
||||
)
|
||||
if (((bool) $params->get('ci_switch', 1) || $id === $this->getPatchChain($id)->insert_id))
|
||||
{
|
||||
return $this->revertWithCIServer($id);
|
||||
}
|
||||
@ -832,8 +830,8 @@ class PullModel extends AbstractModel
|
||||
|
||||
Folder::delete($backupsPath);
|
||||
|
||||
// On Joomla 4 or later, remove the autoloader file
|
||||
if (version_compare(JVERSION, '4', 'ge') && file_exists(JPATH_LIBRARIES . '/autoload_psr4.php'))
|
||||
// Remove the autoloader file
|
||||
if (file_exists(JPATH_LIBRARIES . '/autoload_psr4.php'))
|
||||
{
|
||||
File::delete(JPATH_LIBRARIES . '/autoload_psr4.php');
|
||||
}
|
||||
@ -1029,8 +1027,8 @@ class PullModel extends AbstractModel
|
||||
}
|
||||
}
|
||||
|
||||
// On Joomla 4 or later, remove the autoloader file
|
||||
if (version_compare(JVERSION, '4', 'ge') && file_exists(JPATH_LIBRARIES . '/autoload_psr4.php'))
|
||||
// Remove the autoloader file
|
||||
if (file_exists(JPATH_LIBRARIES . '/autoload_psr4.php'))
|
||||
{
|
||||
File::delete(JPATH_LIBRARIES . '/autoload_psr4.php');
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user