Project

General

Profile

« Previous | Next » 

Revision 391

Added by Matthias almost 18 years ago

Code cleaning and fixing two issues in save_group.php

View differences:

trunk/wb/modules/news/save_group.php
57 57
	$filename = $_FILES['image']['name'];
58 58
	$new_filename = WB_PATH.MEDIA_DIRECTORY.'/.news/image'.$group_id.'.jpg';
59 59
	// Make sure the image is a jpg file
60
	$file3=substr($filename, -3, 3);
61 60
	$file4=substr($filename, -4, 4);
62
	//echo $file3;
63
	//echo $file4;
64
	if(($file4 != '.jpg')and($file4 != '.JPG')and($file4 != '.png')and($file4 != '.PNG') and ($file4 !='.jpeg') and ($file4 != '.JPEG')) {
61
	if(($file4 != '.jpg')and($file4 != '.JPG')and($file4 != '.png')and($file4 != '.PNG') and ($file4 !='jpeg') and ($file4 != 'JPEG')) {
65 62
		$admin->print_error($MESSAGE['GENERIC']['FILE_TYPE'].' JPG (JPEG) or PNG a');
66 63
	} elseif(
67 64
	(($_FILES['image']['type']) != 'image/jpeg' AND mime_content_type($_FILES['image']['tmp_name']) != 'image/jpg') 

Also available in: Unified diff