[Vtigercrm-commits] [vtiger-commits] r3940 - in /vtigercrm/branches/4.2: config.db.php config.inc.php config.php index.php install.php install/1checkSystem.php install/2setConfig.php install/4createConfigFile.php install/5createTables.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Sun Feb 26 16:04:24 EST 2006
Author: fathi
Date: Sun Feb 26 14:04:18 2006
New Revision: 3940
Log:
config.inc.php is configuration file included by config.php
Modified:
vtigercrm/branches/4.2/config.db.php
vtigercrm/branches/4.2/config.inc.php
vtigercrm/branches/4.2/config.php
vtigercrm/branches/4.2/index.php
vtigercrm/branches/4.2/install.php
vtigercrm/branches/4.2/install/1checkSystem.php
vtigercrm/branches/4.2/install/2setConfig.php
vtigercrm/branches/4.2/install/4createConfigFile.php
vtigercrm/branches/4.2/install/5createTables.php
Modified: vtigercrm/branches/4.2/config.db.php
==============================================================================
--- vtigercrm/branches/4.2/config.db.php (original)
+++ vtigercrm/branches/4.2/config.db.php Sun Feb 26 14:04:18 2006
@@ -5,4 +5,6 @@
$dbconfig['db_password'] = '_DBC_PASS_';
$dbconfig['db_name'] = '_DBC_NAME_';
$dbconfig['db_type'] = '_DBC_TYPE_'
+
+ $dbconfig['db_hostname'] = $dbconfig['db_server'].$dbconfig['db_port'];
?>
Modified: vtigercrm/branches/4.2/config.inc.php
==============================================================================
--- vtigercrm/branches/4.2/config.inc.php (original)
+++ vtigercrm/branches/4.2/config.inc.php Sun Feb 26 14:04:18 2006
@@ -1,7 +1,71 @@
<?php
-/**
- * The configuration file for FHS system
- * is located at /etc/vtigercrm directory.
- */
- include('config.inc.php');
+/*********************************************************************************
+ * The contents of this file are subject to the SugarCRM Public License Version 1.1.2
+ * ("License"); You may not use this file except in compliance with the
+ * License. You may obtain a copy of the License at http://www.sugarcrm.com/SPL
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
+ * the specific language governing rights and limitations under the License.
+ * The Original Code is: SugarCRM Open Source
+ * The Initial Developer of the Original Code is SugarCRM, Inc.
+ * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.;
+ * All Rights Reserved.
+ * Contributor(s): ______________________________________.
+********************************************************************************/
+
+require_once("connection.php");
+
+// make MySQL run in desired port
+$sock_path=":" .$mysql_port;
+$H_NAME=gethostbyaddr($_SERVER['SERVER_ADDR']);
+
+/* database configuration
+ db_hostname
+ db_username
+ db_password
+ db_name
+*/
+// all of these commented values get populated by install.php
+//$dbconfig['db_hostname'] = '$H_NAME.$sock_path';
+//$dbconfig['db_username'] = 'vtigercrm';
+//$dbconfig['db_password'] = '';
+//$dbconfig['db_name'] = 'vtigercrm';
+
+//$host_name = '';
+//$site_URL = '';
+//$root_directory = '';
+
+// full path to the include directory including the trailing slash
+//$includeDirectory = $root_directory.'include/';
+
+$list_max_entries_per_page = '20';
+$history_max_viewed = '5';
+
+// define list of menu tabs
+//$moduleList = Array('Home', 'Dashboard', 'Leads', 'Contacts', 'Accounts', 'Opportunities', 'Cases', 'Notes', 'Calls', 'Emails', 'Meetings', 'Tasks');
+
+$default_module = 'Home';
+$default_action = 'index';
+
+// set default theme
+$default_theme = 'blue';
+$databasetype = 'mysql';
+
+// show or hide time to compose each page
+$calculate_response_time = true;
+
+// default text that is placed initially in the login form for user name
+$default_user_name = '';
+
+// default text that is placed initially in the login form for password
+$default_password = '';
+
+// create user with default username and password
+$create_default_user = false;
+
+// login message
+// if a message is provided, it will be placed on the login screen
+// this is for site specific special instructions
+$login_message = 'Please login to the application.';
+
?>
Modified: vtigercrm/branches/4.2/config.php
==============================================================================
--- vtigercrm/branches/4.2/config.php (original)
+++ vtigercrm/branches/4.2/config.php Sun Feb 26 14:04:18 2006
@@ -1,71 +1,7 @@
<?php
-/*********************************************************************************
- * The contents of this file are subject to the SugarCRM Public License Version 1.1.2
- * ("License"); You may not use this file except in compliance with the
- * License. You may obtain a copy of the License at http://www.sugarcrm.com/SPL
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
- * the specific language governing rights and limitations under the License.
- * The Original Code is: SugarCRM Open Source
- * The Initial Developer of the Original Code is SugarCRM, Inc.
- * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.;
- * All Rights Reserved.
- * Contributor(s): ______________________________________.
-********************************************************************************/
-
-require_once("connection.php");
-
-// make MySQL run in desired port
-$sock_path=":" .$mysql_port;
-$H_NAME=gethostbyaddr($_SERVER['SERVER_ADDR']);
-
-/* database configuration
- db_hostname
- db_username
- db_password
- db_name
-*/
-// all of these commented values get populated by install.php
-//$dbconfig['db_hostname'] = '$H_NAME.$sock_path';
-//$dbconfig['db_username'] = 'vtigercrm';
-//$dbconfig['db_password'] = '';
-//$dbconfig['db_name'] = 'vtigercrm';
-
-//$host_name = '';
-//$site_URL = '';
-//$root_directory = '';
-
-// full path to the include directory including the trailing slash
-//$includeDirectory = $root_directory.'include/';
-
-$list_max_entries_per_page = '20';
-$history_max_viewed = '5';
-
-// define list of menu tabs
-//$moduleList = Array('Home', 'Dashboard', 'Leads', 'Contacts', 'Accounts', 'Opportunities', 'Cases', 'Notes', 'Calls', 'Emails', 'Meetings', 'Tasks');
-
-$default_module = 'Home';
-$default_action = 'index';
-
-// set default theme
-$default_theme = 'blue';
-$databasetype = 'mysql';
-
-// show or hide time to compose each page
-$calculate_response_time = true;
-
-// default text that is placed initially in the login form for user name
-$default_user_name = '';
-
-// default text that is placed initially in the login form for password
-$default_password = '';
-
-// create user with default username and password
-$create_default_user = false;
-
-// login message
-// if a message is provided, it will be placed on the login screen
-// this is for site specific special instructions
-$login_message = 'Please login to the application.';
-
+/**
+ * The configuration file for FHS system
+ * is located at /etc/vtigercrm directory.
+ */
+ include('config.inc.php');
?>
Modified: vtigercrm/branches/4.2/index.php
==============================================================================
--- vtigercrm/branches/4.2/index.php (original)
+++ vtigercrm/branches/4.2/index.php Sun Feb 26 14:04:18 2006
@@ -350,24 +350,24 @@
// Create or reestablish the current session
session_start();
-if (!is_file('config.php')) {
- header("Location: install.php");
- exit();
-}
-
-require_once('config.php');
+if (!is_file('config.inc.php')) {
+ header("Location: install.php");
+ exit();
+}
+
+require_once('config.inc.php');
if (!isset($dbconfig['db_hostname'])) {
- header("Location: install.php");
- exit();
-}
-
-// load up the config_override.php file. This is used to provide default user settings
-if (is_file('config_override.php'))
-{
- require_once('config_override.php');
-}
+ header("Location: install.php");
+ exit();
+}
+
+// load up the config.override.php file
+// used to provide default user settings
+if (is_file('config.override.php'))
+ require_once('config.override.php');
+
$default_config_values = Array( "allow_exports"=>"all","upload_maxsize"=>"3000000" );
-
+
set_default_config($default_config_values);
require_once('include/logging.php');
require_once('modules/Users/User.php');
Modified: vtigercrm/branches/4.2/install.php
==============================================================================
--- vtigercrm/branches/4.2/install.php (original)
+++ vtigercrm/branches/4.2/install.php Sun Feb 26 14:04:18 2006
@@ -18,24 +18,26 @@
********************************************************************************/
if (substr(phpversion(), 0, 1) == "5") {
- ini_set("zend.ze1_compatibility_mode", "1");
+ ini_set("zend.ze1_compatibility_mode", "1");
}
function stripslashes_checkstrings($value) {
- if(is_string($value)) {
- return stripslashes($value);
- }
- return $value;
+ if(is_string($value))
+ return stripslashes($value);
+
+ return $value;
}
if(get_magic_quotes_gpc() == 1) {
- $_REQUEST = array_map("stripslashes_checkstrings", $_REQUEST);
- $_POST = array_map("stripslashes_checkstrings", $_POST);
- $_GET = array_map("stripslashes_checkstrings", $_GET);
+ $_REQUEST = array_map("stripslashes_checkstrings", $_REQUEST);
+ $_POST = array_map("stripslashes_checkstrings", $_POST);
+ $_GET = array_map("stripslashes_checkstrings", $_GET);
}
-if (isset($_POST['file'])) $the_file = $_POST['file'];
-else $the_file = "0welcome.php";
+if (isset($_POST['file']))
+ $the_file = $_POST['file'];
+else
+ $the_file = "0welcome.php";
include("install/".$the_file);
Modified: vtigercrm/branches/4.2/install/1checkSystem.php
==============================================================================
--- vtigercrm/branches/4.2/install/1checkSystem.php (original)
+++ vtigercrm/branches/4.2/install/1checkSystem.php Sun Feb 26 14:04:18 2006
@@ -173,9 +173,9 @@
</tr>
<tr>
- <td bgcolor="#EEEEEE"><strong>config.php</strong></td>
-
- <td align="right"><?php echo (is_writable('./config.php') || is_writable('.'))?"<strong><font color=\"#0066CC\">Writeable</font></strong>":"<strong><font color=\"#FF0000\">Not Writeable</font></strong>"; ?></td>
+ <td bgcolor="#EEEEEE"><strong>config.inc.php</strong></td>
+
+ <td align="right"><?php echo (is_writable('./config.inc.php') || is_writable('.'))?"<strong><font color=\"#0066CC\">Writeable</font></strong>":"<strong><font color=\"#FF0000\">Not Writeable</font></strong>"; ?></td>
</tr>
<tr>
<td bgcolor="#EEEEEE"><strong>Cache Directory (cache/)</strong></td>
Modified: vtigercrm/branches/4.2/install/2setConfig.php
==============================================================================
--- vtigercrm/branches/4.2/install/2setConfig.php (original)
+++ vtigercrm/branches/4.2/install/2setConfig.php Sun Feb 26 14:04:18 2006
@@ -34,7 +34,7 @@
$current_dir = $current_dir['dirname']."/";
$cache_dir = "cache/";
-if (is_file("config.php")) {
+if (is_file("config.php") && is_file("config.inc.php")) {
require_once("config.php");
session_start();
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 14:04:18 2006
@@ -122,8 +122,8 @@
if (isset($_REQUEST['root_directory']))
$root_directory = $_REQUEST['root_directory'];
-if (is_file('config.php'))
- $is_writable = is_writable('config.php');
+if (is_file('config.inc.php'))
+ $is_writable = is_writable('config.inc.php');
else
$is_writable = is_writable('.');
@@ -132,7 +132,7 @@
$templateHandle = fopen($templateFilename, "r");
if($templateHandle) {
/* open include configuration file write only */
- $includeFilename = 'config.php';
+ $includeFilename = 'config.inc.php';
$includeHandle = fopen($includeFilename, "w");
if($includeHandle) {
while (!feof($templateHandle)) {
@@ -176,16 +176,16 @@
if ($templateHandle && $includeHandle) {
echo "<br><table width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" align=\"center\"><tbody><tr><td align=\"left\">";
- echo "<h4>Successfully created configuration file (<b>config.php</b>) in :</h4></td>";
+ echo "<h4>Successfully created configuration file (<b>config.inc.php</b>) in :</h4></td>";
echo "<td align=\"left\"><font color=\"00CC00\">".$root_directory."</font>\n";
echo "</td></tr></table>";
}
else {
echo "<table width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\"><tbody><tr><td align=\"left\">";
- echo "Cannot write configuration file (config.php ) in the directory <font color=red>".$root_directory."</font>.\n";
- echo "<P>You can continue this installation by manually creating the config.php file and pasting the configuration information below inside.However, you <strong>must</strong> create the configuration file before you continue to the next step.<P>\n";
+ echo "Cannot write configuration file (config.inc.php ) in the directory <font color=red>".$root_directory."</font>.\n";
+ echo "<P>You can continue this installation by manually creating the config.inc.php file and pasting the configuration information below inside.However, you <strong>must</strong> create the configuration file before you continue to the next step.<P>\n";
echo "<TEXTAREA class=\"dataInput\" rows=\"15\" cols=\"80\">".$config."</TEXTAREA>";
- echo "<P>Did you remember to create the config.php file?</td></tr>";
+ echo "<P>Did you remember to create the config.inc.php file ?</td></tr>";
}
?>
Modified: vtigercrm/branches/4.2/install/5createTables.php
==============================================================================
--- vtigercrm/branches/4.2/install/5createTables.php (original)
+++ vtigercrm/branches/4.2/install/5createTables.php Sun Feb 26 14:04:18 2006
@@ -61,9 +61,9 @@
require_once('include/utils.php');
require_once('modules/Users/Security.php');
-// load the config_override.php file to provide default user settings
-if (is_file("config_override.php")) {
- require_once("config_override.php");
+// load the config.override.php file to provide default user settings
+if (is_file("config.override.php")) {
+ require_once("config.override.php");
}
$db = new PearDatabase();
More information about the vtigercrm-commits
mailing list