diff options
| author | Tristan Darricau <github@nicofuma.fr> | 2015-01-15 21:52:21 +0100 |
|---|---|---|
| committer | Tristan Darricau <github@nicofuma.fr> | 2015-01-15 21:52:21 +0100 |
| commit | f616d9169ee7117fc47f3eac0d42568e2668a2fa (patch) | |
| tree | dd0bea3f4d561ca2e3c01865346ca55885c02249 /phpBB/includes/functions_compatibility.php | |
| parent | 98937a7a18dc605c6d3bb8a3f20f124ec71e058a (diff) | |
| parent | 17daaaf441c4972932a4fa3632eaa20132a8763e (diff) | |
| download | forums-f616d9169ee7117fc47f3eac0d42568e2668a2fa.tar forums-f616d9169ee7117fc47f3eac0d42568e2668a2fa.tar.gz forums-f616d9169ee7117fc47f3eac0d42568e2668a2fa.tar.bz2 forums-f616d9169ee7117fc47f3eac0d42568e2668a2fa.tar.xz forums-f616d9169ee7117fc47f3eac0d42568e2668a2fa.zip | |
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`
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; +} |
