application/modules/g/controllers/ContentController.php
public function init() {
        // Do not cache CMS pages. This prevents a common situation where people logout, return to
        // the CMS, and see the interface but none of the content feeds load. Only after a browser
        // refresh they'll get bounced to the login page.
        $this->_helper->cache->setNoCacheHeaders($this->getResponse());

        $config = Zend_Registry::get('config');
        $this->_setCmsClosedMessage();
        if (!$config->cms || !$config->cms->ipfilter || !count($config->cms->ipfilter->toArray())) {
            return true;
        }
        $ip = isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : null;
        if ($ip === '127.0.0.1') {
            // i mean come on
            return true;
        }
        if (!in_array($ip, $config->cms->ipfilter->toArray())) {
            $authVars = Garp_Auth::getInstance()->getConfigValues();
            $this->_helper->flashMessenger(__($authVars['noPermissionMsg']));
            $this->_helper->redirector->gotoRoute(array(), $authVars['login']['route']);
            return false;
        }
    }
public function init() {
        // Do not cache CMS pages. This prevents a common situation where people logout, return to
        // the CMS, and see the interface but none of the content feeds load. Only after a browser
        // refresh they'll get bounced to the login page.
        $this->_helper->cache->setNoCacheHeaders($this->getResponse());

        $config = Zend_Registry::get('config');
        $this->_setCmsClosedMessage();
        if (!$config->cms || !$config->cms->ipfilter || !count($config->cms->ipfilter->toArray())) {
            return true;
        }
        $ip = isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : null;
        if ($ip === '127.0.0.1') {
            // i mean come on
            return true;
        }
        if (!in_array($ip, $config->cms->ipfilter->toArray())) {
            $authVars = Garp_Auth::getInstance()->getConfigValues();
            $this->_helper->flashMessenger(__($authVars['noPermissionMsg']));
            $this->_helper->redirector->gotoRoute(array(), $authVars['login']['route']);
            return false;
        }
    }
public function init ( ) { // Do not cache CMS pages. This prevents a common situation where people logout, return to // the CMS, and see the interface but none of the content feeds load. Only after a browser // refresh they'll get bounced to the login page. $ this -> _helper -> cache -> setNoCacheHeaders ( $ this -> getResponse ( ) ) ; $ config = Zend_Registry :: get ( 'config' ) ; $ this -> _setCmsClosedMessage ( ) ; if ( ! $ config -> cms || ! $ config -> cms -> ipfilter || ! count ( $ config -> cms -> ipfilter -> toArray ( ) ) ) { return true ; } $ ip = isset ( $ _SERVER [ 'REMOTE_ADDR' ] ) ? $ _SERVER [ 'REMOTE_ADDR' ] : null ; if ( $ ip === '127.0.0.1' ) { // i mean come on return true ; } if ( ! in_array ( $ ip , $ config -> cms -> ipfilter -> toArray ( ) ) ) { $ authVars = Garp_Auth :: getInstance ( ) -> getConfigValues ( ) ; $ this -> _helper -> flashMessenger ( __ ( $ authVars [ 'noPermissionMsg' ] ) ) ; $ this -> _helper -> redirector -> gotoRoute ( array ( ) , $ authVars [ 'login' ] [ 'route' ] ) ; return false ; } }
Called before all actions

@return Void
Called before all actions