aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGaëtan Muller <m.gaetan89@gmail.com>2015-01-12 22:43:03 +0100
committerGaëtan Muller <m.gaetan89@gmail.com>2015-01-15 18:55:51 +0100
commit17daaaf441c4972932a4fa3632eaa20132a8763e (patch)
treedd0bea3f4d561ca2e3c01865346ca55885c02249
parent98937a7a18dc605c6d3bb8a3f20f124ec71e058a (diff)
downloadforums-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
-rw-r--r--phpBB/includes/functions_admin.php20
-rw-r--r--phpBB/includes/functions_compatibility.php20
-rw-r--r--tests/functions/get_remote_file_test.php2
3 files changed, 21 insertions, 21 deletions
diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php
index cfd5aaa0c5..bb7022fff3 100644
--- a/phpBB/includes/functions_admin.php
+++ b/phpBB/includes/functions_admin.php
@@ -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
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;
+}
diff --git a/tests/functions/get_remote_file_test.php b/tests/functions/get_remote_file_test.php
index d412dce164..8e9ad1105a 100644
--- a/tests/functions/get_remote_file_test.php
+++ b/tests/functions/get_remote_file_test.php
@@ -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