X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Finstall-functions.php;h=9e794c2ccd60b2b3b5c5c597fa5c4211881c312a;hp=3803f72be757f59672a0aefcb638be852d1de4dd;hb=cf3765c38cf0a76f396aca291f71858936e92956;hpb=57227d33e870ec5cd271209c4a978a52b45c2dd6 diff --git a/inc/install-functions.php b/inc/install-functions.php index 3803f72be7..9e794c2ccd 100644 --- a/inc/install-functions.php +++ b/inc/install-functions.php @@ -18,6 +18,7 @@ * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * + * Copyright (c) 2009, 2010 by Mailer Developer Team * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -101,5 +102,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] ?>