diff options
author | Gaëtan Muller <m.gaetan89@gmail.com> | 2015-01-12 22:43:03 +0100 |
---|---|---|
committer | Gaëtan Muller <m.gaetan89@gmail.com> | 2015-01-15 18:55:51 +0100 |
commit | 17daaaf441c4972932a4fa3632eaa20132a8763e (patch) | |
tree | dd0bea3f4d561ca2e3c01865346ca55885c02249 /phpBB/includes/functions_compatibility.php | |
parent | 98937a7a18dc605c6d3bb8a3f20f124ec71e058a (diff) | |
download | forums-17daaaf441c4972932a4fa3632eaa20132a8763e.tar forums-17daaaf441c4972932a4fa3632eaa20132a8763e.tar.gz forums-17daaaf441c4972932a4fa3632eaa20132a8763e.tar.bz2 forums-17daaaf441c4972932a4fa3632eaa20132a8763e.tar.xz forums-17daaaf441c4972932a4fa3632eaa20132a8763e.zip |
[ticket/13499] Move `get_remote_file()` to `functions_compatibility.php`
PHPBB3-13499
Diffstat (limited to 'phpBB/includes/functions_compatibility.php')
-rw-r--r-- | phpBB/includes/functions_compatibility.php | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/phpBB/includes/functions_compatibility.php b/phpBB/includes/functions_compatibility.php index c2da02456b..561c72183a 100644 --- a/phpBB/includes/functions_compatibility.php +++ b/phpBB/includes/functions_compatibility.php @@ -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; +} |