summaryrefslogtreecommitdiff
path: root/includes/ExternalStoreHttp.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2010-07-28 11:52:48 +0200
committerPierre Schmitz <pierre@archlinux.de>2010-07-28 11:52:48 +0200
commit222b01f5169f1c7e69762e0e8904c24f78f71882 (patch)
tree8e932e12546bb991357ec48eb1638d1770be7a35 /includes/ExternalStoreHttp.php
parent00ab76a6b686e98a914afc1975812d2b1aaa7016 (diff)
update to MediaWiki 1.16.0
Diffstat (limited to 'includes/ExternalStoreHttp.php')
-rw-r--r--includes/ExternalStoreHttp.php18
1 files changed, 12 insertions, 6 deletions
diff --git a/includes/ExternalStoreHttp.php b/includes/ExternalStoreHttp.php
index 6eb33b39..092ff7d8 100644
--- a/includes/ExternalStoreHttp.php
+++ b/includes/ExternalStoreHttp.php
@@ -1,15 +1,21 @@
<?php
+
/**
- * Example class for HTTP accessable external objects
+ * Example class for HTTP accessable external objects.
+ * Only supports reading, not storing.
*
* @ingroup ExternalStorage
*/
class ExternalStoreHttp {
- /* Fetch data from given URL */
- function fetchFromURL($url) {
- ini_set( "allow_url_fopen", true );
- $ret = file_get_contents( $url );
- ini_set( "allow_url_fopen", false );
+
+ /**
+ * Fetch data from given URL
+ *
+ * @param $url String: the URL
+ * @return String: the content at $url
+ */
+ function fetchFromURL( $url ) {
+ $ret = Http::get( $url );
return $ret;
}