kernel/classes/ezsslzone.php
static function checkModuleView( $module, $view )
    {
        if ( !eZSSLZone::enabled() )
            return;

        $ini = eZINI::instance();
        $viewsModes  = $ini->variable( 'SSLZoneSettings', 'ModuleViewAccessMode' );

        $sslViews      = array_keys( $viewsModes, 'ssl' );
        $keepModeViews = array_keys( $viewsModes, 'keep' );

        $sslPriority      = eZSSLZone::viewIsInArray( $module, $view, $sslViews      );
        $keepModePriority = eZSSLZone::viewIsInArray( $module, $view, $keepModeViews );

        if ( $sslPriority && $keepModePriority && $sslPriority == $keepModePriority )
        {
            eZDebug::writeError( "Configuration error: view $module/$view is defined both as 'ssl' and 'keep'",
                                 'eZSSLZone' );
            return;
        }

        /* If the view belongs to the list of views we should not change access mode for,
         * then do nothing.
         * (however, the view may do access mode switch itself later)
         */
        if ( $keepModePriority > $sslPriority )
        {
            eZDebugSetting::writeDebug( 'kernel-ssl-zone', 'Keeping current access mode...' );
            return;
        }

        /* Otherwise we look if the view is in the list of SSL views,
         * and if it is, we switch to SSL. Else, if it's not, we switch to plain HTTP.
         */
        $inSSL = ( $sslPriority > 0 );

        eZDebugSetting::writeDebug( 'kernel-ssl-zone',
                                    ( isset( $inSSL ) ? ( $inSSL?'yes':'no') : 'dunno' ),
                                    'Should we use SSL for this view?' );

        // Change access mode if we need to.
        eZSSLZone::switchIfNeeded( $inSSL );
    }
static function checkModuleView( $module, $view )
    {
        if ( !eZSSLZone::enabled() )
            return;

        $ini = eZINI::instance();
        $viewsModes  = $ini->variable( 'SSLZoneSettings', 'ModuleViewAccessMode' );

        $sslViews      = array_keys( $viewsModes, 'ssl' );
        $keepModeViews = array_keys( $viewsModes, 'keep' );

        $sslPriority      = eZSSLZone::viewIsInArray( $module, $view, $sslViews      );
        $keepModePriority = eZSSLZone::viewIsInArray( $module, $view, $keepModeViews );

        if ( $sslPriority && $keepModePriority && $sslPriority == $keepModePriority )
        {
            eZDebug::writeError( "Configuration error: view $module/$view is defined both as 'ssl' and 'keep'",
                                 'eZSSLZone' );
            return;
        }

        /* If the view belongs to the list of views we should not change access mode for,
         * then do nothing.
         * (however, the view may do access mode switch itself later)
         */
        if ( $keepModePriority > $sslPriority )
        {
            eZDebugSetting::writeDebug( 'kernel-ssl-zone', 'Keeping current access mode...' );
            return;
        }

        /* Otherwise we look if the view is in the list of SSL views,
         * and if it is, we switch to SSL. Else, if it's not, we switch to plain HTTP.
         */
        $inSSL = ( $sslPriority > 0 );

        eZDebugSetting::writeDebug( 'kernel-ssl-zone',
                                    ( isset( $inSSL ) ? ( $inSSL?'yes':'no') : 'dunno' ),
                                    'Should we use SSL for this view?' );

        // Change access mode if we need to.
        eZSSLZone::switchIfNeeded( $inSSL );
    }
static function checkModuleView ( $ module , $ view ) { if ( ! eZSSLZone :: enabled ( ) ) return ; $ ini = eZINI :: instance ( ) ; $ viewsModes = $ ini -> variable ( 'SSLZoneSettings' , 'ModuleViewAccessMode' ) ; $ sslViews = array_keys ( $ viewsModes , 'ssl' ) ; $ keepModeViews = array_keys ( $ viewsModes , 'keep' ) ; $ sslPriority = eZSSLZone :: viewIsInArray ( $ module , $ view , $ sslViews ) ; $ keepModePriority = eZSSLZone :: viewIsInArray ( $ module , $ view , $ keepModeViews ) ; if ( $ sslPriority && $ keepModePriority && $ sslPriority == $ keepModePriority ) { eZDebug :: writeError ( "Configuration error: view $module/$view is defined both as 'ssl' and 'keep'" , 'eZSSLZone' ) ; return ; } /* If the view belongs to the list of views we should not change access mode for,
         * then do nothing.
         * (however, the view may do access mode switch itself later)
         */ if ( $ keepModePriority > $ sslPriority ) { eZDebugSetting :: writeDebug ( 'kernel-ssl-zone' , 'Keeping current access mode...' ) ; return ; } /* Otherwise we look if the view is in the list of SSL views,
         * and if it is, we switch to SSL. Else, if it's not, we switch to plain HTTP.
         */ $ inSSL = ( $ sslPriority > 0 ) ; eZDebugSetting :: writeDebug ( 'kernel-ssl-zone' , ( isset ( $ inSSL ) ? ( $ inSSL ? 'yes' : 'no' ) : 'dunno' ) , 'Should we use SSL for this view?' ) ; // Change access mode if we need to. eZSSLZone :: switchIfNeeded ( $ inSSL ) ; }
\static
Decide whether we should change access mode for this module view or not.
Called from index.php.
\ static Decide whether we should change access mode for this module view or not . Called from index . php .