<commit_before><?php

class CRM_Mailchimp_Form_Setting extends CRM_Core_Form {

  const 
    MC_SETTING_GROUP = 'MailChimp Preferences';

  /**
   * Function to actually build the form
   *
   * @return None
   * @access public
   */
  public function buildQuickForm() {
    
    CRM_Core_Resources::singleton()->addStyleFile('uk.co.vedaconsulting.mailchimp', 'css/mailchimp.css');
    
    $webhook_url = CRM_Utils_System::url('civicrm/mailchimp/webhook', 'reset=1',  TRUE, NULL, FALSE, TRUE);
    $this->assign( 'webhook_url', 'Webhook URL - '.$webhook_url);
   
    // Add the API Key Element
    $this->addElement('text', 'api_key', ts('API Key'), array(
      'size' => 48,
    ));    
    
    // Add the User Security Key Element    
    $this->addElement('text', 'security_key', ts('Security Key'), array(
      'size' => 24,
    ));
    
    // Create the Default Group
    $group = array('' => ts('- select group -')) + CRM_Core_PseudoConstant::group();    
    $this->add('select', 'default_group', ts('Default group'),$group );
   
    // Create the Submit Button.
    $buttons = array(
      array(
        'type' => 'submit',<commit_msg>version error<commit_after><?php

class CRM_Mailchimp_Form_Setting extends CRM_Core_Form {

  const 
    MC_SETTING_GROUP = 'MailChimp Preferences';

  /**
   * Function to actually build the form
   *
   * @return None
   * @access public
   */
  public function buildQuickForm() {
    
    CRM_Core_Resources::singleton()->addStyleFile('uk.co.vedaconsulting.mailchimp', 'css/mailchimp.css');
    
    $civi_version = CRM_Utils_System::version();
    if($civi_version<4.4) {
      CRM_Core_Session::setStatus("You need to upgrade to version 4.4 or above","Version:",'info');
    }
    $webhook_url = CRM_Utils_System::url('civicrm/mailchimp/webhook', 'reset=1',  TRUE, NULL, FALSE, TRUE);
    $this->assign( 'webhook_url', 'Webhook URL - '.$webhook_url);
   
    // Add the API Key Element
    $this->addElement('text', 'api_key', ts('API Key'), array(
      'size' => 48,
    ));    
    
    // Add the User Security Key Element    
    $this->addElement('text', 'security_key', ts('Security Key'), array(
      'size' => 24,
    ));
    
    // Create the Default Group
    $group = array('' => ts('- select group -')) + CRM_Core_PseudoConstant::group();    
    $this->add('select', 'default_group', ts('Default group'),$group );
   
    // Create the Submit Button.
    $buttons = array(
      array(
        'type' => 'submit',
{'fraction_non_alphanumeric': 0.15814889336016097, 'fraction_numerical': 0.005633802816901409, 'mean_word_length': 3.0554649265905383, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 21, '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': '2860496', 'n_tokens_mistral': 836, 'n_tokens_neox': 815, 'n_words': 180}