Vergleich inc/functions_upload.php - 1.2.1 - 1.2.5

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 6Zeile 6
 * Website: http://www.mybboard.com
* License: http://www.mybboard.com/eula.html
*

 * Website: http://www.mybboard.com
* License: http://www.mybboard.com/eula.html
*

 * $Id: functions_upload.php 2163 2006-08-30 05:53:05Z chris $

 * $Id: functions_upload.php 2598 2007-01-02 17:17:32Z CraKteR $

 */



 */



Zeile 152Zeile 152
			$img_type =  1;
break;
case "image/jpeg":

			$img_type =  1;
break;
case "image/jpeg":

 
		case "image/x-jpg":

		case "image/x-jpeg":
case "image/pjpeg":

		case "image/x-jpeg":
case "image/pjpeg":

 
		case "image/jpg":

			$img_type = 2;
break;
case "image/png":

			$img_type = 2;
break;
case "image/png":

Zeile 242Zeile 244
	}
$ext = get_extension($attachment['name']);
// Check if we have a valid extension

	}
$ext = get_extension($attachment['name']);
// Check if we have a valid extension

	$query = $db->simple_select(TABLE_PREFIX."attachtypes", "*", "extension='$ext'");

	$query = $db->simple_select(TABLE_PREFIX."attachtypes", "*", "extension='".$db->escape_string($ext)."'");

	$attachtype = $db->fetch_array($query);
if(!$attachtype['atid'])
{

	$attachtype = $db->fetch_array($query);
if(!$attachtype['atid'])
{

Zeile 326Zeile 328
				$img_type =  1;
break;
case "image/jpeg":

				$img_type =  1;
break;
case "image/jpeg":

 
			case "image/x-jpg":

			case "image/x-jpeg":
case "image/pjpeg":

			case "image/x-jpeg":
case "image/pjpeg":

 
			case "image/jpg":

				$img_type = 2;
break;
case "image/png":

				$img_type = 2;
break;
case "image/png":

Zeile 345Zeile 349
			@unlink($mybb->settings['uploadspath']."/".$filename);
$ret['error'] = $lang->error_uploadfailed;
return $ret;

			@unlink($mybb->settings['uploadspath']."/".$filename);
$ret['error'] = $lang->error_uploadfailed;
return $ret;

		}	

		}		

		require_once MYBB_ROOT."inc/functions_image.php";
$thumbname = str_replace(".attach", "_thumb.$ext", $filename);
$thumbnail = generate_thumbnail($mybb->settings['uploadspath']."/".$filename, $mybb->settings['uploadspath'], $thumbname, $mybb->settings['attachthumbh'], $mybb->settings['attachthumbw']);

		require_once MYBB_ROOT."inc/functions_image.php";
$thumbname = str_replace(".attach", "_thumb.$ext", $filename);
$thumbnail = generate_thumbnail($mybb->settings['uploadspath']."/".$filename, $mybb->settings['uploadspath'], $thumbname, $mybb->settings['attachthumbh'], $mybb->settings['attachthumbw']);