Stop creating unnecessary log file in Nextcloud base folder

EpisodeActionReader created (or appended to) file actionreader.log in Nextcloud base folder (with index.php & occ). This concluded in a Nextcloud warning about "additional files in Nextcloud folder" in the self-check feature.
This commit is contained in:
Jonathan Flueren 2021-08-16 14:20:21 +02:00
parent 9ac7758e87
commit 20920c5d84
1 changed files with 0 additions and 3 deletions

View File

@ -5,15 +5,12 @@ namespace OCA\GPodderSync\Core\EpisodeAction;
class EpisodeActionReader { class EpisodeActionReader {
public function fromString(string $episodeActionString): EpisodeAction { public function fromString(string $episodeActionString): EpisodeAction {
file_put_contents('actionreader.log', var_export($episodeActionString, true), FILE_APPEND);
preg_match( preg_match(
'/\[EpisodeAction{(podcast=\')(?<podcast>.*?)(\', episode=\')(?<episode>.*?)(\', action=)(?<action>.*?)(, timestamp=)(?<timestamp>.*?)(, started=)(?<started>.*?)(, position=)(?<position>.*?)(, total=)(?<total>.*?)}]*/', '/\[EpisodeAction{(podcast=\')(?<podcast>.*?)(\', episode=\')(?<episode>.*?)(\', action=)(?<action>.*?)(, timestamp=)(?<timestamp>.*?)(, started=)(?<started>.*?)(, position=)(?<position>.*?)(, total=)(?<total>.*?)}]*/',
$episodeActionString, $episodeActionString,
$matches $matches
); );
file_put_contents('actionreader.log', var_export($matches, true), FILE_APPEND);
return new EpisodeAction( return new EpisodeAction(
$matches["podcast"], $matches["podcast"],
$matches["episode"], $matches["episode"],