Skip to content

A free, self-hostable news aggregator…

Gate greader/json share formats behind Share by OPML (#9248)

SamCyber00112b5be6afcea
diff --git a/app/Models/UserQuery.php b/app/Models/UserQuery.php
index afa95c1ce..f55364aa7 100644
--- a/app/Models/UserQuery.php
+++ b/app/Models/UserQuery.php
@@ -347,7 +347,7 @@ class FreshRSS_UserQuery {
}
public function sharedUrlGreader(bool $xmlEscaped = true): string {
- if ($this->shareRss && $this->token !== '') {
+ if ($this->shareOpml && $this->token !== '') {
return $this->sharedUrl($xmlEscaped) . ($xmlEscaped ? '&' : '&') . 'f=greader';
}
return '';
diff --git a/app/views/helpers/configure/query.phtml b/app/views/helpers/configure/query.phtml
index c3a0e5cd1..75147d14d 100644
--- a/app/views/helpers/configure/query.phtml
+++ b/app/views/helpers/configure/query.phtml
@@ -48,7 +48,6 @@
<?php if ($this->query->sharedUrlRss() !== ''): ?>
<ul>
<li><a href="<?= $this->query->sharedUrlHtml() ?>"><?= _i('link') ?> <?= _t('conf.query.share.html') ?></a></li>
- <li><a href="<?= $this->query->sharedUrlGreader() ?>"><?= _i('link') ?> <?= _t('conf.query.share.greader') ?></a></li>
<li><a href="<?= $this->query->sharedUrlRss() ?>"><?= _i('link') ?> <?= _t('conf.query.share.rss') ?></a></li>
</ul>
</div>
@@ -75,6 +74,7 @@
<?php if ($this->query->sharedUrlOpml() !== ''): ?>
<ul>
<li><a href="<?= $this->query->sharedUrlOpml() ?>"><?= _i('link') ?> <?= _t('conf.query.share.opml') ?></a></li>
+ <li><a href="<?= $this->query->sharedUrlGreader() ?>"><?= _i('link') ?> <?= _t('conf.query.share.greader') ?></a></li>
</ul>
<?php endif; ?>
</div>
diff --git a/p/api/query.php b/p/api/query.php
index f3a1491b9..a4bc6f2d4 100644
--- a/p/api/query.php
+++ b/p/api/query.php
@@ -75,14 +75,14 @@ foreach (FreshRSS_Context::userConf()->queries as $raw_query) {
if (!empty($raw_query['token']) && hash_equals($raw_query['token'], $token)) {
switch ($format) {
case 'atom':
- case 'greader':
case 'html':
- case 'json':
case 'rss':
if (empty($raw_query['shareRss'])) {
continue 2;
}
break;
+ case 'greader':
+ case 'json':
case 'opml':
if (empty($raw_query['shareOpml'])) {
continue 2;