remove debugging calls

This commit is contained in:
Evan Prodromou 2009-05-17 12:37:04 -04:00
parent 53d6a8ba61
commit 5a0edc9b8c

View File

@ -54,32 +54,25 @@ class WikiHashtagsPlugin extends Plugin
function onStartShowSections($action) function onStartShowSections($action)
{ {
common_debug('WikiHashtags: got called');
$name = $action->trimmed('action'); $name = $action->trimmed('action');
if ($name == 'tag') { if ($name == 'tag') {
common_debug('WikiHashtags: called by tag');
$taginput = $action->trimmed('tag'); $taginput = $action->trimmed('tag');
$tag = common_canonical_tag($taginput); $tag = common_canonical_tag($taginput);
if (!empty($tag)) { if (!empty($tag)) {
common_debug('WikiHashtags: have a tag: ' . $tag);
$url = sprintf('http://hashtags.wikia.com/index.php?title=%s&action=render', $url = sprintf('http://hashtags.wikia.com/index.php?title=%s&action=render',
urlencode($tag)); urlencode($tag));
$editurl = sprintf('http://hashtags.wikia.com/index.php?title=%s&action=edit', $editurl = sprintf('http://hashtags.wikia.com/index.php?title=%s&action=edit',
urlencode($tag)); urlencode($tag));
common_debug('WikiHashtags: have an url: ' . $url);
$context = stream_context_create(array('http' => array('method' => "GET", $context = stream_context_create(array('http' => array('method' => "GET",
'header' => 'header' =>
"User-Agent: " . $this->userAgent()))); "User-Agent: " . $this->userAgent())));
$html = @file_get_contents($url, false, $context); $html = @file_get_contents($url, false, $context);
common_debug('WikiHashtags: results are: ' . $html);
$action->elementStart('div', array('id' => 'wikihashtags', 'class' => 'section')); $action->elementStart('div', array('id' => 'wikihashtags', 'class' => 'section'));
if (!empty($html)) { if (!empty($html)) {