Incorrect date label in restore
When restoring a bakup i'm presented with a list of possible backups i can choose. These bakups are labbeled by there date. However after FTP'ing an update file the modification date is changed. On inspection i found that the date for this label is created in Backupmodx.class.php on #208. Here the modification time of the containing folder (filemtime($this->targetPath . $folder)) is used to create the label. This should be done based on the NAME of the folder not the modification date of the folder
i corrected this by adding an explode on the folder name:
$labeldate = date_create_from_format( 'Y-m-d His', $labels[0] . ' ' . $labels[1] );
$date_format = date_format( $labeldate, 'F d Y - H:i a' );
$backups[] = array(
'name' => $folder,
'path' => $this->targetPath,
'date' => filemtime( $this->targetPath . $folder ),
'date_format' => $date_format,
'note' => $note,
'files' => $files,
);
This has to be changed in this code part now: https://github.com/jdaehne/BackupMODX/blob/master/core/components/backupmodx/src/BackupMODX.php#L193-L202