Skip to content

Commit

Permalink
M manage_custom_field_edit_page.php
Browse files Browse the repository at this point in the history
- Fixed #2938: Double quotes not handled correctly in manage_custom_field_edit_page.php

M core/compress_api.php
- Added checks to detect cases where compress_start() is called twice, or
compress_stop() without compress_start().


git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk@1890 f5dc347c-c33d-0410-90a0-b07cc1902cb9
  • Loading branch information
vboctor committed Feb 16, 2003
1 parent bc03312 commit 637211d
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
19 changes: 18 additions & 1 deletion core/compress_api.php
Expand Up @@ -6,7 +6,7 @@
# See the README and LICENSE files for details

# --------------------------------------------------------
# $Id: compress_api.php,v 1.6 2003-02-15 01:25:49 jfitzell Exp $
# $Id: compress_api.php,v 1.7 2003-02-16 23:16:34 vboctor Exp $
# --------------------------------------------------------

###########################################################################
Expand All @@ -17,6 +17,8 @@
# access level checks.
###########################################################################

$g_compression_started = false;

# ----------------
# Check if compression should be enabled.
function compress_is_enabled() {
Expand All @@ -25,14 +27,29 @@ function compress_is_enabled() {
# ----------------
# Start output buffering with compression.
function compress_start() {
global $g_compression_started;

if ($g_compression_started) {
# @@@ consider triggering an error
return;
}

if ( compress_is_enabled() ) {
ob_implicit_flush( 0 );
ob_start( 'ob_gzhandler' );
$g_compression_started = true;
}
}
# ----------------
# Stop buffering and flush buffer contents.
function compress_stop() {
global $g_compression_started;

if (!$g_compression_started) {
# @@@ consider triggering an error
return;
}

if ( compress_is_enabled() ) {
ob_end_flush();
ob_implicit_flush();
Expand Down
5 changes: 3 additions & 2 deletions manage_custom_field_edit_page.php
Expand Up @@ -6,7 +6,7 @@
# See the README and LICENSE files for details

# --------------------------------------------------------
# $Id: manage_custom_field_edit_page.php,v 1.12 2003-02-16 13:20:04 jlatour Exp $
# $Id: manage_custom_field_edit_page.php,v 1.13 2003-02-16 23:16:32 vboctor Exp $
# --------------------------------------------------------
?>
<?php
Expand All @@ -29,7 +29,8 @@

print_manage_menu( 'manage_custom_field_edit_page.php' );

$t_definition = custom_field_get_definition( $f_field_id )
$t_definition = custom_field_get_definition( $f_field_id );
$t_definition['name'] = string_attribute( $t_definition['name'] );
?>
<br />
<div align="center">
Expand Down

0 comments on commit 637211d

Please sign in to comment.