phpBB

Code Changes

File: phpbb/avatar/driver/remote.php

  Unmodified   Added   Modified   Removed
Line 49Line 49
	*/
public function process_form($request, $template, $user, $row, &$error)
{

	*/
public function process_form($request, $template, $user, $row, &$error)
{

 
		global $phpbb_dispatcher;


		$url = $request->variable('avatar_remote_url', '');
$width = $request->variable('avatar_remote_width', 0);
$height = $request->variable('avatar_remote_height', 0);

		$url = $request->variable('avatar_remote_url', '');
$width = $request->variable('avatar_remote_width', 0);
$height = $request->variable('avatar_remote_height', 0);

Line 60Line 62

if (!preg_match('#^(http|https|ftp)://#i', $url))
{


if (!preg_match('#^(http|https|ftp)://#i', $url))
{

			$url = 'http://' . $url;

			$url = 'https://' . $url;

		}

if (!function_exists('validate_data'))

		}

if (!function_exists('validate_data'))

Line 78Line 80
		);

$error = array_merge($error, $validate_array);

		);

$error = array_merge($error, $validate_array);

 

if (!empty($error))
{
return false;
}

/**
* Event to make custom validation of avatar upload
*
* @event core.ucp_profile_avatar_upload_validation
* @var string url Image url
* @var string width Image width
* @var string height Image height
* @var array error Error message array
* @since 3.2.9-RC1
*/
$vars = array('url', 'width', 'height', 'error');
extract($phpbb_dispatcher->trigger_event('core.ucp_profile_avatar_upload_validation', compact($vars)));


if (!empty($error))
{


if (!empty($error))
{