Skip to content

Commit

Permalink
* core/icon_api.php:
Browse files Browse the repository at this point in the history
   Print   instead of a empty image if no priority given.
	 This seriously cuts down HTML size.


git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk@2133 f5dc347c-c33d-0410-90a0-b07cc1902cb9
  • Loading branch information
int2str committed Mar 31, 2003
1 parent 966bf92 commit 3adf91d
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions core/icon_api.php
Expand Up @@ -6,7 +6,7 @@
# See the README and LICENSE files for details

# --------------------------------------------------------
# $Id: icon_api.php,v 1.7 2003-02-09 22:15:17 jfitzell Exp $
# $Id: icon_api.php,v 1.8 2003-03-31 07:10:11 int2str Exp $
# --------------------------------------------------------

###########################################################################
Expand All @@ -18,9 +18,9 @@
# --------------------
# Status to icon mapping
$g_status_icon_arr = array (
NONE => 'mantis-space.gif',
LOW => 'mantis-space.gif',
NORMAL => 'mantis-space.gif',
NONE => '',
LOW => '',
NORMAL => '',
HIGH => 'priority_1.gif',
URGENT => 'priority_2.gif',
IMMEDIATE => 'priority_3.gif'
Expand All @@ -43,16 +43,19 @@
###########################################################################
# --------------------
# prints the staus icon
function print_status_icon( $p_icon ) {
function icon_get_status_icon( $p_icon ) {
global $g_icon_path, $g_status_icon_arr;

$t_none = NONE;
if ( !is_blank( $g_status_icon_arr[$p_icon] ) ) {
PRINT "<img src=\"$g_icon_path$g_status_icon_arr[$p_icon]\" alt=\"\" />";
return "<img src=\"$g_icon_path$g_status_icon_arr[$p_icon]\" alt=\"\" />";
} else {
PRINT "<img src=\"$g_icon_path$g_status_icon_arr[$t_none]\" alt=\"\" />";
return "&nbsp;";
}
}
function print_status_icon( $p_icon ) {
echo icon_get_status_icon( $p_icon );
}
# --------------------
# The input $p_dir is either ASC or DESC
# The inputs $p_sort_by and $p_field are compared to see if they match
Expand Down

0 comments on commit 3adf91d

Please sign in to comment.