Changeset 681 for trunk


Ignore:
Timestamp:
Jan 9, 2005, 12:32:25 AM (20 years ago)
Author:
plg
Message:
  • replacement of variable names in include/mysql.inc.php (for upgrades) :

dbname => cfgBase
dbuser => cfgUser
dbpasswd => cfgPassword
dbhost => cfgHote
table_prefix => prefixeTable

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/common.inc.php

    r675 r681  
    127127
    128128// Database connection
    129 mysql_connect( $dbhost, $dbuser, $dbpasswd )
     129mysql_connect( $cfgHote, $cfgUser, $cfgPassword )
    130130or die ( "Could not connect to database server" );
    131 mysql_select_db( $dbname )
     131mysql_select_db( $cfgBase )
    132132or die ( "Could not connect to database" );
    133133       
  • trunk/include/constants.php

    r675 r681  
    4141
    4242// Table names
    43 define('CATEGORIES_TABLE', $table_prefix.'categories');
    44 define('COMMENTS_TABLE', $table_prefix.'comments');
    45 define('CONFIG_TABLE', $table_prefix.'config');
    46 define('FAVORITES_TABLE', $table_prefix.'favorites');
    47 define('GROUP_ACCESS_TABLE', $table_prefix.'group_access');
    48 define('GROUPS_TABLE', $table_prefix.'groups');
    49 define('HISTORY_TABLE', $table_prefix.'history');
    50 define('IMAGE_CATEGORY_TABLE', $table_prefix.'image_category');
    51 define('IMAGES_TABLE', $table_prefix.'images');
    52 define('SESSIONS_TABLE', $table_prefix.'sessions');
    53 define('SITES_TABLE', $table_prefix.'sites');
    54 define('USER_ACCESS_TABLE', $table_prefix.'user_access');
    55 define('USER_GROUP_TABLE', $table_prefix.'user_group');
    56 define('USERS_TABLE', $table_prefix.'users');
    57 define('WAITING_TABLE', $table_prefix.'waiting');
    58 define('IMAGE_METADATA_TABLE', $table_prefix.'image_metadata');
    59 define('RATE_TABLE', $table_prefix.'rate');
    60 define('USER_FORBIDDEN_TABLE', $table_prefix.'user_forbidden');
     43define('CATEGORIES_TABLE', $prefixeTable.'categories');
     44define('COMMENTS_TABLE', $prefixeTable.'comments');
     45define('CONFIG_TABLE', $prefixeTable.'config');
     46define('FAVORITES_TABLE', $prefixeTable.'favorites');
     47define('GROUP_ACCESS_TABLE', $prefixeTable.'group_access');
     48define('GROUPS_TABLE', $prefixeTable.'groups');
     49define('HISTORY_TABLE', $prefixeTable.'history');
     50define('IMAGE_CATEGORY_TABLE', $prefixeTable.'image_category');
     51define('IMAGES_TABLE', $prefixeTable.'images');
     52define('SESSIONS_TABLE', $prefixeTable.'sessions');
     53define('SITES_TABLE', $prefixeTable.'sites');
     54define('USER_ACCESS_TABLE', $prefixeTable.'user_access');
     55define('USER_GROUP_TABLE', $prefixeTable.'user_group');
     56define('USERS_TABLE', $prefixeTable.'users');
     57define('WAITING_TABLE', $prefixeTable.'waiting');
     58define('IMAGE_METADATA_TABLE', $prefixeTable.'image_metadata');
     59define('RATE_TABLE', $prefixeTable.'rate');
     60define('USER_FORBIDDEN_TABLE', $prefixeTable.'user_forbidden');
    6161?>
  • trunk/install.php

    r675 r681  
    252252    $step = 2;
    253253    $file_content = "<?php";
    254     $file_content.= "\n\$dbname = '".     $dbname."';";
    255     $file_content.= "\n\$dbuser = '".     $dbuser."';";
    256     $file_content.= "\n\$dbpasswd = '". $dbpasswd."';";
    257     $file_content.= "\n\$dbhost = '".     $dbhost."';";
     254    $file_content.= "\n\$cfgBase = '".     $dbname."';";
     255    $file_content.= "\n\$cfgUser = '".     $dbuser."';";
     256    $file_content.= "\n\$cfgPassword = '". $dbpasswd."';";
     257    $file_content.= "\n\$cfgHote = '".     $dbhost."';";
    258258    $file_content.= "\n";
    259     $file_content.= "\n\$table_prefix = '".$table_prefix."';";
     259    $file_content.= "\n\$prefixeTable = '".$table_prefix."';";
    260260    $file_content.= "\n";
    261261    $file_content.= "\ndefine('PHPWG_INSTALLED', true);";
  • trunk/upgrade.php

    r675 r681  
    3434include(PHPWG_ROOT_PATH.'include/mysql.inc.php');
    3535include_once(PHPWG_ROOT_PATH.'include/constants.php');
    36 define('PREFIX_TABLE', $table_prefix);
     36define('PREFIX_TABLE', $prefixeTable);
    3737
    3838$conf['show_queries'] = false;
    3939
    4040// Database connection
    41 mysql_connect( $dbhost, $dbuser, $dbpasswd )
     41mysql_connect( $cfgHote, $cfgUser, $cfgPassword )
    4242or die ( "Could not connect to database server" );
    43 mysql_select_db( $dbname )
     43mysql_select_db( $cfgBase )
    4444or die ( "Could not connect to database" );
    4545// +-----------------------------------------------------------------------+
Note: See TracChangeset for help on using the changeset viewer.