mirror of
https://github.com/joomla-extensions/patchtester.git
synced 2025-01-23 23:28:24 +00:00
Added an additional condition to ignore the "apply by ci path" automatically if j3 is used. Fixed a bug where patches could be applied by the old patcher even if there are no files to patch, because they got ignored during parsing.
This commit is contained in:
parent
e7bf31b20e
commit
81f76e4251
@ -156,7 +156,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 ((bool) $params->get('ci_switch', 1))
|
||||
if (version_compare(JVERSION, "4", "ge") && (bool) $params->get('ci_switch', 1))
|
||||
{
|
||||
return $this->applyWithCIServer($id);
|
||||
}
|
||||
@ -366,6 +366,11 @@ class PullModel extends AbstractModel
|
||||
|
||||
$parsedFiles = $this->parseFileList($files);
|
||||
|
||||
if (!count($parsedFiles))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
foreach ($parsedFiles as $file)
|
||||
{
|
||||
switch ($file->action)
|
||||
@ -585,7 +590,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 ((bool) $params->get('ci_switch', 1) || $id === $this->getPatchChain($id)->insert_id)
|
||||
if (version_compare(JVERSION, "4", "ge") && ((bool) $params->get('ci_switch', 1) || $id === $this->getPatchChain($id)->insert_id))
|
||||
{
|
||||
return $this->revertWithCIServer($id);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user