Stripping CVS keywords
[project/feeds.git] / views / feeds_views_handler_field_source.inc
CommitLineData
eabfe21e 1<?php
eabfe21e
AB
2
3/**
4 * @file
5 * Views handler for showing a feeds source config field.
6 */
7
8class feeds_views_handler_field_source extends views_handler_field {
9
10 /**
11 * Override parent::render().
12 */
13 function render($values) {
14 $value = unserialize($values->{$this->field_alias});
15 if (isset($value['FeedsHTTPFetcher']['source'])) {
16 return check_url($value['FeedsHTTPFetcher']['source']);
17 }
18 elseif (isset($value['FeedsFileFetcher']['feeds_source'])) {
b77ce0e3 19 // @todo This is untested.
eabfe21e
AB
20 return $GLOBALS['base_url'] .'/'. check_plain($value['FeedsFileFetcher']['feeds_source']);
21 }
22 return '';
23 }
24
25 /**
26 * Disallow advanced rendering.
27 */
28 function allow_advanced_render() {
29 return FALSE;
30 }
a2e76574 31}