From 5c6b2786285eeae19506ab9c890f4fbe58654bb6 Mon Sep 17 00:00:00 2001 From: Roland Dalmulder Date: Sat, 4 Apr 2020 14:04:47 +0200 Subject: [PATCH] Fixed path checking on Windows #262 Turn off CI server by default Changed CI server port Removed left over from patch chain Signed-off-by: Roland Dalmulder --- .../com_patchtester/PatchTester/Model/PullModel.php | 6 ++++-- administrator/components/com_patchtester/config.xml | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/administrator/components/com_patchtester/PatchTester/Model/PullModel.php b/administrator/components/com_patchtester/PatchTester/Model/PullModel.php index 8981084..8959986 100644 --- a/administrator/components/com_patchtester/PatchTester/Model/PullModel.php +++ b/administrator/components/com_patchtester/PatchTester/Model/PullModel.php @@ -426,6 +426,8 @@ class PullModel extends AbstractModel */ private function checkFilesExist(array $files, string $path): bool { + $path = Path::clean($path); + foreach ($files as $file) { if (is_array($file)) @@ -700,7 +702,7 @@ class PullModel extends AbstractModel * * @since 3.0.0 */ - protected function parseFileList(stdClass $files): array + private function parseFileList(array $files): array { $parsedFiles = array(); @@ -777,7 +779,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 ((bool) $params->get('ci_switch', 1)) { return $this->revertWithCIServer($id); } diff --git a/administrator/components/com_patchtester/config.xml b/administrator/components/com_patchtester/config.xml index cc100bb..b5fa64c 100644 --- a/administrator/components/com_patchtester/config.xml +++ b/administrator/components/com_patchtester/config.xml @@ -106,7 +106,7 @@ label="COM_PATCHTESTER_FIELD_CI_SERVER_NAME" description="COM_PATCHTESTER_FIELD_CI_SERVER_NAME_DESC" autocomplete="off" - default="https://ci.joomla.org:444" + default="https://ci.joomla.org" />