<commit_before><?php
abstract class Vps_Controller_Action extends Zend_Controller_Action
{
    public function jsonIndexAction()
    {
        $this->indexAction();
    }

    public function preDispatch()
    {
        if (!$this instanceof Vps_Controller_Action_Error
                && $this->_getParam('application_version')
                && $this->getHelper('ViewRenderer')->isJson()) {
            $version = Zend_Registry::get('config')->application->version;
            if ($version != $this->_getParam('application_version')) {
                $this->_forward('jsonWrongVersion', 'error',
                                    'vps_controller_action_error');
            }
        }

        $acl = $this->_getAcl();
        $role = $this->_getUserRole();
        $resource = $this->_getResourceName();

        if (!$acl->isAllowed($role, $resource, 'view')) {
            if ($this->getHelper('ViewRenderer')->isJson()) {
                $this->_forward('jsonLogin', 'login',
                                    'vps_controller_action_user');
            } else {
                $params = array('location' => $this->getRequest()->getPathInfo());
                $this->_forward('index', 'login',
                                    'vps_controller_action_user', $params);
            }
        }
    }<commit_msg>bugfix: endlosschleife bei falscher version behoben<commit_after><?php
abstract class Vps_Controller_Action extends Zend_Controller_Action
{
    public function jsonIndexAction()
    {
        $this->indexAction();
    }

    public function preDispatch()
    {
        if (!$this instanceof Vps_Controller_Action_Error_ErrorController
                && $this->_getParam('application_version')
                && $this->getHelper('ViewRenderer')->isJson()) {
            $version = Zend_Registry::get('config')->application->version;
            if ($version != $this->_getParam('application_version')) {
                $this->_forward('jsonWrongVersion', 'error',
                                    'vps_controller_action_error');
            }
        }

        $acl = $this->_getAcl();
        $role = $this->_getUserRole();
        $resource = $this->_getResourceName();

        if (!$acl->isAllowed($role, $resource, 'view')) {
            if ($this->getHelper('ViewRenderer')->isJson()) {
                $this->_forward('jsonLogin', 'login',
                                    'vps_controller_action_user');
            } else {
                $params = array('location' => $this->getRequest()->getPathInfo());
                $this->_forward('index', 'login',
                                    'vps_controller_action_user', $params);
            }
        }
    }
{'fraction_non_alphanumeric': 0.14375461936437547, 'fraction_numerical': 0.0, 'mean_word_length': 1.9360086767895879, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 41, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4407227', 'n_tokens_mistral': 700, 'n_tokens_neox': 677, 'n_words': 105}