<commit_before><?php

class Admin_Page_Abstract extends CM_Page_Abstract {

    /** @var  Denkmal_Params */
    protected $_params;

    /** @var Denkmal_Model_Region|null */
    protected $_region;

    public function prepareResponse(CM_Frontend_Environment $environment, CM_Http_Response_Page $response) {
        $session = $response->getRequest()->getSession();
        if ($session->has('region')) {
            $this->_region = new Denkmal_Model_Region($session->get('region'));
        }
    }

    public function checkAccessible(CM_Frontend_Environment $environment) {
        if (!$environment->getViewer(true)->getRoles()->contains(Denkmal_Role::ADMIN, Denkmal_Role::PUBLISHER)) {<commit_msg>Use site's region in admin page<commit_after><?php

class Admin_Page_Abstract extends CM_Page_Abstract {

    /** @var  Denkmal_Params */
    protected $_params;

    /** @var Denkmal_Model_Region|null */
    protected $_region;

    public function prepareResponse(CM_Frontend_Environment $environment, CM_Http_Response_Page $response) {
        $site = $response->getSite();
        if ($site instanceof Denkmal_Site_Default && $site->hasRegion()) {
            $this->_region = $site->getRegion();
        }
    }

    public function checkAccessible(CM_Frontend_Environment $environment) {
        if (!$environment->getViewer(true)->getRoles()->contains(Denkmal_Role::ADMIN, Denkmal_Role::PUBLISHER)) {
{'fraction_non_alphanumeric': 0.12756909992912827, 'fraction_numerical': 0.0, 'mean_word_length': 4.079136690647482, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 18, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3128895', 'n_tokens_mistral': 416, 'n_tokens_neox': 406, 'n_words': 73}