mirror of
https://github.com/joomla-extensions/patchtester.git
synced 2025-01-26 16:48:29 +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');
|
$params = ComponentHelper::getParams('com_patchtester');
|
||||||
|
|
||||||
// Decide based on repository settings whether patch will be applied through Github or CIServer
|
// 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);
|
return $this->applyWithCIServer($id);
|
||||||
}
|
}
|
||||||
@ -266,7 +266,7 @@ class PullModel extends AbstractModel
|
|||||||
$this->appendPatchChain($lastInserted, $id);
|
$this->appendPatchChain($lastInserted, $id);
|
||||||
|
|
||||||
// On Joomla 4 or later, remove the autoloader file
|
// 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');
|
File::delete(JPATH_LIBRARIES . '/autoload_psr4.php');
|
||||||
}
|
}
|
||||||
@ -591,7 +591,7 @@ class PullModel extends AbstractModel
|
|||||||
$this->saveAppliedPatch($pull->number, $parsedFiles, $pull->head->sha);
|
$this->saveAppliedPatch($pull->number, $parsedFiles, $pull->head->sha);
|
||||||
|
|
||||||
// On Joomla 4 or later, remove the autoloader file
|
// 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');
|
File::delete(JPATH_LIBRARIES . '/autoload_psr4.php');
|
||||||
}
|
}
|
||||||
@ -689,9 +689,7 @@ class PullModel extends AbstractModel
|
|||||||
$params = ComponentHelper::getParams('com_patchtester');
|
$params = ComponentHelper::getParams('com_patchtester');
|
||||||
|
|
||||||
// Decide based on repository settings whether patch will be applied through Github or CIServer
|
// 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) || $id === $this->getPatchChain($id)->insert_id))
|
||||||
|| $id === $this->getPatchChain($id)->insert_id)
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
return $this->revertWithCIServer($id);
|
return $this->revertWithCIServer($id);
|
||||||
}
|
}
|
||||||
@ -832,8 +830,8 @@ class PullModel extends AbstractModel
|
|||||||
|
|
||||||
Folder::delete($backupsPath);
|
Folder::delete($backupsPath);
|
||||||
|
|
||||||
// On Joomla 4 or later, remove the autoloader file
|
// 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');
|
File::delete(JPATH_LIBRARIES . '/autoload_psr4.php');
|
||||||
}
|
}
|
||||||
@ -1029,8 +1027,8 @@ class PullModel extends AbstractModel
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// On Joomla 4 or later, remove the autoloader file
|
// 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');
|
File::delete(JPATH_LIBRARIES . '/autoload_psr4.php');
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user