Vergleich inc/functions_upload.php - 1.6.0 - 1.6.5

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 6Zeile 6
 * Website: http://mybb.com
* License: http://mybb.com/about/license
*

 * Website: http://mybb.com
* License: http://mybb.com/about/license
*

 * $Id: functions_upload.php 5016 2010-06-12 00:24:02Z RyanGordon $

 * $Id: functions_upload.php 5623 2011-10-01 02:46:09Z ralgith $

 */



 */



Zeile 330Zeile 330
		"width" => intval($img_dimensions[0]),
"height" => intval($img_dimensions[1])
);

		"width" => intval($img_dimensions[0]),
"height" => intval($img_dimensions[1])
);

	$plugins->run_hooks_by_ref("upload_avatar_end", $ret);

	$ret = $plugins->run_hooks("upload_avatar_end", $ret);

	return $ret;
}


	return $ret;
}


Zeile 413Zeile 413
			return $ret;
}
}

			return $ret;
}
}

 

// Gather forum permissions
$forumpermissions = forum_permissions($forum['fid']);


// Check if an attachment with this name is already in the post
$query = $db->simple_select("attachments", "*", "filename='".$db->escape_string($attachment['name'])."' AND (posthash='$posthash' OR (pid='".intval($pid)."' AND pid!='0'))");
$prevattach = $db->fetch_array($query);
if($prevattach['aid'] && $update_attachment == false)
{


// Check if an attachment with this name is already in the post
$query = $db->simple_select("attachments", "*", "filename='".$db->escape_string($attachment['name'])."' AND (posthash='$posthash' OR (pid='".intval($pid)."' AND pid!='0'))");
$prevattach = $db->fetch_array($query);
if($prevattach['aid'] && $update_attachment == false)
{

 
		if(!$mybb->usergroup['caneditattachments'] && !$forumpermissions['caneditattachments'])
{
$ret['error'] = $lang->error_alreadyuploaded_perm;
return $ret;
}


		$ret['error'] = $lang->error_alreadyuploaded;
return $ret;
}

		$ret['error'] = $lang->error_alreadyuploaded;
return $ret;
}

Zeile 433Zeile 442
		{
$month_dir = '';
}

		{
$month_dir = '';
}

	}

// If safe_mode is enabled, don't attempt to use the monthly directories as it won't work
if(ini_get('safe_mode') == 1 || strtolower(ini_get('safe_mode')) == 'on')
{
$month_dir = '';

 
	}

// All seems to be good, lets move the attachment!

	}

// All seems to be good, lets move the attachment!

Zeile 570Zeile 573
		$attacharray['visible'] = 1;
}


		$attacharray['visible'] = 1;
}


	$plugins->run_hooks_by_ref("upload_attachment_do_insert", $attacharray);

	$attacharray = $plugins->run_hooks("upload_attachment_do_insert", $attacharray);

	
if($prevattach['aid'] && $update_attachment == true)
{

	
if($prevattach['aid'] && $update_attachment == true)
{

Zeile 627Zeile 630
	$upload['path'] = $path;
$upload['type'] = $file['type'];
$upload['size'] = $file['size'];

	$upload['path'] = $path;
$upload['type'] = $file['type'];
$upload['size'] = $file['size'];

	$plugins->run_hooks_by_ref("upload_file_end", $upload);

	$upload = $plugins->run_hooks("upload_file_end", $upload);

	return $upload;
}
?>

	return $upload;
}
?>