]> git.mxchange.org Git - mailer.git/blobdiff - inc/install-inc.php
Several double->single convertions, fix for missing constant '_MYSQL_PREFIX' which...
[mailer.git] / inc / install-inc.php
index 9d68191e9ef1de86caa3a3931a935162339fd058..55cb320c4462674125d62d148035004df3fb5e3b 100644 (file)
@@ -315,33 +315,33 @@ if ((!isInstalled()) || (!isAdminRegistered())) {
                                                        copyFileVerified(REQUEST_POST('spath') . 'inc/config-local.php.dist', REQUEST_POST('spath') . 'inc/cache/config-local.php', 0644);
 
                                                        // Ok, all done. So we can write the config data to the php files
-                                                       if (REQUEST_POST('spath') != constant('PATH')) changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', "SERVER-PATH", "define('PATH', \"", "\");", REQUEST_POST('spath'), 0);
-                                                       if (REQUEST_POST('burl')  != constant('URL'))  changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', "HOST-URL", "define('URL', \"", "\");", REQUEST_POST('burl'), 0);
-                                                       changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', "MAIN-TITLE", "define('MAIN_TITLE', \"", "\");", REQUEST_POST('title'), 0);
-                                                       changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', "SLOGAN", "define('SLOGAN', \"", "\");", REQUEST_POST('slogan'), 0);
-                                                       changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', "WEBMASTER", "define('WEBMASTER', \"", "\");", REQUEST_POST('email'), 0);
-                                                       changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', "NULLPASS-WARNING", "setConfigEntry('WARN_NO_PASS', \"", "\");", REQUEST_POST('warn_no_pass'), 0);
-                                                       changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', "WRITE-FOOTER", "setConfigEntry('WRITE_FOOTER', \"", "\");", REQUEST_POST('wfooter'), 0);
-                                                       changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', "BACKLINK", "setConfigEntry('ENABLE_BACKLINK', \"", "\");", REQUEST_POST('blink'), 0);
-                                                       // DEACTIVATED: changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', "OUTPUT-MODE", "define('OUTPUT_MODE', \"", "\");", REQUEST_POST('omode'), 0);
-                                                       changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', "MYSQL-HOST", "  'host'     => \"", "\",", $mysql['host'], 0);
-                                                       changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', "MYSQL-DBASE", " 'dbase'    => \"", "\",", $mysql['dbase'], 0);
-                                                       changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', "MYSQL-LOGIN", " 'login'    => \"", "\",", $mysql['login'], 0);
-                                                       changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', "MYSQL-PASSWORD", "      'password' => \"", "\",", $mysql['pass1'], 0);
-                                                       changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', "MYSQL-PREFIX", "setConfigEntry('_MYSQL_PREFIX', \"", "\");", $mysql['prefix'], 0);
-                                                       changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', "TABLE-TYPE", "setConfigEntry('_TABLE_TYPE', \"", "\");", $mysql['type'], 0);
-                                                       changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', "SMTP-HOSTNAME", "setConfigEntry('SMTP_HOSTNAME', \"", "\");", REQUEST_POST('smtp_host'), 0);
-                                                       changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', "SMTP-USER", "setConfigEntry('SMTP_USER', \"", "\");", REQUEST_POST('smtp_user'), 0);
-                                                       changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', "SMTP-PASSWORD", "setConfigEntry('SMTP_PASSWORD', \"", "\");", REQUEST_POST('smtp_pass1'), 0);
+                                                       if (REQUEST_POST('spath') != constant('PATH')) changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', 'SERVER-PATH', "define('PATH', '", "');", REQUEST_POST('spath'), 0);
+                                                       if (REQUEST_POST('burl')  != constant('URL'))  changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', 'HOST-URL', "define('URL', '", "');", REQUEST_POST('burl'), 0);
+                                                       changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', 'MAIN-TITLE', "define('MAIN_TITLE', '", "');", REQUEST_POST('title'), 0);
+                                                       changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', 'SLOGAN', "define('SLOGAN', '", "');", REQUEST_POST('slogan'), 0);
+                                                       changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', 'WEBMASTER', "define('WEBMASTER', '", "');", REQUEST_POST('email'), 0);
+                                                       changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', 'NULLPASS-WARNING', "setConfigEntry('WARN_NO_PASS', '", "');", REQUEST_POST('warn_no_pass'), 0);
+                                                       changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', 'WRITE-FOOTER', "setConfigEntry('WRITE_FOOTER', '", "');", REQUEST_POST('wfooter'), 0);
+                                                       changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', 'BACKLINK', "setConfigEntry('ENABLE_BACKLINK', '", "');", REQUEST_POST('blink'), 0);
+                                                       // DEACTIVATED: changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', 'OUTPUT-MODE', "define('OUTPUT_MODE', '", "');", REQUEST_POST('omode'), 0);
+                                                       changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', 'MYSQL-HOST', "  'host'     => '", "',", $mysql['host'], 0);
+                                                       changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', 'MYSQL-DBASE', " 'dbase'    => '", "',", $mysql['dbase'], 0);
+                                                       changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', 'MYSQL-LOGIN', " 'login'    => '", "',", $mysql['login'], 0);
+                                                       changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', 'MYSQL-PASSWORD', "      'password' => '", "',", $mysql['pass1'], 0);
+                                                       changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', 'MYSQL-PREFIX', "setConfigEntry('_MYSQL_PREFIX', '", "');", $mysql['prefix'], 0);
+                                                       changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', 'TABLE-TYPE', "setConfigEntry('_TABLE_TYPE', '", "');", $mysql['type'], 0);
+                                                       changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', 'SMTP-HOSTNAME', "setConfigEntry('SMTP_HOSTNAME', '", "');", REQUEST_POST('smtp_host'), 0);
+                                                       changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', 'SMTP-USER', "setConfigEntry('SMTP_USER', '", "');", REQUEST_POST('smtp_user'), 0);
+                                                       changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', 'SMTP-PASSWORD', "setConfigEntry('SMTP_PASSWORD', '", "');", REQUEST_POST('smtp_pass1'), 0);
 
                                                        // Generate a long site key
                                                        $siteKey = generatePassword(50);
 
                                                        // And write it
-                                                       changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', "SITE-KEY", "setConfigEntry('SITE_KEY', \"", "\");", $siteKey, 0);
+                                                       changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', 'SITE-KEY', "setConfigEntry('SITE_KEY', '", "');", $siteKey, 0);
 
                                                        // Script is now installed
-                                                       changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', "INSTALLED", "setConfigEntry('MXCHANGE_INSTALLED', \"", "\");", 'Y', 0);
+                                                       changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', 'INSTALLED', "setConfigEntry('MXCHANGE_INSTALLED', '", "');", 'Y', 0);
                                                } // END - if
                                        } // END - if
                                } // END - if