lib/ezutils/classes/ezsys.php
public static function indexFile( $withAccessPath = true )
    {
        $sys  = self::instance();
        $text = $sys->IndexFile;

        if ( $withAccessPath && ( isset( $sys->AccessPath['siteaccess']['url'][0] ) || isset( $sys->AccessPath['path']['url'][0] ) ) )
        {
            $ini = eZINI::instance();
            if ( isset( $sys->AccessPath['siteaccess']['url'][0] ) &&
                 $ini->variable( 'SiteAccessSettings', 'RemoveSiteAccessIfDefaultAccess' ) === 'enabled' )
            {
                $defaultAccess = $ini->variable( 'SiteSettings', 'DefaultAccess' );
                // 1st is proper match where code has used updated api as of 4.4, do not use siteaccess
                if ( $sys->AccessPath['siteaccess']['name'] === $defaultAccess )
                    $accessPath = implode( '/', $sys->AccessPath['path']['url'] );
                // 2nd is for compatability with older code that used eZSys api withouth defining scopes, shift default siteaccess path
                elseif ( $sys->AccessPath['siteaccess']['name'] === 'undefined' && $sys->AccessPath['siteaccess']['url'][0] === $defaultAccess )
                {
                    $accessPathArray = $sys->AccessPath;
                    array_shift( $accessPathArray['siteaccess']['url'] ); //remove default siteaccess
                    $accessPath = implode( '/', array_merge( $accessPathArray['siteaccess']['url'], $accessPathArray['path']['url'] ) );
                }
                // In case there is no default siteaccess match use full url
                else
                    $accessPath = implode( '/', array_merge( $sys->AccessPath['siteaccess']['url'], $sys->AccessPath['path']['url'] ) );
            }
            else
            {
                $accessPath = implode( '/', array_merge( $sys->AccessPath['siteaccess']['url'], $sys->AccessPath['path']['url'] ) );
            }

            $text .= '/' . $accessPath;

            // Make sure we never return just a single '/' in case where siteaccess was shifted
            if ( $text === '/' )
                $text = '';
        }
        return $text;
    }
public static function indexFile( $withAccessPath = true )
    {
        $sys  = self::instance();
        $text = $sys->IndexFile;

        if ( $withAccessPath && ( isset( $sys->AccessPath['siteaccess']['url'][0] ) || isset( $sys->AccessPath['path']['url'][0] ) ) )
        {
            $ini = eZINI::instance();
            if ( isset( $sys->AccessPath['siteaccess']['url'][0] ) &&
                 $ini->variable( 'SiteAccessSettings', 'RemoveSiteAccessIfDefaultAccess' ) === 'enabled' )
            {
                $defaultAccess = $ini->variable( 'SiteSettings', 'DefaultAccess' );
                // 1st is proper match where code has used updated api as of 4.4, do not use siteaccess
                if ( $sys->AccessPath['siteaccess']['name'] === $defaultAccess )
                    $accessPath = implode( '/', $sys->AccessPath['path']['url'] );
                // 2nd is for compatability with older code that used eZSys api withouth defining scopes, shift default siteaccess path
                elseif ( $sys->AccessPath['siteaccess']['name'] === 'undefined' && $sys->AccessPath['siteaccess']['url'][0] === $defaultAccess )
                {
                    $accessPathArray = $sys->AccessPath;
                    array_shift( $accessPathArray['siteaccess']['url'] ); //remove default siteaccess
                    $accessPath = implode( '/', array_merge( $accessPathArray['siteaccess']['url'], $accessPathArray['path']['url'] ) );
                }
                // In case there is no default siteaccess match use full url
                else
                    $accessPath = implode( '/', array_merge( $sys->AccessPath['siteaccess']['url'], $sys->AccessPath['path']['url'] ) );
            }
            else
            {
                $accessPath = implode( '/', array_merge( $sys->AccessPath['siteaccess']['url'], $sys->AccessPath['path']['url'] ) );
            }

            $text .= '/' . $accessPath;

            // Make sure we never return just a single '/' in case where siteaccess was shifted
            if ( $text === '/' )
                $text = '';
        }
        return $text;
    }
public static function indexFile ( $ withAccessPath = true ) { $ sys = self :: instance ( ) ; $ text = $ sys -> IndexFile ; if ( $ withAccessPath && ( isset ( $ sys -> AccessPath [ 'siteaccess' ] [ 'url' ] [ 0 ] ) || isset ( $ sys -> AccessPath [ 'path' ] [ 'url' ] [ 0 ] ) ) ) { $ ini = eZINI :: instance ( ) ; if ( isset ( $ sys -> AccessPath [ 'siteaccess' ] [ 'url' ] [ 0 ] ) && $ ini -> variable ( 'SiteAccessSettings' , 'RemoveSiteAccessIfDefaultAccess' ) === 'enabled' ) { $ defaultAccess = $ ini -> variable ( 'SiteSettings' , 'DefaultAccess' ) ; // 1st is proper match where code has used updated api as of 4.4, do not use siteaccess if ( $ sys -> AccessPath [ 'siteaccess' ] [ 'name' ] === $ defaultAccess ) $ accessPath = implode ( '/' , $ sys -> AccessPath [ 'path' ] [ 'url' ] ) ; // 2nd is for compatability with older code that used eZSys api withouth defining scopes, shift default siteaccess path elseif ( $ sys -> AccessPath [ 'siteaccess' ] [ 'name' ] === 'undefined' && $ sys -> AccessPath [ 'siteaccess' ] [ 'url' ] [ 0 ] === $ defaultAccess ) { $ accessPathArray = $ sys -> AccessPath ; array_shift ( $ accessPathArray [ 'siteaccess' ] [ 'url' ] ) ; //remove default siteaccess $ accessPath = implode ( '/' , array_merge ( $ accessPathArray [ 'siteaccess' ] [ 'url' ] , $ accessPathArray [ 'path' ] [ 'url' ] ) ) ; } // In case there is no default siteaccess match use full url else $ accessPath = implode ( '/' , array_merge ( $ sys -> AccessPath [ 'siteaccess' ] [ 'url' ] , $ sys -> AccessPath [ 'path' ] [ 'url' ] ) ) ; } else { $ accessPath = implode ( '/' , array_merge ( $ sys -> AccessPath [ 'siteaccess' ] [ 'url' ] , $ sys -> AccessPath [ 'path' ] [ 'url' ] ) ) ; } $ text .= '/' . $ accessPath ; // Make sure we never return just a single '/' in case where siteaccess was shifted if ( $ text === '/' ) $ text = '' ; } return $ text ; }
Returns the filepath for the index file with the access path appended

@param bool $withAccessPath
@return string
Returns the filepath for the index file with the access path appended