aboutsummaryrefslogtreecommitdiff
path: root/app/Models/Share.php
diff options
context:
space:
mode:
authorGravatar maTh <math-home@web.de> 2022-03-15 22:58:30 +0100
committerGravatar GitHub <noreply@github.com> 2022-03-15 22:58:30 +0100
commitbe5848fd4fa280e5a4606fef25669974414547a5 (patch)
treec11af74c2a64bdf4f1e59a4841d81d77f5977d4d /app/Models/Share.php
parentbdf7e4d29d954c3d2c137948577b6872c3de4656 (diff)
Improved: Sharing/Integration configuration (#4269)
* stick plus button to select list * HTML improved very much * drag and drop improved * add URL button * fix remove button behavior * prepare for PR#4238 * improve length of inputs * First draft of documentation of the sharing services * new config option: depricated * i18n for depricated text * Doc: Blogotext depricated to 2023 * dropdown menu with config link and depricated sign * Update entry_bottom.phtml * Update 08_sharing_services.md * Update template.rtl.css * Typo Deprecated/Depricated * typo * updated the documentation comment * Update shares.php * Update app/i18n/fr/conf.php Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr> * Update p/scripts/draggable.js Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr> * Update p/scripts/draggable.js Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr> * Documentation: services from #4270 Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
Diffstat (limited to 'app/Models/Share.php')
-rw-r--r--app/Models/Share.php14
1 files changed, 12 insertions, 2 deletions
diff --git a/app/Models/Share.php b/app/Models/Share.php
index c453fbaac..a36226f69 100644
--- a/app/Models/Share.php
+++ b/app/Models/Share.php
@@ -20,12 +20,13 @@ class FreshRSS_Share {
return;
}
+ $isDeprecated = isset($share_options['deprecated']) ? $share_options['deprecated'] : false;
$help_url = isset($share_options['help']) ? $share_options['help'] : '';
$field = isset($share_options['field']) ? $share_options['field'] : null;
self::$list_sharing[$type] = new FreshRSS_Share(
$type, $share_options['url'], $share_options['transform'],
$share_options['form'], $help_url, $share_options['method'],
- $field
+ $field, $isDeprecated
);
}
@@ -83,6 +84,7 @@ class FreshRSS_Share {
private $id = null;
private $title = null;
private $link = null;
+ private $isDeprecated = false;
private $method = 'GET';
private $field;
@@ -97,11 +99,12 @@ class FreshRSS_Share {
* @param string $help_url is an optional url to give help on this option.
* @param string $method defines the sharing method (GET or POST)
*/
- private function __construct($type, $url_transform, $transform, $form_type, $help_url, $method, $field) {
+ private function __construct($type, $url_transform, $transform, $form_type, $help_url, $method, $field, $isDeprecated = false) {
$this->type = $type;
$this->name = _t('gen.share.' . $type);
$this->url_transform = $url_transform;
$this->help_url = $help_url;
+ $this->isDeprecated = $isDeprecated;
if (!is_array($transform)) {
$transform = array();
@@ -197,6 +200,13 @@ class FreshRSS_Share {
}
/**
+ * Return the deprecated status of the share option.
+ */
+ public function isDeprecated() {
+ return $this->isDeprecated;
+ }
+
+ /**
* Return the current url by merging url_transform and base_url.
*/
public function url() {