33
0
mirror of https://github.com/joomla-extensions/patchtester.git synced 2024-11-15 17:47:10 +00:00

fix issues

This commit is contained in:
zero-24 2016-07-30 22:12:36 +02:00
parent e72b6501d1
commit e93bb384e8

View File

@ -94,19 +94,20 @@ class PullModel extends \JModelDatabase
}
}
// Remove the `src` here to match the CMS paths if needed
$repofilename = $file->filename;
// Sometimes the repo filename is not the production file name
$prodfilename = $file->filename;
$filePath = explode('/', $repofilename);
// Remove the `src` here to match the CMS paths if needed
if ($filePath[0] === 'src')
{
$repofilename = str_replace('src/', '', $file->filename);
$prodfilename = str_replace('src/', '', $file->filename);
}
$parsedFiles[] = (object) array(
'action' => $file->status,
'filename' => $file->filename,
'repofilename' => $repofilename,
'filename' => $prodfilename,
'repofilename' => $file->filename,
'fileurl' => $file->contents_url,
);
}