1 |
85ad3d82
|
Assos Assos
|
<?php
|
2 |
|
|
|
3 |
|
|
/**
|
4 |
|
|
* @file
|
5 |
|
|
* Views handler for showing a feeds source config field.
|
6 |
|
|
*/
|
7 |
|
|
|
8 |
|
|
class 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'])) {
|
19 |
|
|
// @todo This is untested.
|
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 |
|
|
}
|
31 |
|
|
} |