sniper Sun Apr 15 22:52:07 2007 UTC
Modified files: (Branch: PHP_5_2)
/php-src/sapi/cgi cgi_main.c
Log:
- Allow using syntax highlighting under FastCGI mode.
http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/cgi_main.c?r1=1.267.2.15.2.32&r2=1.267.2.15.2.33&diff_format=u
Index: php-src/sapi/cgi/cgi_main.c
diff -u php-src/sapi/cgi/cgi_main.c:1.267.2.15.2.32
php-src/sapi/cgi/cgi_main.c:1.267.2.15.2.33
--- php-src/sapi/cgi/cgi_main.c:1.267.2.15.2.32 Thu Mar 29 18:47:04 2007
+++ php-src/sapi/cgi/cgi_main.c Sun Apr 15 22:52:07 2007
@@ -21,7 +21,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: cgi_main.c,v 1.267.2.15.2.32 2007/03/29 18:47:04 pollita Exp $ */
+/* $Id: cgi_main.c,v 1.267.2.15.2.33 2007/04/15 22:52:07 sniper Exp $ */
#include "php.h"
#include "php_globals.h"
@@ -1224,6 +1224,10 @@
}
break;
#endif
+ case 's': /* generate highlighted HTML from source */
+ behavior = PHP_MODE_HIGHLIGHT;
+ break;
+
}
}
@@ -1524,10 +1528,6 @@
no_headers = 1;
break;
- case 's': /* generate highlighted HTML from
source */
- behavior = PHP_MODE_HIGHLIGHT;
- break;
-
case 'v': /* show php version & quit */
no_headers = 1;
if
(php_request_startup(TSRMLS_C) == FAILURE) {
@@ -1737,9 +1737,17 @@
if (open_file_for_scanning(&file_handle
TSRMLS_CC) == SUCCESS) {
php_get_highlight_struct(&syntax_highlighter_ini);
zend_highlight(&syntax_highlighter_ini TSRMLS_CC);
- fclose(file_handle.handle.fp);
- php_end_ob_buffers(1 TSRMLS_CC);
+#if PHP_FASTCGI
+ if (!fastcgi)
+#endif
+ {
+
fclose(file_handle.handle.fp);
+ php_end_ob_buffers(1
TSRMLS_CC);
+ }
}
+#if PHP_FASTCGI
+ if (!fastcgi)
+#endif
return SUCCESS;
}
break;
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php