Skip to content

Commit 59c8897

Browse files
author
Michael Babker
committed
Only check once if in production
1 parent 26f8aa9 commit 59c8897

File tree

1 file changed

+7
-7
lines changed
  • administrator/components/com_patchtester/PatchTester/Model

1 file changed

+7
-7
lines changed

administrator/components/com_patchtester/PatchTester/Model/PullModel.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88

99
namespace PatchTester\Model;
1010

11-
use Joomla\Registry\Registry;
12-
1311
use PatchTester\GitHub\Exception\UnexpectedResponse;
1412
use PatchTester\Helper;
1513

@@ -74,13 +72,15 @@ protected function parseFileList($files)
7472
{
7573
$parsedFiles = array();
7674

75+
/*
76+
* Check if the patch tester is running in a development environment
77+
* If we are not in development, we'll need to check the exclusion lists
78+
*/
79+
$isDev = file_exists(JPATH_INSTALLATION . '/index.php');
80+
7781
foreach ($files as $file)
7882
{
79-
/*
80-
* Check if the patch tester is running in a production environment
81-
* If so, do not patch certain files as errors will be thrown
82-
*/
83-
if (!file_exists(JPATH_ROOT . '/installation/index.php'))
83+
if (!$isDev)
8484
{
8585
$filePath = explode('/', $file->filename);
8686

0 commit comments

Comments
 (0)