|
From: Benjamin C. <bc...@us...> - 2004-06-19 19:57:15
|
Update of /cvsroot/phpbt/phpbt/inc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3139/inc Modified Files: Tag: htmltemplates functions.php Log Message: Fixed a bug with the check_id function Index: functions.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/inc/functions.php,v retrieving revision 1.44.2.5 retrieving revision 1.44.2.6 diff -u -r1.44.2.5 -r1.44.2.6 --- functions.php 18 May 2004 12:59:19 -0000 1.44.2.5 +++ functions.php 19 Jun 2004 19:57:05 -0000 1.44.2.6 @@ -75,7 +75,7 @@ ? $querystart." where ". ($selected ? "(active > 0 or project_id in ($selected))" : 'active > 0'). " order by {$box}_name" - : $querystart." where project_id not in ($restricted_projects)". + : $querystart." where project_id not in ($restricted_projects)". " and ". ($selected ? " (active > 0 or project_id in ($selected))" : 'active > 0'). " order by {$box}_name", @@ -87,7 +87,11 @@ switch($box) { case 'user_filter': - foreach ($STRING['user_filter'] as $k => $v) { + $options = array( + 0 => translate("All Users"), + 1 => translate("Active Users"), + 2 => translate("Inactive Users")); + foreach ($options as $k => $v) { $text .= sprintf("<option value=\"%d\"%s>%s</option>", $k, ($k == $selected ? ' selected' : ''), $v); } @@ -597,7 +601,7 @@ return $plural ? ngettext($string) : gettext($string); } else { @include_once('languages/'.LANGUAGE.'.php'); - if (!empty($_STRING[$string])) return $_STRING[$string]; + if (!empty($STRING[$string])) return $STRING[$string]; else return $string; } } @@ -628,7 +632,7 @@ // Check to make sure a bug is numeric function check_id($id) { - if (!is_numeric($id) or !$id) { + if (!is_numeric($id)) { show_text("Invalid ID"); exit; } |