15,16c15,26
<   $zend_status = $zend_ready ? 'ok' : 'error';
<   $zend_version = $zend_ready ? $zend_ready : t('Not found');
---
> 	
> 	if (!$zend_ready && ($system_available = zend_system_path_locator())) {
> 		$zend_status = 'ok';
> 	  $zend_version = $system_available['zend_version'];
> 		$zend_path = $system_available['zend_path'];				
> 	}
> 	else {
>     $zend_status = $zend_ready ? 'ok' : 'error';
>     $zend_version = $zend_ready ? $zend_ready : t('Not found');	
> 		$zend_path = zend_get_path();
> 	}
> 
21c31
<     '#default_value' => zend_get_path(),
---
>     '#default_value' => $zend_path,
25a36,61
> 
> 
> /**
>  * Scans the include paths to see if the Zend Framework is available.
>  * 
>  * @return
>  *   Array or FALSE depending on if the Zend Framework was found.   
>  */ 
> function zend_system_path_locator() {
> 	$zend_install_info = array();
> 	
> 	// get the PHP Include_Path
> 	$pathArray = explode( PATH_SEPARATOR, get_include_path() );
> 	
> 	// loop over the paths until we find ZF
> 	foreach ($pathArray as $path){
> 		if (@include_once($path .'Zend/Version.php')) {
> 			$zend_install_info['zend_path'] = $path;
> 			$zend_install_info['zend_version'] = Zend_Version::VERSION;
> 			return $zend_install_info;
> 		}	
>   }
> 	// didn't find it!
> 	return FALSE;
> } // function zend_system_path_locator
> 	
\ No newline at end of file
