cvs: php4 /sapi/apache sapi_apache.c
| From: | Moriyoshi Koizumi | Date: | Fri, 16 May 2003 23:08:23 +0000 |
| Subject: | cvs: php4 /sapi/apache sapi_apache.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-20977@lists.php.net to get a copy of this message | ||
moriyoshi Fri May 16 19:08:23 2003 EDT
Modified files:
/php4/sapi/apache sapi_apache.c
Log:
Fixed a syntax highlighter problem that happens when output buffering is turned
on
Index: php4/sapi/apache/sapi_apache.c
diff -u php4/sapi/apache/sapi_apache.c:1.42 php4/sapi/apache/sapi_apache.c:1.43
--- php4/sapi/apache/sapi_apache.c:1.42 Tue Mar 18 07:06:08 2003
+++ php4/sapi/apache/sapi_apache.c Fri May 16 19:08:23 2003
@@ -19,7 +19,7 @@
| Stig Bakken <ssb@php.net> |
+----------------------------------------------------------------------+
*/
-/* $Id: sapi_apache.c,v 1.42 2003/03/18 12:06:08 ssb Exp $ */
+/* $Id: sapi_apache.c,v 1.43 2003/05/16 23:08:23 moriyoshi Exp $ */
#include "php_apache_http.h"
@@ -27,6 +27,7 @@
*/
int apache_php_module_main(request_rec *r, int display_source_mode TSRMLS_DC)
{
+ int retval = OK;
zend_file_handle file_handle;
if (php_request_startup(TSRMLS_C) == FAILURE) {
@@ -40,10 +41,8 @@
zend_syntax_highlighter_ini syntax_highlighter_ini;
php_get_highlight_struct(&syntax_highlighter_ini);
- if (highlight_file(SG(request_info).path_translated, &syntax_highlighter_ini TSRMLS_CC)){
- return OK;
- } else {
- return NOT_FOUND;
+ if (highlight_file(SG(request_info).path_translated, &syntax_highlighter_ini TSRMLS_CC) !=
SUCCESS) {
+ retval = NOT_FOUND;
}
} else {
file_handle.type = ZEND_HANDLE_FILENAME;
@@ -61,7 +60,7 @@
php_request_shutdown(NULL);
} zend_end_try();
- return (OK);
+ return retval;
}
/* }}} */