cvs: php4 /ext/yaz php_yaz.c

From: Date: Wed, 18 Apr 2001 15:03:24 +0000
Subject: cvs: php4 /ext/yaz php_yaz.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-5155@lists.php.net to get a copy of this message
dickmeiss Wed Apr 18 08:03:24 2001 EDT Modified files: /php4/ext/yaz php_yaz.c Log: Function yaz_record returns database for record if type is "database". Index: php4/ext/yaz/php_yaz.c diff -u php4/ext/yaz/php_yaz.c:1.14 php4/ext/yaz/php_yaz.c:1.15 --- php4/ext/yaz/php_yaz.c:1.14 Tue Mar 13 09:04:05 2001 +++ php4/ext/yaz/php_yaz.c Wed Apr 18 08:03:23 2001 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_yaz.c,v 1.14 2001/03/13 17:04:05 dickmeiss Exp $ */ +/* $Id: php_yaz.c,v 1.15 2001/04/18 15:03:23 dickmeiss Exp $ */ #include "php.h" @@ -244,6 +244,7 @@ #ifdef ZTS tsrm_mutex_unlock (yaz_mutex); #endif + php_error(E_WARNING, "Invalid YAZ handle"); return 0; } return assoc; @@ -492,6 +493,7 @@ } if (t->action) (*t->action) (t); + t->action = 0; } break; case Z_APDU_searchResponse: @@ -1193,7 +1195,6 @@ p = get_assoc (id); if (!p) { - zend_error(E_WARNING, "get_assoc failed for present"); RETURN_FALSE; } p->action = 0; @@ -1219,7 +1220,8 @@ for (i = 0; i<MAX_ASSOC; i++) { Yaz_Association p = shared_associations[i]; - if (!p || p->order != order_associations || !p->action) + if (!p || p->order != order_associations || !p->action + || p->mask_select) continue; if (!p->cs) { @@ -1649,6 +1651,11 @@ if (ent && ent->desc) RETVAL_STRING(ent->desc, 1); } + else if (!strcmp (type, "database")) + { + if (npr->databaseName) + RETVAL_STRING(npr->databaseName, 1); + } else if (!strcmp (type, "string")) { if (r->which == Z_External_sutrs && ent->value == VAL_SUTRS) @@ -2201,8 +2208,13 @@ zend_hash_move_forward_ex(ht, &pos)) { ulong idx; +#if PHP_API_VERSION > 20010101 int type = zend_hash_get_current_key_ex(ht, &key, 0, &idx, 0, &pos); +#else + int type = zend_hash_get_current_key_ex(ht, &key, 0, + &idx, &pos); +#endif if (type != HASH_KEY_IS_STRING || Z_TYPE_PP(ent) != IS_STRING) continue; ccl_qual_fitem(p->ccl_parser->bibset, (*ent)->value.str.val, key);

« previous php.cvs (#5155) next »