<commit_before><?php

namespace Backend\Modules\Location\Ajax;

/*
 * This file is part of Fork CMS.
 *
 * For the full copyright and license information, please view the license
 * file that was distributed with this source code.
 */

use Backend\Core\Engine\Base\AjaxAction as BackendBaseAJAXAction;
use Backend\Core\Language\Language as BL;
use Backend\Modules\Location\Engine\Model as BackendLocationModel;

/**
 * This is an ajax handler that will set a new position for a certain map
 */
class SaveLiveLocation extends BackendBaseAJAXAction
{
    /**
     * Execute the action
     */
    public function execute()
    {
        parent::execute();

        $generalSettings = $this->get('fork.settings')->getForModule('Location');

        // get parameters
        $itemId = \SpoonFilter::getPostValue('id', null, null, 'int');
        $zoomLevel = trim(\SpoonFilter::getPostValue('zoom', null, 'auto'));
        $mapType = mb_strtoupper(trim(\SpoonFilter::getPostValue('type', array('roadmap', 'satelitte', 'hybrid', 'terrain'), 'roadmap')));
        $mapStyle = trim(\SpoonFilter::getPostValue('style', array('standard', 'custom', 'gray', 'blue'), 'standard'));
        $centerLat = \SpoonFilter::getPostValue('centerLat', null, 1, 'float');
        $centerlng = \SpoonFilter::getPostValue('centerLng', null, 1, 'float');<commit_msg>Fixes "satellite" bug in AJAX SaveLiveLocation.php<commit_after><?php

namespace Backend\Modules\Location\Ajax;

/*
 * This file is part of Fork CMS.
 *
 * For the full copyright and license information, please view the license
 * file that was distributed with this source code.
 */

use Backend\Core\Engine\Base\AjaxAction as BackendBaseAJAXAction;
use Backend\Core\Language\Language as BL;
use Backend\Modules\Location\Engine\Model as BackendLocationModel;

/**
 * This is an ajax handler that will set a new position for a certain map
 */
class SaveLiveLocation extends BackendBaseAJAXAction
{
    /**
     * Execute the action
     */
    public function execute()
    {
        parent::execute();

        $generalSettings = $this->get('fork.settings')->getForModule('Location');

        // get parameters
        $itemId = \SpoonFilter::getPostValue('id', null, null, 'int');
        $zoomLevel = trim(\SpoonFilter::getPostValue('zoom', null, 'auto'));
        $mapType = mb_strtoupper(trim(\SpoonFilter::getPostValue('type', array('roadmap', 'satellite', 'hybrid', 'terrain'), 'roadmap')));
        $mapStyle = trim(\SpoonFilter::getPostValue('style', array('standard', 'custom', 'gray', 'blue'), 'standard'));
        $centerLat = \SpoonFilter::getPostValue('centerLat', null, 1, 'float');
        $centerlng = \SpoonFilter::getPostValue('centerLng', null, 1, 'float');
{'fraction_non_alphanumeric': 0.1444321940463065, 'fraction_numerical': 0.001470047776552738, 'mean_word_length': 4.068901303538175, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '2364778', 'n_tokens_mistral': 817, 'n_tokens_neox': 795, 'n_words': 212}