Skip to content

Commit

Permalink
oops... mixed up update and view pages
Browse files Browse the repository at this point in the history
git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk@1452 f5dc347c-c33d-0410-90a0-b07cc1902cb9
  • Loading branch information
Julian Fitzell committed Sep 7, 2002
1 parent 5c32849 commit b20a812
Showing 1 changed file with 44 additions and 8 deletions.
52 changes: 44 additions & 8 deletions core/print_api.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# See the files README and LICENSE for details

# --------------------------------------------------------
# $Id: print_api.php,v 1.13 2002-09-07 07:53:42 jfitzell Exp $
# $Id: print_api.php,v 1.14 2002-09-07 07:59:50 jfitzell Exp $
# --------------------------------------------------------

###########################################################################
Expand Down Expand Up @@ -774,30 +774,66 @@ function print_custom_status_color_list() {
# String printing API
###########################################################################
# --------------------
# prints a link to a bug given an ID
# prints a link to VIEW a bug given an ID
# account for the user preference and site override
function print_bug_link( $p_id ) {
echo get_bug_link( $p_id );
}
# --------------------
# return an href anchor that links to a bug update page for the given bug
# return an href anchor that links to a bug VIEW page for the given bug
# account for the user preference and site override
function get_bug_link( $p_id ) {
return '<a href="'.get_bug_link_plain( $p_id ).'">'.$p_id.'</a>';
}
# --------------------
# return the name and GET parameters of a bug update page for the given bug
# return the name and GET parameters of a bug VIEW page for the given bug
# account for the user preference and site override
function get_bug_link_plain( $p_id ) {
return get_bug_view_page().'?f_id='.$p_id;
}
# --------------------
# return the name of a bug VIEW page for the user
# account for the user preference and site override
function get_bug_view_page() {
switch ( config_get( 'show_view' ) ) {
case BOTH:
if ( ON == current_user_get_pref( 'advanced_view' ) ) {
return 'view_bug_advanced_page.php';
} else {
return 'view_bug_page.php';
}
break;
case SIMPLE_ONLY:
return 'view_bug_page.php';
break;
case ADVANCED_ONLY:
return 'view_bugadvanced_page.php';
break;
}
}
# --------------------
# prints a link to UPDATE a bug given an ID
# account for the user preference and site override
function print_bug_update_link( $p_id ) {
echo get_bug_update_link( $p_id );
}
# --------------------
# return an href anchor that links to a bug UPDATE page for the given bug
# account for the user preference and site override
function get_bug_update_link( $p_id ) {
return '<a href="'.get_bug_update_link_plain( $p_id ).'">'.$p_id.'</a>';
}
# --------------------
# return the name and GET parameters of a bug UPDATE page for the given bug
# account for the user preference and site override
function get_bug_update_link_plain( $p_id ) {
return get_bug_update_page().'?f_id='.$p_id;
}
# --------------------
# return the name of a bug update page for the user
# return the name of a bug UPDATE page for the user
# account for the user preference and site override
function get_bug_update_page() {
global $g_show_update;

switch ( $g_show_update ) {
switch ( config_get( 'show_update' ) ) {
case BOTH:
if ( ON == current_user_get_pref( 'advanced_update' ) ) {
return 'bug_update_advanced_page.php';
Expand Down

0 comments on commit b20a812

Please sign in to comment.