}
buffer = cpdf_getBufferForPDF(pdf, &lenght);
- php_header();
+
php_write(buffer, lenght);
RETURN_TRUE;
php_error(E_WARNING, "%s: unable to open temporary file", get_active_function_name());
RETURN_FALSE;
}
- output = php_header();
- if (output) {
- switch(image_type) {
- case PHP_GDIMG_TYPE_JPG:
- (*func_p)(im, tmp, q);
- break;
- case PHP_GDIMG_TYPE_WBM:
- if(q<0||q>255) {
- php_error(E_WARNING, "%s: invalid threshold value '%d'. It must be between 0 and 255",get_active_function_name(), q);
- }
- (*func_p)(im, q, tmp);
- break;
- default:
- (*func_p)(im, tmp);
- break;
- }
- fseek(tmp, 0, SEEK_SET);
+ switch(image_type) {
+ case PHP_GDIMG_TYPE_JPG:
+ (*func_p)(im, tmp, q);
+ break;
+ case PHP_GDIMG_TYPE_WBM:
+ if(q<0||q>255) {
+ php_error(E_WARNING, "%s: invalid threshold value '%d'. It must be between 0 and 255",get_active_function_name(), q);
+ }
+ (*func_p)(im, q, tmp);
+ break;
+ default:
+ (*func_p)(im, tmp);
+ break;
+ }
+
+ fseek(tmp, 0, SEEK_SET);
+
#if APACHE && defined(CHARSET_EBCDIC)
- SLS_FETCH();
- /* This is a binary file already: avoid EBCDIC->ASCII conversion */
- ap_bsetflag(php3_rqst->connection->client, B_EBCDIC2ASCII, 0);
+ /* XXX this is unlikely to work any more thies@thieso.net */
+
+ SLS_FETCH();
+ /* This is a binary file already: avoid EBCDIC->ASCII conversion */
+ ap_bsetflag(php3_rqst->connection->client, B_EBCDIC2ASCII, 0);
#endif
- while ((b = fread(buf, 1, sizeof(buf), tmp)) > 0) {
- php_write(buf, b);
- }
- }
+ while ((b = fread(buf, 1, sizeof(buf), tmp)) > 0) {
+ php_write(buf, b);
+ }
+
fclose(tmp);
/* the temporary file is automatically deleted */
}
ctx = gdNewFileCtx(fp);
} else {
- if(!php_header()) {
- RETURN_TRUE;
- }
ctx = emalloc(sizeof(gdIOCtx));
ctx->putC = _php_image_output_putc;
ctx->putBuf = _php_image_output_putbuf;
ctx->free = _php_image_output_ctxfree;
#if APACHE && defined(CHARSET_EBCDIC)
+ /* XXX this is unlikely to work any more thies@thieso.net */
SLS_FETCH();
/* This is a binary file already: avoid EBCDIC->ASCII conversion */
ap_bsetflag(php3_rqst->connection->client, B_EBCDIC2ASCII, 0);
RETURN_FALSE;
}
- if(php_header())
- php_write(ptr->data, ptr->size);
+ php_write(ptr->data, ptr->size);
RETURN_TRUE;
}
GET_BLOB_ID_ARG(blob_arg, ib_blob_id);
- if (!php_header()) {
- RETURN_FALSE;
- }
-
if (ib_blob_id) { /*not null ?*/
if (isc_open_blob(IB_STATUS, &ib_blob_id->link, &ib_blob_id->trans_handle,
vsnprintf(buffer, sizeof(buffer)-1, format, args);
va_end(args);
buffer[sizeof(buffer)-1] = '\0';
- if (php_header()) {
- php_printf("OCIDebug: %s<br>\n", buffer);
- }
+ php_printf("OCIDebug: %s<br>\n", buffer);
}
}
goto bail;
}
} else {
- if (php_header()) {
- PHPWRITE(buffer,toread);
- }
+ PHPWRITE(buffer,toread);
}
length -= toread;
static size_t pdf_flushwrite(PDF *p, void *data, size_t size)
{
- if(php_header()) return(php_write(data, size));
+ return(php_write(data, size));
return 0;
}
rsrc_id = ZEND_REGISTER_RESOURCE(NULL,fp,php_file_le_fopen());
}
- if (php_header()) {
- size = php_passthru_fd(socketd, fp, issock);
- }
+ size = php_passthru_fd(socketd, fp, issock);
zend_list_delete(rsrc_id);
socketd=*(int*)what;
}
- size = 0;
- if (php_header()) { /* force headers if not already sent */
- size = php_passthru_fd(socketd, (FILE*) what, issock);
- }
+ size = php_passthru_fd(socketd, (FILE*) what, issock);
zend_list_delete((*arg1)->value.lval);
+
RETURN_LONG(size);
}
/* }}} */
RETURN_FALSE;
}
- if (spool > 0)
- if (!php_header()){ /* we got a HEAD request. */
- if (spool == 2){
- RETURN_TRUE; /* we only wanted to spool - report success. */
- } else
- if (spool == 1) {
- spool = 0; /* we wanted the file to be spooled/returned, just return it */
- }
- }
-
len = (*iptcdata)->value.str.len;
if (spool < 2) {