X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Finstall-functions.php;h=525b8ae292fb6fea4ebde293fea24fd0e9193358;hb=7d92d2652807c247558a1bcbd7dcd6574bd4645d;hp=3803f72be757f59672a0aefcb638be852d1de4dd;hpb=0fe94791af05018868398d3c6c87d2b16f9557a2;p=mailer.git diff --git a/inc/install-functions.php b/inc/install-functions.php index 3803f72be7..525b8ae292 100644 --- a/inc/install-functions.php +++ b/inc/install-functions.php @@ -101,5 +101,24 @@ function addToInstallContent ($out) { } // END - if } +// Read a given SQL dump +function readSqlDump ($FQFN) { + // Sanity-check if file is there (should be there, but just to make it sure) + if (!isFileReadable($FQFN)) { + // This should not happen + debug_report_bug(__FUNCTION__.': File ' . basename($FQFN) . ' is not readable!'); + } // END - if + + // Load the file + $content = readFromFile($FQFN); + + // Remove some unwanted chars + $content = str_replace("\r", '', $content); + $content = str_replace("\n\n", "\n", $content); + + // Return the content + return $content; +} + // [EOF] ?>