Permalink
Browse files

Adds support for eZ Find configurations using eZ Find's basicAuth

authentication setup
  • Loading branch information...
benkmugo committed Jan 24, 2019
1 parent f7ab221 commit c5dad943e2bc11eafd2c7089f22fdf6121223ccc
Showing with 16 additions and 0 deletions.
  1. +16 −0 modules/ezfind/index.php
@@ -354,6 +354,22 @@ private function getSolrBaseURL()
{
$ini = eZINI::instance( 'solr.ini' );
$url = $ini->variable( 'SolrBase', 'SearchServerURI' );
$authentication = $ini->variable( 'SolrBase', 'SearchServerAuthentication' );
$userPass = $ini->variable( 'SolrBase', 'SearchServerUserPass' );
if( $authentication === 'enabled' )
{
if( $userPass )
{
$url = str_replace( '://', '://' . $userPass . '@', $url );
}
else
{
echo "SearchServerAuthentication is enabled, but SearchServerUserPass is not set\n";
}
}
if( "/" != substr( $url, strlen($url)-1 ) )
{
$url .= "/";

0 comments on commit c5dad94

Please sign in to comment.