summaryrefslogtreecommitdiff
path: root/plugins/WikiHashtagsPlugin.php
diff options
context:
space:
mode:
authorSarven Capadisli <csarven@status.net>2009-11-02 14:53:31 +0000
committerSarven Capadisli <csarven@status.net>2009-11-02 14:53:31 +0000
commit8a07c7d7c021693271d1856f15dfe0abd9461d5d (patch)
tree1846465919fd94a2056c0154782d687242285fd6 /plugins/WikiHashtagsPlugin.php
parentebd604cf6b6fda6823437cafc1d2db3eb23d9f41 (diff)
parentfa37967858c3c29000797e510e5f98aca8ab558f (diff)
Merge branch '0.9.x' of git@gitorious.org:statusnet/mainline into 0.9.x
Diffstat (limited to 'plugins/WikiHashtagsPlugin.php')
-rw-r--r--plugins/WikiHashtagsPlugin.php12
1 files changed, 2 insertions, 10 deletions
diff --git a/plugins/WikiHashtagsPlugin.php b/plugins/WikiHashtagsPlugin.php
index 0c5649aa4..a9e675f5c 100644
--- a/plugins/WikiHashtagsPlugin.php
+++ b/plugins/WikiHashtagsPlugin.php
@@ -68,10 +68,8 @@ class WikiHashtagsPlugin extends Plugin
$editurl = sprintf('http://hashtags.wikia.com/index.php?title=%s&action=edit',
urlencode($tag));
- $context = stream_context_create(array('http' => array('method' => "GET",
- 'header' =>
- "User-Agent: " . $this->userAgent())));
- $html = @file_get_contents($url, false, $context);
+ $request = new HTTPClient($url);
+ $html = $request->get();
$action->elementStart('div', array('id' => 'wikihashtags', 'class' => 'section'));
@@ -100,10 +98,4 @@ class WikiHashtagsPlugin extends Plugin
return true;
}
-
- function userAgent()
- {
- return 'WikiHashtagsPlugin/'.WIKIHASHTAGSPLUGIN_VERSION .
- ' StatusNet/' . STATUSNET_VERSION;
- }
}