public function pingAction()
    {
        $source = $this->getSourceById();

        try {
            if ($source->checkSourceActive($this->currentUser->getUserId())) {
                $this->addMessage($this->_('This installation is active.'), 'success');
            } else {
                $this->addMessage($this->_('Inactive installation.'), 'warning');
            }
        } catch (\Exception $e) {
            $this->addMessage($this->_('Installation error!'), 'danger');
            $this->addMessage($e->getMessage(), 'danger');
        }
        $this->_reroute(array($this->getRequest()->getActionKey() => 'show'));
    }
public function pingAction()
    {
        $source = $this->getSourceById();

        try {
            if ($source->checkSourceActive($this->currentUser->getUserId())) {
                $this->addMessage($this->_('This installation is active.'), 'success');
            } else {
                $this->addMessage($this->_('Inactive installation.'), 'warning');
            }
        } catch (\Exception $e) {
            $this->addMessage($this->_('Installation error!'), 'danger');
            $this->addMessage($e->getMessage(), 'danger');
        }
        $this->_reroute(array($this->getRequest()->getActionKey() => 'show'));
    }
public function pingAction ( ) { $ source = $ this -> getSourceById ( ) ; try { if ( $ source -> checkSourceActive ( $ this -> currentUser -> getUserId ( ) ) ) { $ this -> addMessage ( $ this -> _ ( 'This installation is active.' ) , 'success' ) ; } else { $ this -> addMessage ( $ this -> _ ( 'Inactive installation.' ) , 'warning' ) ; } } catch ( \ Exception $ e ) { $ this -> addMessage ( $ this -> _ ( 'Installation error!' ) , 'danger' ) ; $ this -> addMessage ( $ e -> getMessage ( ) , 'danger' ) ; } $ this -> _reroute ( array ( $ this -> getRequest ( ) -> getActionKey ( ) => 'show' ) ) ; }
Action to check whether the source is active
Action to check whether the source is active