Skip to content

Commit

Permalink
Removed some unused code.
Browse files Browse the repository at this point in the history
Cleaned up comments.
Localized some strings.


git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk@649 f5dc347c-c33d-0410-90a0-b07cc1902cb9
  • Loading branch information
Kenzaburo Ito committed Jan 15, 2002
1 parent 6e1ec3e commit 24a43e0
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 59 deletions.
1 change: 0 additions & 1 deletion admin_upgrade_0_15_0.php
Expand Up @@ -157,7 +157,6 @@
$query[84] = "ALTER TABLE mantis_bug_table CHANGE resolution resolution INT (2) DEFAULT '10' not null";
$query[85] = "ALTER TABLE mantis_bug_table CHANGE priority priority INT (2) DEFAULT '30' not null";
$query[86] = "ALTER TABLE mantis_bug_table CHANGE status status INT (2) DEFAULT '10' not null";
# @@@ more near bottom

# Update dates to be legal

Expand Down
2 changes: 1 addition & 1 deletion bugnote_delete.php
Expand Up @@ -16,7 +16,7 @@
check_access( REPORTER );

# $f_bug_id is the bug id
# @@@ WHat does this do?
# @@@ What does this do?
check_bugnote_exists( $f_id );

# grab the bugnote text id
Expand Down
22 changes: 2 additions & 20 deletions core_email_API.php
Expand Up @@ -55,7 +55,7 @@ function check_duplicate( $p_arr, $p_str ) {
# --------------------
# build the bcc list

# @@@ ugly function: here's how it works:
# UGLY function: here's how it works:
# We store all the email addresses in an array. First we grab the reporter.
# If the handler is assigned then we add that.

Expand Down Expand Up @@ -462,23 +462,6 @@ function email_bug_info( $p_bug_id, $p_message, $p_headers="" ) {
}
}
# --------------------
# Send to only the id
# @@@ UNUSED
function email_bug_info_to_id( $p_bug_id, $p_message, $p_user_id ) {
# build subject
$p_subject = email_build_subject( $p_bug_id );

# build message
$t_message = $p_message."\n";
$t_message .= email_build_bug_message( $p_bug_id );
$t_message .= email_build_bugnote_message( $p_bug_id );

$p_user_email = get_user_info( $p_user_id, "email" );

# send mail
$res = email_send( $p_user_email, $p_subject, $t_message, $p_bcc_header );
}
# --------------------
# this function sends the actual email
function email_send( $p_recipient, $p_subject, $p_message, $p_header="" ) {
global $g_from_email, $g_enable_email_notification,
Expand All @@ -494,7 +477,7 @@ function email_send( $p_recipient, $p_subject, $p_message, $p_header="" ) {
$t_subject = trim( $p_subject );
$t_message = trim( $p_message );

# @@@ for debugging only
# for debugging only
#echo $t_recipient."<BR>".$t_subject."<BR>".$t_message."<BR>".$t_headers;
#exit;
#echo "<br>xxxRecipient =".$t_recipient."<br>";
Expand Down Expand Up @@ -597,7 +580,6 @@ function get_bug_summary( $p_bug_id ) {
# --------------------
# formats the subject correctly
# we include the project name, bug id, and summary.
# @@@ NOTE: Is there a limit to the length of the subject field?
function email_build_subject( $p_bug_id ) {
# grab the project name
$p_project_name = get_project_name( get_bug_project_id( $p_bug_id ) );
Expand Down
2 changes: 1 addition & 1 deletion core_helper_API.php
Expand Up @@ -293,7 +293,7 @@ function explode_enum_arr( $p_enum_elem ) {
return explode( ":", $p_enum_elem );
}
# --------------------
# Given a enum string and num, return the appriate string @@@ localize for display
# Given a enum string and num, return the appriate string
function get_enum_element( $p_enum_string, $p_val ) {
$arr = explode_enum_string( $p_enum_string );
for ( $i=0;$i<count( $arr );$i++ ) {
Expand Down
5 changes: 1 addition & 4 deletions core_html_API.php
Expand Up @@ -442,10 +442,7 @@ function print_summary_menu( $p_page="" ) {
global $g_summary_page, $s_summary_link,
$g_use_jpgraph, $s_summary_jpgraph_link,
$g_print_all_bug_page, $s_print_all_bug_page_link,
$g_summary_jpgraph_page;

# @@@ LOCALIZE
$s_print_all_bug_page_link = "Print Reports";
$g_summary_jpgraph_page, $s_print_reports;

PRINT "<p><div align=\"center\">";
print_bracket_link( $g_print_all_bug_page, $s_print_all_bug_page_link );
Expand Down
15 changes: 5 additions & 10 deletions core_print_API.php
Expand Up @@ -399,11 +399,6 @@ function print_enum_string_option_list( $p_enum_string, $p_val=0 ) {
} # end for
}
# --------------------
# @@@ Unused
function print_enum_string( $p_value, $p_string ) {
global $s_status_enum_string;
}
# --------------------
function print_project_user_option_list( $p_val=0 ) {
global $g_mantis_project_table, $s_access_levels_enum_string;

Expand Down Expand Up @@ -667,7 +662,7 @@ function unfilter_href_tags( $p_string ) {
return $p_string;
}
# --------------------
# @@@ does nothing
# @@@ currently does nothing
function filter_img_tags( $p_string ) {
return $p_string;
}
Expand Down Expand Up @@ -710,7 +705,7 @@ function string_prepare_textarea( $p_string ) {
$p_string = filter_href_tags( $p_string );
}

#@@@$p_string = filter_img_tags( $p_string );
$p_string = filter_img_tags( $p_string );
$p_string = addslashes( $p_string );
return $p_string;
}
Expand All @@ -732,7 +727,7 @@ function string_prepare_text( $p_string ) {
$p_string = filter_href_tags( $p_string );
}

#@@@$p_string = filter_img_tags( $p_string );
$p_string = filter_img_tags( $p_string );
$p_string = addslashes( $p_string );
return $p_string;
}
Expand Down Expand Up @@ -761,7 +756,7 @@ function string_email( $p_string ) {
# Process a string for display in a textarea box
function string_edit_textarea( $p_string ) {
$p_string = stripslashes( $p_string );
#@@@$p_string = str_replace( "<br>", "", $p_string );
$p_string = str_replace( "<br>", "", $p_string );
$p_string = unfilter_href_tags( $p_string );
$p_string = str_replace( "<br />", "\n", $p_string );
$p_string = str_replace( "&lt;", "<", $p_string );
Expand All @@ -773,7 +768,7 @@ function string_edit_textarea( $p_string ) {
# Process a string for display in a text box
function string_edit_text( $p_string ) {
$p_string = stripslashes( $p_string );
#@@@$p_string = str_replace( "<br>", "", $p_string );
$p_string = str_replace( "<br>", "", $p_string );
$p_string = unfilter_href_tags( $p_string );
$p_string = str_replace( "&lt;", "<", $p_string );
$p_string = str_replace( "&gt;", ">", $p_string );
Expand Down
18 changes: 0 additions & 18 deletions core_user_API.php
Expand Up @@ -275,24 +275,6 @@ function access_level_check_greater_or_equal( $p_access_level ) {
}
}
# --------------------
# @@@ UNUSED
function is_project_manager( $p_project_id ) {
global $g_mantis_project_table, $g_mantis_project_user_list_table;

$t_user_id = get_current_user_field( "id" );
$query = "SELECT COUNT(*)
FROM $g_mantis_project_user_list_table
WHERE project_id='$p_project_id' AND user_id='$t_user_id' AND
access_level='manager'";
$result = db_query( $query );
$t_count = db_result( $result );
if ($t_count > 1) {
return true;
} else {
return false;
}
}
# --------------------
# Checks to see if the user should be here. If not then log the user out.
function check_access( $p_access_level ) {
global $g_logout_page;
Expand Down
1 change: 1 addition & 0 deletions doc/ChangeLog
Expand Up @@ -35,6 +35,7 @@ Mantis
* Removed sql_to_unix_time() function. Unecessary with removal of TIMESTAMPS.
* Removed menu_inc.php file and related variable. Moved this into print_menu().
* Removed print_mantis_version(). Moved it into print_foooter().
* Removed some unused code.
* Renamed g_store_file_to to g_file_upload_method.
* Renamed files to .php
* Removed admin_cookiecheck.php3
Expand Down
2 changes: 2 additions & 0 deletions lang/strings_english.txt
Expand Up @@ -11,6 +11,8 @@
$s_all_projects = "All Projects";
$s_move_bugs = "Move Bugs";
$s_operation_successful = "Operation successful.";
$s_date_order = "Date Order";
$s_print_all_bug_page_link = "Print Reports";

# ERROR strings
$MANTIS_ERROR[ERROR_SQL] = "ERROR: SQL error detected. Please report this to ";
Expand Down
6 changes: 2 additions & 4 deletions manage_proj_ver_edit_page.php
Expand Up @@ -28,17 +28,15 @@
<input type="hidden" name="f_project_id" value="<?php echo $f_project_id ?>">
<input type="hidden" name="f_orig_version" value="<?php echo $f_version ?>">
<td class="category">
<?php # @@@ localize ?>
Version
<?php echo $s_version ?>
</td>
<td>
<input type="text" name="f_version" size="32" maxlength="64" value="<?php echo urldecode( $f_version ) ?>">
</td>
</tr>
<tr class="row-1">
<td class="category">
<?php # @@@ localize ?>
Date Order
<?php echo $s_date_order ?>
</td>
<td>
<input type="text" name="f_date_order" size="32" value="<?php echo urldecode( $f_date_order ) ?>">
Expand Down

0 comments on commit 24a43e0

Please sign in to comment.