aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2005-01-08 23:32:25 +0000
committerplegall <plg@piwigo.org>2005-01-08 23:32:25 +0000
commit34354aa6a950ee92a1b7b3928bcfa766065dfef9 (patch)
treeaf0658ec0bf203af33f63ed516b9bef4c09dc68f
parent971d0c5a9593d2a8d8ad0eff70c9dba1ca06a606 (diff)
- replacement of variable names in include/mysql.inc.php (for upgrades) :
dbname => cfgBase dbuser => cfgUser dbpasswd => cfgPassword dbhost => cfgHote table_prefix => prefixeTable git-svn-id: http://piwigo.org/svn/trunk@681 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--include/common.inc.php4
-rw-r--r--include/constants.php36
-rw-r--r--install.php10
-rw-r--r--upgrade.php6
4 files changed, 28 insertions, 28 deletions
diff --git a/include/common.inc.php b/include/common.inc.php
index d921a280d..68c4e6434 100644
--- a/include/common.inc.php
+++ b/include/common.inc.php
@@ -126,9 +126,9 @@ include(PHPWG_ROOT_PATH . 'include/functions.inc.php');
include(PHPWG_ROOT_PATH . 'include/template.php');
// Database connection
-mysql_connect( $dbhost, $dbuser, $dbpasswd )
+mysql_connect( $cfgHote, $cfgUser, $cfgPassword )
or die ( "Could not connect to database server" );
-mysql_select_db( $dbname )
+mysql_select_db( $cfgBase )
or die ( "Could not connect to database" );
//
diff --git a/include/constants.php b/include/constants.php
index 449401a7d..1b450f65e 100644
--- a/include/constants.php
+++ b/include/constants.php
@@ -40,22 +40,22 @@ define('CRITICAL_MESSAGE', 203);
define('CRITICAL_ERROR', 204);
// Table names
-define('CATEGORIES_TABLE', $table_prefix.'categories');
-define('COMMENTS_TABLE', $table_prefix.'comments');
-define('CONFIG_TABLE', $table_prefix.'config');
-define('FAVORITES_TABLE', $table_prefix.'favorites');
-define('GROUP_ACCESS_TABLE', $table_prefix.'group_access');
-define('GROUPS_TABLE', $table_prefix.'groups');
-define('HISTORY_TABLE', $table_prefix.'history');
-define('IMAGE_CATEGORY_TABLE', $table_prefix.'image_category');
-define('IMAGES_TABLE', $table_prefix.'images');
-define('SESSIONS_TABLE', $table_prefix.'sessions');
-define('SITES_TABLE', $table_prefix.'sites');
-define('USER_ACCESS_TABLE', $table_prefix.'user_access');
-define('USER_GROUP_TABLE', $table_prefix.'user_group');
-define('USERS_TABLE', $table_prefix.'users');
-define('WAITING_TABLE', $table_prefix.'waiting');
-define('IMAGE_METADATA_TABLE', $table_prefix.'image_metadata');
-define('RATE_TABLE', $table_prefix.'rate');
-define('USER_FORBIDDEN_TABLE', $table_prefix.'user_forbidden');
+define('CATEGORIES_TABLE', $prefixeTable.'categories');
+define('COMMENTS_TABLE', $prefixeTable.'comments');
+define('CONFIG_TABLE', $prefixeTable.'config');
+define('FAVORITES_TABLE', $prefixeTable.'favorites');
+define('GROUP_ACCESS_TABLE', $prefixeTable.'group_access');
+define('GROUPS_TABLE', $prefixeTable.'groups');
+define('HISTORY_TABLE', $prefixeTable.'history');
+define('IMAGE_CATEGORY_TABLE', $prefixeTable.'image_category');
+define('IMAGES_TABLE', $prefixeTable.'images');
+define('SESSIONS_TABLE', $prefixeTable.'sessions');
+define('SITES_TABLE', $prefixeTable.'sites');
+define('USER_ACCESS_TABLE', $prefixeTable.'user_access');
+define('USER_GROUP_TABLE', $prefixeTable.'user_group');
+define('USERS_TABLE', $prefixeTable.'users');
+define('WAITING_TABLE', $prefixeTable.'waiting');
+define('IMAGE_METADATA_TABLE', $prefixeTable.'image_metadata');
+define('RATE_TABLE', $prefixeTable.'rate');
+define('USER_FORBIDDEN_TABLE', $prefixeTable.'user_forbidden');
?>
diff --git a/install.php b/install.php
index 692b87231..a4e21df62 100644
--- a/install.php
+++ b/install.php
@@ -251,12 +251,12 @@ if ( isset( $_POST['install'] ))
{
$step = 2;
$file_content = "<?php";
- $file_content.= "\n\$dbname = '". $dbname."';";
- $file_content.= "\n\$dbuser = '". $dbuser."';";
- $file_content.= "\n\$dbpasswd = '". $dbpasswd."';";
- $file_content.= "\n\$dbhost = '". $dbhost."';";
+ $file_content.= "\n\$cfgBase = '". $dbname."';";
+ $file_content.= "\n\$cfgUser = '". $dbuser."';";
+ $file_content.= "\n\$cfgPassword = '". $dbpasswd."';";
+ $file_content.= "\n\$cfgHote = '". $dbhost."';";
$file_content.= "\n";
- $file_content.= "\n\$table_prefix = '".$table_prefix."';";
+ $file_content.= "\n\$prefixeTable = '".$table_prefix."';";
$file_content.= "\n";
$file_content.= "\ndefine('PHPWG_INSTALLED', true);";
$file_content.= "\n?".">";
diff --git a/upgrade.php b/upgrade.php
index 4ea0db93c..afd0fe34f 100644
--- a/upgrade.php
+++ b/upgrade.php
@@ -33,14 +33,14 @@ include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
include(PHPWG_ROOT_PATH.'include/template.php');
include(PHPWG_ROOT_PATH.'include/mysql.inc.php');
include_once(PHPWG_ROOT_PATH.'include/constants.php');
-define('PREFIX_TABLE', $table_prefix);
+define('PREFIX_TABLE', $prefixeTable);
$conf['show_queries'] = false;
// Database connection
-mysql_connect( $dbhost, $dbuser, $dbpasswd )
+mysql_connect( $cfgHote, $cfgUser, $cfgPassword )
or die ( "Could not connect to database server" );
-mysql_select_db( $dbname )
+mysql_select_db( $cfgBase )
or die ( "Could not connect to database" );
// +-----------------------------------------------------------------------+
// | tricky output |