<commit_before><?php

class PreferenceController extends Zend_Controller_Action
{

    public function init()
    {
        /* Initialize action controller here */
    	$ajaxContext = $this->_helper->getHelper('AjaxContext');
        $ajaxContext->addActionContext('register', 'json')
        			->addActionContext('remindme', 'json')
                    ->addActionContext('server-browse', 'json')
                    ->addActionContext('change-stor-directory', 'json')
                    ->addActionContext('reload-watch-directory', 'json')
                    ->addActionContext('remove-watch-directory', 'json')
                    ->initContext();
    }

    public function indexAction()
    {
        $request = $this->getRequest();
        $baseUrl = $request->getBaseUrl();

        $this->view->headScript()->appendFile($baseUrl.'/js/airtime/preferences/preferences.js','text/javascript');
        $this->view->statusMsg = "";

        $form = new Application_Form_Preferences();

        if ($request->isPost()) {

            if ($form->isValid($request->getPost())) {

                $values = $form->getValues();

                Application_Model_Preference::SetHeadTitle($values["preferences_general"]["stationName"], $this->view);
                Application_Model_Preference::SetDefaultFade($values["preferences_general"]["stationDefaultFade"]);
                Application_Model_Preference::SetStreamLabelFormat($values["preferences_general"]["streamFormat"]);
                Application_Model_Preference::SetAllow3rdPartyApi($values["preferences_general"]["thirdPartyApi"]);
                Application_Model_Preference::SetWatchedDirectory($values["preferences_general"]["watchedFolder"]);

                Application_Model_Preference::SetDoSoundCloudUpload($values["preferences_soundcloud"]["UseSoundCloud"]);
                Application_Model_Preference::SetSoundCloudUser($values["preferences_soundcloud"]["SoundCloudUser"]);
                Application_Model_Preference::SetSoundCloudPassword($values["preferences_soundcloud"]["SoundCloudPassword"]);
                Application_Model_Preference::SetSoundCloudTags($values["preferences_soundcloud"]["SoundCloudTags"]);
                Application_Model_Preference::SetSoundCloudGenre($values["preferences_soundcloud"]["SoundCloudGenre"]);
                Application_Model_Preference::SetSoundCloudTrackType($values["preferences_soundcloud"]["SoundCloudTrackType"]);

                Application_Model_Preference::SetSoundCloudLicense($values["preferences_soundcloud"]["SoundCloudLicense"]);

                Application_Model_Preference::SetPhone($values["preferences_support"]["Phone"]);
                Application_Model_Preference::SetEmail($values["preferences_support"]["Email"]);
                Application_Model_Preference::SetStationWebSite($values["preferences_support"]["StationWebSite"]);
                Application_Model_Preference::SetSupportFeedback($values["preferences_support"]["SupportFeedback"]);
                Application_Model_Preference::SetPublicise($values["preferences_support"]["Publicise"]);

                $imagePath = $form->getSubForm('preferences_support')->Logo->getFileName();

                Application_Model_Preference::SetStationCountry($values["preferences_support"]["Country"]);
                Application_Model_Preference::SetStationCity($values["preferences_support"]["City"]);
                Application_Model_Preference::SetStationDescription($values["preferences_support"]["Description"]);
                Application_Model_Preference::SetStationLogo($imagePath);
<commit_msg>- removing one line from PreferenceController.php(the function doesn't exist anymore)<commit_after><?php

class PreferenceController extends Zend_Controller_Action
{

    public function init()
    {
        /* Initialize action controller here */
    	$ajaxContext = $this->_helper->getHelper('AjaxContext');
        $ajaxContext->addActionContext('register', 'json')
        			->addActionContext('remindme', 'json')
                    ->addActionContext('server-browse', 'json')
                    ->addActionContext('change-stor-directory', 'json')
                    ->addActionContext('reload-watch-directory', 'json')
                    ->addActionContext('remove-watch-directory', 'json')
                    ->initContext();
    }

    public function indexAction()
    {
        $request = $this->getRequest();
        $baseUrl = $request->getBaseUrl();

        $this->view->headScript()->appendFile($baseUrl.'/js/airtime/preferences/preferences.js','text/javascript');
        $this->view->statusMsg = "";

        $form = new Application_Form_Preferences();

        if ($request->isPost()) {

            if ($form->isValid($request->getPost())) {

                $values = $form->getValues();

                Application_Model_Preference::SetHeadTitle($values["preferences_general"]["stationName"], $this->view);
                Application_Model_Preference::SetDefaultFade($values["preferences_general"]["stationDefaultFade"]);
                Application_Model_Preference::SetStreamLabelFormat($values["preferences_general"]["streamFormat"]);
                Application_Model_Preference::SetAllow3rdPartyApi($values["preferences_general"]["thirdPartyApi"]);

                Application_Model_Preference::SetDoSoundCloudUpload($values["preferences_soundcloud"]["UseSoundCloud"]);
                Application_Model_Preference::SetSoundCloudUser($values["preferences_soundcloud"]["SoundCloudUser"]);
                Application_Model_Preference::SetSoundCloudPassword($values["preferences_soundcloud"]["SoundCloudPassword"]);
                Application_Model_Preference::SetSoundCloudTags($values["preferences_soundcloud"]["SoundCloudTags"]);
                Application_Model_Preference::SetSoundCloudGenre($values["preferences_soundcloud"]["SoundCloudGenre"]);
                Application_Model_Preference::SetSoundCloudTrackType($values["preferences_soundcloud"]["SoundCloudTrackType"]);

                Application_Model_Preference::SetSoundCloudLicense($values["preferences_soundcloud"]["SoundCloudLicense"]);

                Application_Model_Preference::SetPhone($values["preferences_support"]["Phone"]);
                Application_Model_Preference::SetEmail($values["preferences_support"]["Email"]);
                Application_Model_Preference::SetStationWebSite($values["preferences_support"]["StationWebSite"]);
                Application_Model_Preference::SetSupportFeedback($values["preferences_support"]["SupportFeedback"]);
                Application_Model_Preference::SetPublicise($values["preferences_support"]["Publicise"]);

                $imagePath = $form->getSubForm('preferences_support')->Logo->getFileName();

                Application_Model_Preference::SetStationCountry($values["preferences_support"]["Country"]);
                Application_Model_Preference::SetStationCity($values["preferences_support"]["City"]);
                Application_Model_Preference::SetStationDescription($values["preferences_support"]["Description"]);
                Application_Model_Preference::SetStationLogo($imagePath);

{'fraction_non_alphanumeric': 0.1342347365486479, 'fraction_numerical': 0.00027878449958182325, 'mean_word_length': 4.006978367062107, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 51, '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': '7587918', 'n_tokens_mistral': 1780, 'n_tokens_neox': 1767, 'n_words': 146}