--- xapian.module.orig 2008-06-01 08:32:15.000000000 -0400 +++ xapian.module 2008-06-01 08:33:03.000000000 -0400 @@ -49,19 +49,27 @@ } /** - * Enter description here... + * Implementation of hook_requirements. Report Xapian bindings version if + * available, otherwise display include error. * * @param int $phase * @return array */ function xapian_requirements($phase) { - $available = xapian_available(); - $severity = ($available) ? REQUIREMENT_OK : REQUIREMENT_ERROR; + if (xapian_available()) { + $severity = REQUIREMENT_OK; + // Get Xapian bindings version, supporting PHP4 and PHP5 methods + $version = (function_exists('xapian_version_string')) ? xapian_version_string() : Xapian::version_string(); + } + else { + $severity = REQUIREMENT_ERROR; + $version = $GLOBALS['xapian_include_error']; + } return array( 'xapian' => array( 'title' => t('Xapian bindings'), - 'value' => $GLOBALS['xapian_include_error'], + 'value' => $version, 'severity' => $severity, ), );