function writeConfig() { // catch any plugins that write alternate configs $return = false; $args = array(&$return); $this->pluginHandler->triggerEvent('onWriteConf', $args); if ($return) { return; } writeconf(); }
$pref['sql_host'] = '127.0.0.1'; } // See if we have tnef installed $pref['decode_tnef'] = 1; $pref['tnef_path'] = ''; // Turn off decode_tnef if not supported if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { $pref['decode_tnef'] = 0; } else { $pref['tnef_path'] = findBinary(array('tnef')); if (empty($pref['tnef_path'])) { $pref['decode_tnef'] = 0; } } // Now save all collected data to Config.php writeconf(); touch($pref['install_dir'] . '/logs/popimap_debug'); chmod($pref['install_dir'] . '/libs/Atmail/Config.php', 0640); chmod($pref['install_dir'] . '/logs/popimap_debug', 0640); // Create the .htaccess to prevent a malicious re-install $fh = @fopen('.htaccess', 'w'); if (is_resource($fh)) { fwrite($fh, "<FilesMatch \"\\.(php|html)\$\">\norder allow,deny\ndeny from all\n</FilesMatch>"); fclose($fh); chmod('.htaccess', 0640); } else { $vars['htaccess_error'] = true; } if (isset($_SESSION['missing_ext'])) { $vars['missing_ext'] = '<h2>Optional PHP Extensions</h2> <p>The following optional PHP extensions are missing. You may enable