Skip to content

Commit

Permalink
Merge pull request ezsystems#1128 from yannoz/master
Browse files Browse the repository at this point in the history
Fix EZP-23822: PathPrefix in ezpLanguageSwitcher
  • Loading branch information
yannickroger committed Dec 19, 2014
2 parents 4f2f457 + e2888c7 commit 2ffed2e
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions kernel/private/classes/ezplanguageswitcher.php
Expand Up @@ -51,7 +51,6 @@ function __construct( $params = null )
/**
* Get instance siteaccess specific site.ini
*
* @param string $sa
* @return void
*/
protected function getSiteAccessIni()
Expand Down Expand Up @@ -142,7 +141,7 @@ protected static function removePathPrefixIfNeeded( eZINI $saIni, &$url )
$pathPrefix = $saIni->variable( 'SiteAccessSettings', 'PathPrefix' );
if ( !empty( $pathPrefix ) )
{
if ( strpos( $url, $pathPrefix . '/' ) === 0 )
if ( ( strpos( $url, $pathPrefix . '/' ) === 0 ) || ( $pathPrefix === $url ) )
{
$url = substr( $url, strlen( $pathPrefix ) + 1 );
}
Expand All @@ -159,8 +158,6 @@ protected static function removePathPrefixIfNeeded( eZINI $saIni, &$url )
/**
* Returns URL alias for the specified <var>$locale</var>
*
* @param string $url
* @param string $locale
* @return void
*/
public function destinationUrl()
Expand Down

0 comments on commit 2ffed2e

Please sign in to comment.