Skip to content

Commit

Permalink
* core/bug_api.php
Browse files Browse the repository at this point in the history
  (bug_cache_row): cache the fact that the bug doesn't exist
  (bug_text_cache_row): cache the fact that the bug text doesn't exist

* core/project_api.php
  (project_cache_row): cache the fact that the project doesn't exist


git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk@1842 f5dc347c-c33d-0410-90a0-b07cc1902cb9
  • Loading branch information
Julian Fitzell committed Feb 15, 2003
1 parent b8a6b82 commit 9e5d8cf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 5 additions & 1 deletion core/bug_api.php
Expand Up @@ -6,7 +6,7 @@
# See the README and LICENSE files for details

# --------------------------------------------------------
# $Id: bug_api.php,v 1.33 2003-02-10 23:48:28 jfitzell Exp $
# $Id: bug_api.php,v 1.34 2003-02-15 07:49:00 jfitzell Exp $
# --------------------------------------------------------

$t_core_dir = dirname( __FILE__ ).DIRECTORY_SEPARATOR;
Expand Down Expand Up @@ -91,6 +91,8 @@ function bug_cache_row( $p_bug_id, $p_trigger_errors=true ) {
$result = db_query( $query );

if ( 0 == db_num_rows( $result ) ) {
$g_cache_bug[$c_bug_id] = false;

if ( $p_trigger_errors ) {
trigger_error( ERROR_BUG_NOT_FOUND, ERROR );
} else {
Expand Down Expand Up @@ -144,6 +146,8 @@ function bug_text_cache_row( $p_bug_id, $p_trigger_errors=true ) {
$result = db_query( $query );

if ( 0 == db_num_rows( $result ) ) {
$g_cache_bug_text[$c_bug_id] = false;

if ( $p_trigger_errors ) {
trigger_error( ERROR_BUG_NOT_FOUND, ERROR );
} else {
Expand Down
4 changes: 3 additions & 1 deletion core/project_api.php
Expand Up @@ -6,7 +6,7 @@
# See the README and LICENSE files for details

# --------------------------------------------------------
# $Id: project_api.php,v 1.31 2003-02-11 08:59:33 jfitzell Exp $
# $Id: project_api.php,v 1.32 2003-02-15 07:49:00 jfitzell Exp $
# --------------------------------------------------------

$t_core_dir = dirname( __FILE__ ).DIRECTORY_SEPARATOR;
Expand Down Expand Up @@ -51,6 +51,8 @@ function project_cache_row( $p_project_id, $p_trigger_errors=true ) {
$result = db_query( $query );

if ( 0 == db_num_rows( $result ) ) {
$g_cache_project[(int)$p_project_id] = false;

if ( $p_trigger_errors ) {
trigger_error( ERROR_PROJECT_NOT_FOUND, ERROR );
} else {
Expand Down

0 comments on commit 9e5d8cf

Please sign in to comment.