From 2fdd9a9757b7f5ea2c48d417fa5f7b7ed504f42c Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Mon, 23 Feb 2004 10:48:46 +0000 Subject: [PATCH] Use ZOOM_resultset_sort for yaz_sort. Require YAZ 2.0.13 or later. --- ext/yaz/config.m4 | 6 +++--- ext/yaz/php_yaz.c | 9 ++++++--- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/ext/yaz/config.m4 b/ext/yaz/config.m4 index 5f1a950b90..c6a950ca5c 100644 --- a/ext/yaz/config.m4 +++ b/ext/yaz/config.m4 @@ -23,14 +23,14 @@ if test "$PHP_YAZ" != "no"; then AC_DEFINE(HAVE_YAZ,1,[Whether you have YAZ]) . $yazconfig - dnl Check version (2.0.6 or greater required) + dnl Check version (2.0.13 or greater required) AC_MSG_CHECKING([for YAZ version]) yaz_version=`echo $YAZVERSION | awk 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'` echo $yaz_version - if test "$yaz_version" -ge 2000006; then + if test "$yaz_version" -ge 2000013; then AC_MSG_RESULT([$YAZVERSION]) else - AC_MSG_ERROR([YAZ version 2.0.6 or later required.]) + AC_MSG_ERROR([YAZ version 2.0.13 or later required.]) fi for c in $YAZLIB; do diff --git a/ext/yaz/php_yaz.c b/ext/yaz/php_yaz.c index 6aecca60bd..8497283846 100644 --- a/ext/yaz/php_yaz.c +++ b/ext/yaz/php_yaz.c @@ -33,9 +33,9 @@ #include #ifndef YAZ_VERSIONL -#error YAZ version 2.0.6 or later must be used. -#elif YAZ_VERSIONL < 0x020006 -#error YAZ version 2.0.6 or later must be used. +#error YAZ version 2.0.13 or later must be used. +#elif YAZ_VERSIONL < 0x02000D +#error YAZ version 2.0.13 or later must be used. #endif #ifdef PHP_WIN32 @@ -1267,6 +1267,9 @@ PHP_FUNCTION(yaz_sort) convert_to_string_ex(pval_criteria); xfree(p->sort_criteria); p->sort_criteria = xstrdup((*pval_criteria)->value.str.val); + if (p->zoom_set) + ZOOM_resultset_sort(p->zoom_set, "yaz", + (*pval_criteria)->value.str.val); } release_assoc(p); } -- 2.50.1