Mercurial > hg > fapweb
comparison faptool.php @ 1063:85e268f6a822
Cleanup.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Wed, 14 Sep 2016 12:42:03 +0300 |
parents | e706cbcaf566 |
children | 76e11ae923a7 |
comparison
equal
deleted
inserted
replaced
1061:7298b2898a6d | 1063:85e268f6a822 |
---|---|
532 foreach (preg_split("/\r\n|\n|\r/", $entry["notes"]) as $sline) | 532 foreach (preg_split("/\r\n|\n|\r/", $entry["notes"]) as $sline) |
533 $sbinfo[] = $sline; | 533 $sbinfo[] = $sline; |
534 } | 534 } |
535 | 535 |
536 $sbinfo[] = ""; | 536 $sbinfo[] = ""; |
537 | 537 $sbinfoStr = implode("\n", $sbinfo); |
538 | 538 |
539 // Create the destination directory | 539 // Create the destination directory |
540 if (wtMakeDir(stMakePath(FALSE, FALSE, array($pathPrefix, $compo["cpath"])), 0755) === false) | 540 if (wtMakeDir(stMakePath(FALSE, FALSE, array($pathPrefix, $compo["cpath"])), 0755) === false) |
541 return FALSE; | 541 return FALSE; |
542 | 542 |
583 return FALSE; | 583 return FALSE; |
584 } | 584 } |
585 } | 585 } |
586 | 586 |
587 $dstFilename = stMakePath(FALSE, FALSE, array($dstPath, "fapinfo.txt")); | 587 $dstFilename = stMakePath(FALSE, FALSE, array($dstPath, "fapinfo.txt")); |
588 if (@file_put_contents($dstFilename, implode("\r\n", $sbinfo)) === FALSE) | 588 if (@file_put_contents($dstFilename, $sbinfoStr) === FALSE) |
589 { | 589 { |
590 echo "ERROR: Failed to output '".$dstFilename."'\n"; | 590 echo "ERROR: Failed to output '".$dstFilename."'\n"; |
591 return FALSE; | 591 return FALSE; |
592 } | 592 } |
593 | 593 |