Vergleich inc/functions_upload.php - 1.6.4 - 1.6.9

  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 5487 2011-07-12 13:16:58Z Tomm $

 * $Id$

 */



 */



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 432Zeile 432
		return $ret;
}


		return $ret;
}


	// Check if the attachment directory (YYYYMM) exists, if not, create it
$month_dir = gmdate("Ym");
if(!@is_dir($mybb->settings['uploadspath']."/".$month_dir))

	$month_dir = '';
if(ini_get('safe_mode') != 1 && strtolower(ini_get('safe_mode')) != 'on')


	{

	{

		@mkdir($mybb->settings['uploadspath']."/".$month_dir);
// Still doesn't exist - oh well, throw it in the main directory

		// Check if the attachment directory (YYYYMM) exists, if not, create it
$month_dir = gmdate("Ym");

		if(!@is_dir($mybb->settings['uploadspath']."/".$month_dir))
{

		if(!@is_dir($mybb->settings['uploadspath']."/".$month_dir))
{

			$month_dir = '';






			@mkdir($mybb->settings['uploadspath']."/".$month_dir);
// Still doesn't exist - oh well, throw it in the main directory
if(!@is_dir($mybb->settings['uploadspath']."/".$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 579Zeile 577
		$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 636Zeile 634
	$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;
}
?>