|
@@ -20,13 +20,14 @@ class FreshRSS_Share {
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ $HTMLtag = isset($share_options['HTMLtag']) ? $share_options['HTMLtag'] : 'link';
|
|
|
$isDeprecated = isset($share_options['deprecated']) ? $share_options['deprecated'] : false;
|
|
$isDeprecated = isset($share_options['deprecated']) ? $share_options['deprecated'] : false;
|
|
|
$help_url = isset($share_options['help']) ? $share_options['help'] : '';
|
|
$help_url = isset($share_options['help']) ? $share_options['help'] : '';
|
|
|
$field = isset($share_options['field']) ? $share_options['field'] : null;
|
|
$field = isset($share_options['field']) ? $share_options['field'] : null;
|
|
|
self::$list_sharing[$type] = new FreshRSS_Share(
|
|
self::$list_sharing[$type] = new FreshRSS_Share(
|
|
|
$type, $share_options['url'], $share_options['transform'],
|
|
$type, $share_options['url'], $share_options['transform'],
|
|
|
$share_options['form'], $help_url, $share_options['method'],
|
|
$share_options['form'], $help_url, $share_options['method'],
|
|
|
- $field, $isDeprecated
|
|
|
|
|
|
|
+ $field, $HTMLtag, $isDeprecated
|
|
|
);
|
|
);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -87,6 +88,7 @@ class FreshRSS_Share {
|
|
|
private $isDeprecated = false;
|
|
private $isDeprecated = false;
|
|
|
private $method = 'GET';
|
|
private $method = 'GET';
|
|
|
private $field;
|
|
private $field;
|
|
|
|
|
+ private $HTMLtag = 'link';
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* Create a FreshRSS_Share object.
|
|
* Create a FreshRSS_Share object.
|
|
@@ -99,11 +101,12 @@ class FreshRSS_Share {
|
|
|
* @param string $help_url is an optional url to give help on this option.
|
|
* @param string $help_url is an optional url to give help on this option.
|
|
|
* @param string $method defines the sharing method (GET or POST)
|
|
* @param string $method defines the sharing method (GET or POST)
|
|
|
*/
|
|
*/
|
|
|
- private function __construct($type, $url_transform, $transform, $form_type, $help_url, $method, $field, $isDeprecated = false) {
|
|
|
|
|
|
|
+ private function __construct($type, $url_transform, $transform, $form_type, $help_url, $method, $field, $HTMLtag, $isDeprecated = false) {
|
|
|
$this->type = $type;
|
|
$this->type = $type;
|
|
|
$this->name = _t('gen.share.' . $type);
|
|
$this->name = _t('gen.share.' . $type);
|
|
|
$this->url_transform = $url_transform;
|
|
$this->url_transform = $url_transform;
|
|
|
$this->help_url = $help_url;
|
|
$this->help_url = $help_url;
|
|
|
|
|
+ $this->HTMLtag = $HTMLtag;
|
|
|
$this->isDeprecated = $isDeprecated;
|
|
$this->isDeprecated = $isDeprecated;
|
|
|
|
|
|
|
|
if (!is_array($transform)) {
|
|
if (!is_array($transform)) {
|
|
@@ -181,6 +184,13 @@ class FreshRSS_Share {
|
|
|
return $this->help_url;
|
|
return $this->help_url;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Return the type of HTML tag of the share option.
|
|
|
|
|
+ */
|
|
|
|
|
+ public function HTMLtag() {
|
|
|
|
|
+ return $this->HTMLtag;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* Return the current name of the share option.
|
|
* Return the current name of the share option.
|
|
|
*/
|
|
*/
|