@- Fixed a bug in ODBC error reporting (Zeev)

@- Added PHP_Logo_GUID() and Zend_Logo_GUID() functions, that return the GUIDs
@  of the PHP and Zend logos used in phpinfo() (Zeev)
This commit is contained in:
Zeev Suraski 1999-12-21 20:35:43 +00:00
parent f0888ccaef
commit e538fcbf10
5 changed files with 22 additions and 3 deletions

View file

@ -465,7 +465,7 @@ void ODBC_SQL_ERROR(HENV henv, HDBC conn, HSTMT stmt, char *func)
ODBCLS_FETCH();
do {
SQLError(henv, conn, stmt, state,
ret = SQLError(henv, conn, stmt, state,
&error, errormsg, sizeof(errormsg)-1, &errormsgsize);
if (func) {
php_error(E_WARNING, "SQL error: %s, SQL state %s in %s",

View file

@ -113,6 +113,8 @@ function_entry basic_functions[] = {
PHP_FE(phpinfo, NULL)
PHP_FE(phpversion, NULL)
PHP_FE(phpcredits, NULL)
PHP_FE(php_logo_guid, NULL)
PHP_FE(zend_logo_guid, NULL)
PHP_FE(strspn, NULL)
PHP_FE(strcspn, NULL)

View file

@ -510,6 +510,18 @@ PHP_FUNCTION(phpcredits)
/* }}} */
PHP_FUNCTION(php_logo_guid)
{
RETURN_STRINGL(PHP_LOGO_GUID, sizeof(PHP_LOGO_GUID)-1, 1);
}
PHP_FUNCTION(zend_logo_guid)
{
RETURN_STRINGL(ZEND_LOGO_GUID, sizeof(ZEND_LOGO_GUID)-1, 1);
}
/*
* Local variables:
* tab-width: 4

View file

@ -52,9 +52,14 @@
#define PHP_CREDITS_FULLPAGE (1<<3)
#define PHP_CREDITS_ALL 0xFFFFFFFF
#define PHP_LOGO_GUID "PHPE9568F34-D428-11d2-A769-00AA001ACF42"
#define ZEND_LOGO_GUID "PHPE9568F35-D428-11d2-A769-00AA001ACF42"
PHP_FUNCTION(phpversion);
PHP_FUNCTION(phpinfo);
PHP_FUNCTION(phpcredits);
PHP_FUNCTION(php_logo_guid);
PHP_FUNCTION(zend_logo_guid);
PHPAPI void php_print_info(int flag);
PHPAPI void php_print_credits(int flag);

View file

@ -1224,13 +1224,13 @@ PHPAPI void php_execute_script(zend_file_handle *primary_file CLS_DC ELS_DC PLS_
if (SG(request_info).query_string && SG(request_info).query_string[0]=='='
&& PG(expose_php)) {
if (!strcmp(SG(request_info).query_string+1, "PHPE9568F34-D428-11d2-A769-00AA001ACF42")) {
if (!strcmp(SG(request_info).query_string+1, PHP_LOGO_GUID)) {
char *header_line = estrndup(CONTEXT_TYPE_IMAGE_GIF, sizeof(CONTEXT_TYPE_IMAGE_GIF));
php4i_add_header_information(header_line, sizeof(CONTEXT_TYPE_IMAGE_GIF)-1);
PHPWRITE(php4_logo, sizeof(php4_logo));
return;
} else if (!strcmp(SG(request_info).query_string+1, "PHPE9568F35-D428-11d2-A769-00AA001ACF42")) {
} else if (!strcmp(SG(request_info).query_string+1, ZEND_LOGO_GUID)) {
char *header_line = estrndup(CONTEXT_TYPE_IMAGE_GIF, sizeof(CONTEXT_TYPE_IMAGE_GIF));
php4i_add_header_information(header_line, sizeof(CONTEXT_TYPE_IMAGE_GIF)-1);