Explorar o código

Better human compatibility in content files

Zachary Kotlarek %!s(int64=12) %!d(string=hai) anos
pai
achega
7fe0d7bf9e
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      web/includes/series.php

+ 2 - 1
web/includes/series.php

@@ -193,8 +193,9 @@ function saveFlags($series, $data, $series_last, $seasons_last) {
 	# Content files
 	foreach ($CONTENT_FILES as $file) {
 		$path = $series_path . '/' . $file;
+		$data[ $file ] = trim($data[ $file ]);
 		if ($data[ $file ]) {
-			file_put_contents($path, $data[ $file ]);
+			file_put_contents($path, $data[ $file ] . "\n");
 		} else {
 			if (file_exists($path)) {
 				unlink($path);