X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Finstall-inc.php;h=83571f7071a58847cf8cd188152fa28142a5db2c;hb=d51f5ef507bcec57c8bc26e444a99db81b5ca040;hp=51d2fa1a2b3b171b9ef720550fe7704cc69e3667;hpb=57227d33e870ec5cd271209c4a978a52b45c2dd6;p=mailer.git diff --git a/inc/install-inc.php b/inc/install-inc.php index 51d2fa1a2b..83571f7071 100644 --- a/inc/install-inc.php +++ b/inc/install-inc.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 * @@ -99,7 +100,7 @@ if ((!isInstalled()) || (!isAdminRegistered())) { if (empty($mysql['host'])) $mysql['host'] = 'localhost'; if (empty($mysql['prefix'])) $mysql['prefix'] = 'mxchange'; if (empty($mysql['type'])) $mysql['type'] = 'MyISAM'; - if (getTotalFatalErrors() > 0) { + if (ifFatalErrorsDetected()) { addToInstallContent('
'); foreach (getFatalArray() as $key => $err) { addToInstallContent('
· {--FATAL_NO--}' . ($key + 1) . ': ' . $err . '
'); @@ -202,7 +203,7 @@ if ((!isInstalled()) || (!isAdminRegistered())) { addFatalMessage(__FILE__, __LINE__, getMessage('INSTALL_MISSING_DUMPS')); } // END - if - if (getTotalFatalErrors() == '0') { + if (!ifFatalErrorsDetected()) { // Set type and prefix from POST data setConfigEntry('_TABLE_TYPE' , postRequestParameter('mysql', 'type')); setConfigEntry('_MYSQL_PREFIX', postRequestParameter('mysql', 'prefix')); @@ -215,7 +216,7 @@ if ((!isInstalled()) || (!isAdminRegistered())) { // Is the file readable? if (isFileReadable($FQFN)) { // Read the file - $fileContent = readFromFile($FQFN, true); + $fileContent = readSqlDump($FQFN); // Split it up against ";\n" and merge it into existing SQLs mergeSqls(explode(";\n", $fileContent), 'install'); @@ -227,7 +228,7 @@ if ((!isInstalled()) || (!isAdminRegistered())) { //* DEBUG: */ die('
'.print_r(getSqls(), true).'
'); // Are some SQLs found? - if (countSqls() == '0') { + if (countSqls() == 0) { // Abort here addFatalMessage(__FILE__, __LINE__, getMessage('INSTALL_SQL_IMPORT_FAILED')); return; @@ -242,7 +243,7 @@ if ((!isInstalled()) || (!isAdminRegistered())) { } // END - if } // END - if - if (getTotalFatalErrors() > 0) { + if (ifFatalErrorsDetected()) { $OUT = ''; foreach (getFatalArray() as $value) { $OUT .= '
  • ' . $value . '
  • ';