mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
Merge pull request #3290 from MGaetan89/ticket/13499
[ticket/13499] Move get_remote_file() to functions_compatibility.php * MGaetan89/ticket/13499: [ticket/13499] Move `get_remote_file()` to `functions_compatibility.php`
This commit is contained in:
commit
f616d9169e
3 changed files with 21 additions and 21 deletions
|
@ -2997,26 +2997,6 @@ function get_database_size()
|
|||
return $database_size;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve contents from remotely stored file
|
||||
*
|
||||
* @deprecated 3.1.2 Use file_downloader instead
|
||||
*/
|
||||
function get_remote_file($host, $directory, $filename, &$errstr, &$errno, $port = 80, $timeout = 6)
|
||||
{
|
||||
global $phpbb_container;
|
||||
|
||||
// Get file downloader and assign $errstr and $errno
|
||||
/* @var $file_downloader \phpbb\file_downloader */
|
||||
$file_downloader = $phpbb_container->get('file_downloader');
|
||||
|
||||
$file_data = $file_downloader->get($host, $directory, $filename, $port, $timeout);
|
||||
$errstr = $file_downloader->get_error_string();
|
||||
$errno = $file_downloader->get_error_number();
|
||||
|
||||
return $file_data;
|
||||
}
|
||||
|
||||
/*
|
||||
* Tidy Warnings
|
||||
* Remove all warnings which have now expired from the database
|
||||
|
|
|
@ -198,3 +198,23 @@ function get_user_rank($user_rank, $user_posts, &$rank_title, &$rank_img, &$rank
|
|||
$rank_img = $rank_data['img'];
|
||||
$rank_img_src = $rank_data['img_src'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve contents from remotely stored file
|
||||
*
|
||||
* @deprecated 3.1.2 Use file_downloader instead
|
||||
*/
|
||||
function get_remote_file($host, $directory, $filename, &$errstr, &$errno, $port = 80, $timeout = 6)
|
||||
{
|
||||
global $phpbb_container;
|
||||
|
||||
// Get file downloader and assign $errstr and $errno
|
||||
/* @var $file_downloader \phpbb\file_downloader */
|
||||
$file_downloader = $phpbb_container->get('file_downloader');
|
||||
|
||||
$file_data = $file_downloader->get($host, $directory, $filename, $port, $timeout);
|
||||
$errstr = $file_downloader->get_error_string();
|
||||
$errno = $file_downloader->get_error_number();
|
||||
|
||||
return $file_data;
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
*/
|
||||
|
||||
require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php';
|
||||
require_once dirname(__FILE__) . '/../../phpBB/includes/functions_admin.php';
|
||||
require_once dirname(__FILE__) . '/../../phpBB/includes/functions_compatibility.php';
|
||||
|
||||
/**
|
||||
* @group slow
|
||||
|
|
Loading…
Add table
Reference in a new issue