[Vtigercrm-commits] [vtiger-commits] r3941 - in /vtigercrm/branches/4.2: config.template.php install/4createConfigFile.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Sun Feb 26 17:17:39 EST 2006
Author: fathi
Date: Sun Feb 26 15:17:36 2006
New Revision: 3941
Log:
added missing parameters in template file
Modified:
vtigercrm/branches/4.2/config.template.php
vtigercrm/branches/4.2/install/4createConfigFile.php
Modified: vtigercrm/branches/4.2/config.template.php
==============================================================================
--- vtigercrm/branches/4.2/config.template.php (original)
+++ vtigercrm/branches/4.2/config.template.php Sun Feb 26 15:17:36 2006
@@ -41,16 +41,14 @@
db_name
*/
+// TODO: test if port is empty
$dbconfig['db_server'] = '_DBC_SERVER_';
-// TODO: test if port is empty
$dbconfig['db_port'] = ':_DBC_PORT_';
-$dbconfig['db_hostname'] = $dbconfig['db_server'].$dbconfig['db_port'];
$dbconfig['db_username'] = '_DBC_USER_';
$dbconfig['db_password'] = '_DBC_PASS_';
$dbconfig['db_name'] = '_DBC_NAME_';
-
-// db_type default value = mysql
$dbconfig['db_type'] = '_DBC_TYPE_';
+$dbconfig['db_hostname'] = $dbconfig['db_server'].$dbconfig['db_port'];
// log_sql default value = false
$dbconfig['log_sql'] = false;
@@ -75,20 +73,26 @@
$host_name = $dbconfig['db_hostname'];
$site_URL = 'http://'.$dbconfig['db_server'].'/vtigercrm';
-$root_directory = '/var/www/vtigercrm';
-$cache_dir = 'cache/';
-$mail_server = '';
-$mail_server_username = '';
-$mail_server_password = '';
+
+// root directory path
+$root_directory = '_VT_ROOTDIR_';
+
+// cache direcory path
+$cache_dir = '_VT_CACHEDIR_';
// tmp_dir default value prepended by cache_dir = images/
-$tmp_dir = 'cache/images/';
+$tmp_dir = '_VT_TMPDIR_';
-// import_dir default value prepended by cache_dir = import/
-$import_dir = 'cache/import/';
+// import_dir default value prepended by cache_dir = import/
+$import_dir = '_VT_IMPORTDIR_';
// upload_dir default value prepended by cache_dir = upload/
-$upload_dir = 'cache/upload/';
+$upload_dir = '_VT_UPLOADDIR_';
+
+// mail server parameters
+$mail_server = '_MAIL_SERVER_';
+$mail_server_username = '_MAIL_USERNAME_';
+$mail_server_password = '_MAIL_PASSWORD_';
// maximum file size for uploaded files in bytes also used when uploading import files
// upload_maxsize default value = 3000000
@@ -106,7 +110,7 @@
$upload_badext = array('php', 'php3', 'php4', 'php5', 'pl', 'cgi', 'py', 'asp', 'cfm', 'js', 'vbs', 'html', 'htm');
// full path to include directory including the trailing slash
-// includeDirectory default value = /var/www/vtigercrm/.'include/
+// includeDirectory default value = $root_directory..'include/
$includeDirectory = $root_directory.'include/';
// list_max_entries_per_page default value = 20
Modified: vtigercrm/branches/4.2/install/4createConfigFile.php
==============================================================================
--- vtigercrm/branches/4.2/install/4createConfigFile.php (original)
+++ vtigercrm/branches/4.2/install/4createConfigFile.php Sun Feb 26 15:17:36 2006
@@ -137,26 +137,7 @@
if($includeHandle) {
while (!feof($templateHandle)) {
$buffer = fgets($templateHandle);
- /* TODO: add missing parameters
- $vtiger_version = '".$vtiger_version."';\n";
- $release_date = '".$release_date."';\n";
- $dbconfig['db_hostname'] = '".$db_hostname."';\n";
- $dbconfig['db_username'] = '".$db_username."';\n";
- $dbconfig['db_password'] = '".$db_password."';\n";
- $dbconfig['db_name'] = '".$db_name."';\n";
- $host_name = '".$db_hostname."';\n";
- $site_URL = '".$site_URL."';\n";
- $root_directory = '".$root_directory."';\n";
- $cache_dir = '$cache_dir';\n";
- $mail_server = '$mail_server';\n";
- $mail_server_username = '$mail_server_username';\n";
- $mail_server_password = '$mail_server_password';\n";
- $tmp_dir = '" . ($cache_dir . "images/") . "';\n";
- $import_dir = '" . ($cache_dir . "import/") . "';\n";
- $upload_dir = '" . ($cache_dir . "upload/") . "';\n";
- // includeDirectory default value = $root_directory.'include/\n";
- $languages = $language_value;\n";
- */
+
/* replace _DBC_ variable */
$buffer = str_replace( "_DBC_SERVER_", $db_hostname, $buffer);
$buffer = str_replace( "_DBC_PORT_", "3306", $buffer);
@@ -164,6 +145,16 @@
$buffer = str_replace( "_DBC_PASS_", $db_password, $buffer);
$buffer = str_replace( "_DBC_NAME_", $db_name, $buffer);
$buffer = str_replace( "_DBC_TYPE_", "mysql", $buffer);
+ /* replace dir variable */
+ $buffer = str_replace( "_VT_ROOTDIR_", $root_directory, $buffer);
+ $buffer = str_replace( "_VT_CACHEDIR_", $cache_dir, $buffer);
+ $buffer = str_replace( "_VT_TMPDIR_", $cache_dir."images/", $buffer);
+ $buffer = str_replace( "_VT_IMPORTDIR_", $cache_dir."import/", $buffer);
+ $buffer = str_replace( "_VT_UPLOADDIR_", $cache_dir."upload/", $buffer);
+ /* replace mail variable */
+ $buffer = str_replace( "_MAIL_SERVER_", $mail_server, $buffer);
+ $buffer = str_replace( "_MAIL_USERNAME_", $mail_server_username, $buffer);
+ $buffer = str_replace( "_MAIL_PASSWORD_", $mail_server_password, $buffer);
fwrite($includeHandle, $buffer);
}
More information about the vtigercrm-commits
mailing list