aboutsummaryrefslogtreecommitdiffstats
path: root/addon
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-05-20 07:08:20 -0700
committerFriendika <info@friendika.com>2011-05-20 07:08:20 -0700
commit1fcf8ff5deaf1b175c41e4b6ef3d8a396a6de8dd (patch)
tree9e7a5b50d5126a661bacda2f2a81de37f7159248 /addon
parent1b8e93c70bf5f797598e9ed3168cbe3f811b2db5 (diff)
downloadvolse-hubzilla-1fcf8ff5deaf1b175c41e4b6ef3d8a396a6de8dd.tar.gz
volse-hubzilla-1fcf8ff5deaf1b175c41e4b6ef3d8a396a6de8dd.tar.bz2
volse-hubzilla-1fcf8ff5deaf1b175c41e4b6ef3d8a396a6de8dd.zip
replace fopen with fetch_url in statusnet plugin, many sites do not have fopen_url allowed.
Diffstat (limited to 'addon')
-rw-r--r--addon/statusnet/statusnet.php8
1 files changed, 2 insertions, 6 deletions
diff --git a/addon/statusnet/statusnet.php b/addon/statusnet/statusnet.php
index ad992f979..358291d29 100644
--- a/addon/statusnet/statusnet.php
+++ b/addon/statusnet/statusnet.php
@@ -103,9 +103,7 @@ function statusnet_settings_post ($a,$post) {
// we'll check the API Version for that, if we don't get one we'll try to fix the path but will
// resign quickly after this one try to fix the path ;-)
$apibase = $_POST['statusnet-baseapi'];
- $f = fopen( $apibase . 'statusnet/version.xml', 'r');
- $c = stream_get_contents($f);
- fclose($f);
+ $c = fetch_url( $apibase . 'statusnet/version.xml' );
if (strlen($c) > 0) {
// ok the API path is correct, let's save the settings
set_pconfig(local_user(), 'statusnet', 'consumerkey', $_POST['statusnet-consumerkey']);
@@ -114,9 +112,7 @@ function statusnet_settings_post ($a,$post) {
} else {
// the API path is not correct, maybe missing trailing / ?
$apibase = $apibase . '/';
- $f = fopen( $apibase . 'statusnet/version.xml', 'r');
- $c = stream_get_contents($f);
- fclose($f);
+ $c = fetch_url( $apibase . 'statusnet/version.xml' );
if (strlen($c) > 0) {
// ok the API path is now correct, let's save the settings
set_pconfig(local_user(), 'statusnet', 'consumerkey', $_POST['statusnet-consumerkey']);