diff options
author | Sergey Kartashoff <gluke@php.net> | 2002-12-16 19:17:10 +0000 |
---|---|---|
committer | Sergey Kartashoff <gluke@php.net> | 2002-12-16 19:17:10 +0000 |
commit | afa0e1e03e4d77b32be9dd87b704fc0847a8f64c (patch) | |
tree | 75f7059c4ff5918527e224dedad74f43fc8172a1 /ext/mnogosearch/php_mnogo.c | |
parent | 59656cc706a9d3b78e9b254fa69c321a3cccd10c (diff) | |
download | php-git-afa0e1e03e4d77b32be9dd87b704fc0847a8f64c.tar.gz |
- mnogosearch extension updated to compile with mnogosearch-3.2.8
Diffstat (limited to 'ext/mnogosearch/php_mnogo.c')
-rw-r--r-- | ext/mnogosearch/php_mnogo.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/ext/mnogosearch/php_mnogo.c b/ext/mnogosearch/php_mnogo.c index c3bec3c23c..b2403f3f5f 100644 --- a/ext/mnogosearch/php_mnogo.c +++ b/ext/mnogosearch/php_mnogo.c @@ -468,7 +468,9 @@ DLEXPORT PHP_FUNCTION(udm_alloc_agent) UdmVarListReplaceStr(&Env->Vars,"DBAddr",dbaddr); if(UDM_OK!=UdmDBSetAddr(Env->db,dbaddr,UDM_OPEN_MODE_READ)){ sprintf(Env->errstr,"Invalid DBAddr: '%s'",dbaddr); +#if UDM_VERSION_ID <= 30207 Env->errcode=1; +#endif php_error(E_WARNING,"%s(): Invalid DBAddr", get_active_function_name(TSRMLS_C)); RETURN_FALSE; } @@ -519,7 +521,9 @@ DLEXPORT PHP_FUNCTION(udm_alloc_agent) UdmVarListReplaceStr(&Env->Vars,"DBAddr",dbaddr); if(UDM_OK!=UdmDBSetAddr(Env->db,dbaddr,UDM_OPEN_MODE_READ)){ sprintf(Env->errstr,"Invalid DBAddr: '%s'",dbaddr); +#if UDM_VERSION_ID <= 30207 Env->errcode=1; +#endif php_error(E_WARNING,"%s(): Invalid DBAddr", get_active_function_name(TSRMLS_C)); RETURN_FALSE; } @@ -999,6 +1003,8 @@ DLEXPORT PHP_FUNCTION(udm_set_agent_param) case UDM_PARAM_VARDIR: #if UDM_VERSION_ID < 30200 udm_snprintf(Agent->Conf->vardir,sizeof(Agent->Conf->vardir)-1,"%s%s",val,UDMSLASHSTR); +#elif UDM_VERSION_ID >= 30208 + UdmVarListReplaceStr(&Agent->Conf->Vars,"Vardir",val); #elif UDM_VERSION_ID >= 30204 UdmVarListReplaceStr(&Agent->Conf->Vars,"Vardir",val); snprintf(Agent->Conf->vardir,sizeof(Agent->Conf->vardir)-1,"%s%s",val,UDMSLASHSTR); @@ -1717,8 +1723,10 @@ DLEXPORT PHP_FUNCTION(udm_set_agent_param_ex) Agent->Conf->WordParam.min_word_len=atoi(val); } else if (!strcasecmp(var,"MaxWordLen")) { Agent->Conf->WordParam.max_word_len=atoi(val); +#if UDM_VERSION_ID <= 30207 } else if (!strcasecmp(var,"VarDir")) { snprintf(Agent->Conf->vardir,sizeof(Agent->Conf->vardir)-1,"%s%s",val,UDMSLASHSTR); +#endif } RETURN_TRUE; @@ -2171,7 +2179,13 @@ DLEXPORT PHP_FUNCTION(udm_errno) break; } ZEND_FETCH_RESOURCE(Agent, UDM_AGENT *, yyagent, -1, "mnoGoSearch-Agent", le_link); -#if UDM_VERSION_ID >= 30204 +#if UDM_VERSION_ID >= 30208 + if (UdmEnvErrMsg(Agent->Conf) && strlen(UdmEnvErrMsg(Agent->Conf))) { + RETURN_LONG(1); + } else { + RETURN_LONG(0); + } +#elif UDM_VERSION_ID >= 30204 RETURN_LONG(UdmEnvErrCode(Agent->Conf)); #else RETURN_LONG(UdmDBErrorCode(Agent->db)); |