Skip to content

Commit

Permalink
renamed database commands to help with db_abstraction
Browse files Browse the repository at this point in the history
git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk@106 f5dc347c-c33d-0410-90a0-b07cc1902cb9
  • Loading branch information
Kenzaburo Ito committed Dec 24, 2000
1 parent 82c4fec commit 1b3ed5f
Show file tree
Hide file tree
Showing 61 changed files with 278 additions and 179 deletions.
10 changes: 9 additions & 1 deletion ChangeLog
Expand Up @@ -27,9 +27,17 @@ To Do:
* Reordered the config_inc.php file items
* Added a logout redirect page variable for the logout page
* Fixed show source problem
* Removed get_current_user_id() and replaced with calls to get_current_user_field( "id" )
* Removed get_current_user_id() and replaced with calls to
get_current_user_field( "id" )
* Added reopen bug dialog
* Added $g_bug_reopen_page and removed $g_bug_reopen
* Added bug_reopen_page.php3 and removed bug_reopen.php3
* Added $g_bug_resolve_page and bug_resolve_page.php3
* Modified the appearance of the advanced view and update
* Split the account pref modifications into two spearate files:
account_prefs_update.php3 and account_prefs_reset.php3
* Removed db_mysql_error()
*

12.20.2000 - 0.12.0

Expand Down
2 changes: 1 addition & 1 deletion account_delete.php3
Expand Up @@ -7,7 +7,7 @@
<? include( "core_API.php" ) ?>
<? login_cookie_check() ?>
<?
db_mysql_connect( $g_hostname, $g_db_username, $g_db_password, $g_database_name );
db_connect( $g_hostname, $g_db_username, $g_db_password, $g_database_name );

### If an account is protected then no one can change the information
### This is useful for shared accounts or for demo purposes
Expand Down
2 changes: 1 addition & 1 deletion account_delete_page.php3
Expand Up @@ -15,7 +15,7 @@
<? print_body_top() ?>
<? print_header( $g_page_title ) ?>
<?
db_mysql_connect( $g_hostname, $g_db_username, $g_db_password, $g_database_name );
db_connect( $g_hostname, $g_db_username, $g_db_password, $g_database_name );
?>

<p>
Expand Down
2 changes: 1 addition & 1 deletion account_page.php3
Expand Up @@ -15,7 +15,7 @@
<? print_body_top() ?>
<? print_header( $g_page_title ) ?>
<?
db_mysql_connect( $g_hostname, $g_db_username, $g_db_password, $g_database_name );
db_connect( $g_hostname, $g_db_username, $g_db_password, $g_database_name );

### extracts the user information for the currently logged in user
### and prefixes it with u_
Expand Down
8 changes: 3 additions & 5 deletions account_prefs_page.php3
Expand Up @@ -15,7 +15,7 @@
<? print_body_top() ?>
<? print_header( $g_page_title ) ?>
<?
db_mysql_connect( $g_hostname, $g_db_username, $g_db_password, $g_database_name );
db_connect( $g_hostname, $g_db_username, $g_db_password, $g_database_name );

### grab the user id
$u_id = get_current_user_field( "id " );
Expand Down Expand Up @@ -60,7 +60,6 @@
<td bgcolor=<? echo $g_white_color ?>>
<table width=100% cols=2>
<form method=post action="<? echo $g_account_prefs_update ?>">
<input type=hidden name=f_action value="update">
<input type=hidden name=f_id value="<? echo $u_id ?>">
<input type=hidden name=f_user_id value="<? echo $u_user_id ?>">
<tr>
Expand All @@ -78,7 +77,7 @@
</tr>
<tr bgcolor=<? echo $g_primary_color_dark ?>>
<td>
<? echo $s_advanced_report ?>
<? echo $s_advanced_view ?>
</td>
<td>
<input type=checkbox name=f_advanced_view size=4 maxlength=4 <? if ( $u_advanced_view=="on" ) echo "CHECKED"?>
Expand All @@ -89,8 +88,7 @@
<input type=submit value="<? echo $s_update_prefs ?>">
</td>
</form>
<form method=post action="<? echo $g_account_prefs_update ?>">
<input type=hidden name=f_action value="reset">
<form method=post action="<? echo $g_account_prefs_reset ?>">
<input type=hidden name=f_id value="<? echo $u_id ?>">
<td>
<input type=submit value="<? echo $s_reset_prefs ?>">
Expand Down
24 changes: 7 additions & 17 deletions account_prefs_update.php3
Expand Up @@ -7,24 +7,14 @@
<? include( "core_API.php" ) ?>
<? login_cookie_check() ?>
<?
db_mysql_connect( $g_hostname, $g_db_username, $g_db_password, $g_database_name );
db_connect( $g_hostname, $g_db_username, $g_db_password, $g_database_name );

if ( $f_action="update" ) {
## update preferences
$query = "UPDATE $g_mantis_user_pref_table
SET advanced_report='$f_advanced_report',
advanced_view='$f_advanced_view'
WHERE id='$f_id'";
$result = mysql_query( $query );
}
else if ( $f_action="reset" ) {
## reset to defaults
$query = "UPDATE $g_mantis_user_pref_table
SET advanced_report='$g_default_advanced_report',
advanced_view='$g_default_advanced_view'
WHERE id='$f_id'";
$result = mysql_query( $query );
}
## update preferences
$query = "UPDATE $g_mantis_user_pref_table
SET advanced_report='$f_advanced_report',
advanced_view='$f_advanced_view'
WHERE id='$f_id'";
$result = mysql_query( $query );
?>
<? print_html_top() ?>
<? print_head_top() ?>
Expand Down
2 changes: 1 addition & 1 deletion account_profile_add.php3
Expand Up @@ -7,7 +7,7 @@
<? include( "core_API.php" ) ?>
<? login_cookie_check() ?>
<?
db_mysql_connect( $g_hostname, $g_db_username, $g_db_password, $g_database_name );
db_connect( $g_hostname, $g_db_username, $g_db_password, $g_database_name );

if ( !access_level_check_greater_or_equal( "reporter" ) ) {
### need to replace with access error page
Expand Down
2 changes: 1 addition & 1 deletion account_profile_delete.php3
Expand Up @@ -7,7 +7,7 @@
<? include( "core_API.php" ) ?>
<? login_cookie_check() ?>
<?
db_mysql_connect( $g_hostname, $g_db_username, $g_db_password, $g_database_name );
db_connect( $g_hostname, $g_db_username, $g_db_password, $g_database_name );

if ( !access_level_check_greater_or_equal( "reporter" ) ) {
### need to replace with access error page
Expand Down
2 changes: 1 addition & 1 deletion account_profile_edit_page.php3
Expand Up @@ -7,7 +7,7 @@
<? include( "core_API.php" ) ?>
<? login_cookie_check() ?>
<?
db_mysql_connect( $g_hostname, $g_db_username, $g_db_password, $g_database_name );
db_connect( $g_hostname, $g_db_username, $g_db_password, $g_database_name );

if ( !access_level_check_greater_or_equal( "reporter" ) ) {
### need to replace with access error page
Expand Down
2 changes: 1 addition & 1 deletion account_profile_make_default.php3
Expand Up @@ -7,7 +7,7 @@
<? include( "core_API.php" ) ?>
<? login_cookie_check() ?>
<?
db_mysql_connect( $g_hostname, $g_db_username, $g_db_password, $g_database_name );
db_connect( $g_hostname, $g_db_username, $g_db_password, $g_database_name );

if ( !access_level_check_greater_or_equal( "reporter" ) ) {
### need to replace with access error page
Expand Down
4 changes: 2 additions & 2 deletions account_profile_manage_page.php3
Expand Up @@ -7,7 +7,7 @@
<? include( "core_API.php" ) ?>
<? login_cookie_check() ?>
<?
db_mysql_connect( $g_hostname, $g_db_username, $g_db_password, $g_database_name );
db_connect( $g_hostname, $g_db_username, $g_db_password, $g_database_name );

if ( !access_level_check_greater_or_equal( "reporter" ) ) {
### need to replace with access error page
Expand Down Expand Up @@ -110,7 +110,7 @@
</td>
<td width=75%>
<select name=f_id>
<? print_profile_option_list( $u_id ) ?>
<? print_profile_option_list( get_current_user_field( "id " ) ) ?>
</select>
</td>
</tr>
Expand Down
2 changes: 1 addition & 1 deletion account_profile_update.php3
Expand Up @@ -7,7 +7,7 @@
<? include( "core_API.php" ) ?>
<? login_cookie_check() ?>
<?
db_mysql_connect( $g_hostname, $g_db_username, $g_db_password, $g_database_name );
db_connect( $g_hostname, $g_db_username, $g_db_password, $g_database_name );

if ( !access_level_check_greater_or_equal( "reporter" ) ) {
### need to replace with access error page
Expand Down
2 changes: 1 addition & 1 deletion account_update.php3
Expand Up @@ -7,7 +7,7 @@
<? include( "core_API.php" ) ?>
<? login_cookie_check() ?>
<?
db_mysql_connect( $g_hostname, $g_db_username, $g_db_password, $g_database_name );
db_connect( $g_hostname, $g_db_username, $g_db_password, $g_database_name );

### If an account is protected then no one can change the information
### This is useful for shared accounts or for demo purposes
Expand Down
2 changes: 1 addition & 1 deletion bug_delete.php3
Expand Up @@ -7,7 +7,7 @@
<? include( "core_API.php" ) ?>
<? login_cookie_check() ?>
<?
db_mysql_connect( $g_hostname, $g_db_username, $g_db_password, $g_database_name );
db_connect( $g_hostname, $g_db_username, $g_db_password, $g_database_name );

### Delete the bug entry
$query = "DELETE
Expand Down
2 changes: 1 addition & 1 deletion bug_delete_page.php3
Expand Up @@ -15,7 +15,7 @@
<? print_body_top() ?>
<? print_header( $g_page_title ) ?>
<?
db_mysql_connect( $g_hostname, $g_db_username, $g_db_password, $g_database_name );
db_connect( $g_hostname, $g_db_username, $g_db_password, $g_database_name );
?>

<p>
Expand Down
2 changes: 1 addition & 1 deletion bug_reopen_page.php3
Expand Up @@ -7,7 +7,7 @@
<? include( "core_API.php" ) ?>
<? login_cookie_check() ?>
<?
db_mysql_connect( $g_hostname, $g_db_username, $g_db_password, $g_database_name );
db_connect( $g_hostname, $g_db_username, $g_db_password, $g_database_name );

### get date submitted (weird bug in mysql)
$query = "SELECT date_submitted
Expand Down
2 changes: 1 addition & 1 deletion bug_update.php3
Expand Up @@ -7,7 +7,7 @@
<? include( "core_API.php" ) ?>
<? login_cookie_check() ?>
<?
db_mysql_connect( $g_hostname, $g_db_username, $g_db_password, $g_database_name );
db_connect( $g_hostname, $g_db_username, $g_db_password, $g_database_name );

### Update all fields
### BUG IN MYSQL or PHP
Expand Down

0 comments on commit 1b3ed5f

Please sign in to comment.