<commit_before><?php
/**
 * portals module actions.
 *
 * @package    c2corg
 * @subpackage portals
 */
class portalsActions extends documentsActions
{
    /**
     * Model class name.
     */
    protected $model_class = 'Portal';

    /**
     * Executes view action.
     */
    public function executeView()
    {
        parent::executeView();
        
        $mobile_version = c2cTools::mobileVersion();

        if (!$this->document->isArchive() && $this->document['redirects_to'] == NULL)
        {
            sfLoader::loadHelpers(array('Pagination'));

            $user = $this->getUser();
            $prefered_cultures = $user->getCulturesForDocuments();
            $document = $this->document;
            $id = $this->document->get('id');
            $topo_filter = $this->document->get('topo_filter');
            $url_params = array();
            $main_params = unpackUrlParameters($topo_filter, $main_url_params);
            
            // map filter
            $has_map = $this->document->get('has_map');
            $has_map = !empty($has_map);
            $this->has_map = $has_map;
            if ($has_map)
            {
                $map_filter_temp = $this->document->get('map_filter');
                $map_filter_temp = str_replace(' ', '', $map_filter_temp);
                $map_filter_temp = explode('|', $map_filter_temp);
                $map_filter = array();
                foreach ($map_filter_temp as $filter)
                {
                    $filter = explode(':', $filter);
                    if (isset($filter[1]))
                    {
                        $map_filter[$filter[0]] = $filter[1];<commit_msg>pas de carte dans les portails en version mobile<commit_after><?php
/**
 * portals module actions.
 *
 * @package    c2corg
 * @subpackage portals
 */
class portalsActions extends documentsActions
{
    /**
     * Model class name.
     */
    protected $model_class = 'Portal';

    /**
     * Executes view action.
     */
    public function executeView()
    {
        parent::executeView();
        
        $mobile_version = c2cTools::mobileVersion();

        if (!$this->document->isArchive() && $this->document['redirects_to'] == NULL)
        {
            sfLoader::loadHelpers(array('Pagination'));

            $user = $this->getUser();
            $prefered_cultures = $user->getCulturesForDocuments();
            $document = $this->document;
            $id = $this->document->get('id');
            $topo_filter = $this->document->get('topo_filter');
            $url_params = array();
            $main_params = unpackUrlParameters($topo_filter, $main_url_params);
            
            // map filter
            $has_map = $this->document->get('has_map');
            $has_map = (!$mobile_version && !empty($has_map));
            $this->has_map = $has_map;
            if ($has_map)
            {
                $map_filter_temp = $this->document->get('map_filter');
                $map_filter_temp = str_replace(' ', '', $map_filter_temp);
                $map_filter_temp = explode('|', $map_filter_temp);
                $map_filter = array();
                foreach ($map_filter_temp as $filter)
                {
                    $filter = explode(':', $filter);
                    if (isset($filter[1]))
                    {
                        $map_filter[$filter[0]] = $filter[1];
{'fraction_non_alphanumeric': 0.14694600177043377, 'fraction_numerical': 0.0029507229271171437, 'mean_word_length': 1.8132780082987552, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 33, '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': '6537142', 'n_tokens_mistral': 972, 'n_tokens_neox': 946, 'n_words': 164}