mirror of
https://github.com/joomla-extensions/patchtester.git
synced 2025-01-03 07:12:36 +00:00
Last codestyle I hope
Signed-off-by: Roland Dalmulder <contact@rolandd.com>
This commit is contained in:
parent
d167f62f73
commit
13d174d1b8
@ -569,7 +569,8 @@ class PullModel extends BaseDatabaseModel
|
|||||||
|
|
||||||
if (
|
if (
|
||||||
$file->action === 'modified'
|
$file->action === 'modified'
|
||||||
&& !file_exists(JPATH_ROOT . '/' . $file->filename)) {
|
&& !file_exists(JPATH_ROOT . '/' . $file->filename)
|
||||||
|
) {
|
||||||
throw new RuntimeException(
|
throw new RuntimeException(
|
||||||
Text::sprintf(
|
Text::sprintf(
|
||||||
'COM_PATCHTESTER_FILE_MODIFIED_DOES_NOT_EXIST_S',
|
'COM_PATCHTESTER_FILE_MODIFIED_DOES_NOT_EXIST_S',
|
||||||
@ -881,9 +882,7 @@ class PullModel extends BaseDatabaseModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
// If folder is empty, remove it as well
|
// If folder is empty, remove it as well
|
||||||
if (count(glob(JPATH_ROOT . '/' . $filePath . '/*'))
|
if (count(glob(JPATH_ROOT . '/' . $filePath . '/*')) === 0) {
|
||||||
=== 0
|
|
||||||
) {
|
|
||||||
Folder::delete(JPATH_ROOT . '/' . $filePath);
|
Folder::delete(JPATH_ROOT . '/' . $filePath);
|
||||||
}
|
}
|
||||||
} elseif (file_exists($backupsPath . '/' . $file)) {
|
} elseif (file_exists($backupsPath . '/' . $file)) {
|
||||||
@ -1042,11 +1041,10 @@ class PullModel extends BaseDatabaseModel
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
case 'renamed':
|
case 'renamed':
|
||||||
$originalSrc = JPATH_COMPONENT . '/backups/' . md5(
|
$originalSrc = JPATH_COMPONENT . '/backups/' . md5($file->originalFile) . '.txt';
|
||||||
$file->originalFile
|
|
||||||
) . '.txt';
|
|
||||||
$newSrc = JPATH_ROOT . '/' . $file->filename;
|
$newSrc = JPATH_ROOT . '/' . $file->filename;
|
||||||
$dest = JPATH_ROOT . '/' . $file->originalFile;
|
$dest = JPATH_ROOT . '/' . $file->originalFile;
|
||||||
|
|
||||||
if (!File::copy($originalSrc, $dest)) {
|
if (!File::copy($originalSrc, $dest)) {
|
||||||
throw new RuntimeException(
|
throw new RuntimeException(
|
||||||
Text::sprintf(
|
Text::sprintf(
|
||||||
|
Loading…
Reference in New Issue
Block a user