<commit_before><?php

/**
 * This is the AdEdit form.   
 */

class Form_AdEdit extends Zend_Form {
	
	public function init() {
		
		//set multipart to upload images
		$this->setAttrib('enctype', 'multipart/form-data');
		
		// set the method for the display form to POST
		$this->setMethod ( 'post' );

		//upload image stuff
		$this->addElement('file', 'photo', array(
			
			'label' => 'Select an image file for your ad (optional).',
			'required' => false,
			'setDestination' => (NOLOTIRO_PATH_ROOT. '/www/images/uploads'),
			'description' => 'Allowed format files: gif, jpg, png. Max:1Mb Size',
			'validators' => array(
			'Extension' => array(false, 'jpg,jpeg,bmp,gif,png'),
			'Size' => array('min' => 1, 'max' => 1000000),
			'IsImage' => array( 'image/bmp', 'image/gif', 'image/jpeg', 'image/pjpeg', 'image/png')
			)
			));

		
		$this->addElement ( 'select', 'type', array (

		'label' => 'Choose:', 'required' => true,
		 'attribs' => array ('type' => 'type', 'type' => 'type' ),
		 'multioptions' => array ('give' => 'i give...', 'want' => 'i want...' ) ) );
		
		$this->addElement ( 'text', 'title', array ('label' => 'Title of your ad:', //'filters' => array('StringTrim', 'StringToLower'),
		'validators' => array (array ('StringLength', false, array (10, 50 ) ) ), 'required' => true )

		 );
		$this->addElement ( 'textarea', 'body', array ('label' => 'Ad body:', 'validators' => array (array ('StringLength', false, array (30, 500 ) ) ), 'required' => true )

		 );
		
		// add the submit button
		$this->addElement ( 'submit', 'submit', array ('label' => 'Send' ) );
	}
}
<commit_msg>tring to fix the unknown mimetype when upload a jpg<commit_after><?php

/**
 * This is the AdEdit form.   
 */

class Form_AdEdit extends Zend_Form {
	
	public function init() {
		
		//set multipart to upload images
		$this->setAttrib('enctype', 'multipart/form-data');
		
		// set the method for the display form to POST
		$this->setMethod ( 'post' );

		//upload image stuff
		$this->addElement('file', 'photo', array(
			
			'label' => 'Select an image file for your ad (optional).',
			'required' => false,
			'setDestination' => (NOLOTIRO_PATH_ROOT. '/www/images/uploads'),
			'description' => 'Allowed format files: gif, jpg, png. Max:1Mb Size',
			'validators' => array(
			'Extension' => array(false, 'jpg,jpeg,bmp,gif,png'),
			'Size' => array('min' => 1, 'max' => 1000000),
			'IsImage' => array( 'image/bmp', 'image/gif', 'image/jpeg', 'image/pjpeg', 'image/jpg', 'image/png')
			)
			));

		
		$this->addElement ( 'select', 'type', array (

		'label' => 'Choose:', 'required' => true,
		 'attribs' => array ('type' => 'type', 'type' => 'type' ),
		 'multioptions' => array ('give' => 'i give...', 'want' => 'i want...' ) ) );
		
		$this->addElement ( 'text', 'title', array ('label' => 'Title of your ad:', //'filters' => array('StringTrim', 'StringToLower'),
		'validators' => array (array ('StringLength', false, array (10, 50 ) ) ), 'required' => true )

		 );
		$this->addElement ( 'textarea', 'body', array ('label' => 'Ad body:', 'validators' => array (array ('StringLength', false, array (30, 500 ) ) ), 'required' => true )

		 );
		
		// add the submit button
		$this->addElement ( 'submit', 'submit', array ('label' => 'Send' ) );
	}
}

{'fraction_non_alphanumeric': 0.21684532924961716, 'fraction_numerical': 0.011026033690658498, 'mean_word_length': 3.587078651685393, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 69, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '3684308', 'n_tokens_mistral': 1266, 'n_tokens_neox': 1091, 'n_words': 306}