mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
[ticket/13499] Move get_remote_file()
to functions_compatibility.php
PHPBB3-13499
This commit is contained in:
parent
98937a7a18
commit
17daaaf441
3 changed files with 21 additions and 21 deletions
|
@ -2997,26 +2997,6 @@ function get_database_size()
|
||||||
return $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
|
* Tidy Warnings
|
||||||
* Remove all warnings which have now expired from the database
|
* 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 = $rank_data['img'];
|
||||||
$rank_img_src = $rank_data['img_src'];
|
$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.php';
|
||||||
require_once dirname(__FILE__) . '/../../phpBB/includes/functions_admin.php';
|
require_once dirname(__FILE__) . '/../../phpBB/includes/functions_compatibility.php';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @group slow
|
* @group slow
|
||||||
|
|
Loading…
Add table
Reference in a new issue