Skip to content

A free, self-hostable news aggregator…

Remove XPath title in feed update (#4259)

Alexandre Alapetitea9e23bd1203f
diff --git a/app/Controllers/subscriptionController.php b/app/Controllers/subscriptionController.php
index 8fa468b8e..0b8c62128 100644
--- a/app/Controllers/subscriptionController.php
+++ b/app/Controllers/subscriptionController.php
@@ -195,7 +195,6 @@ class FreshRSS_subscription_Controller extends FreshRSS_ActionController {
$feed_kind = Minz_Request::param('feed_kind', FreshRSS_Feed::KIND_RSS);
if ($feed_kind == FreshRSS_Feed::KIND_HTML_XPATH) {
$xPathSettings = [];
- if (Minz_Request::param('xPathFeedTitle', '') != '') $xPathSettings['feedTitle'] = Minz_Request::param('xPathFeedTitle', '', true);
if (Minz_Request::param('xPathItem', '') != '') $xPathSettings['item'] = Minz_Request::param('xPathItem', '', true);
if (Minz_Request::param('xPathItemTitle', '') != '') $xPathSettings['itemTitle'] = Minz_Request::param('xPathItemTitle', '', true);
if (Minz_Request::param('xPathItemContent', '') != '') $xPathSettings['itemContent'] = Minz_Request::param('xPathItemContent', '', true);
diff --git a/app/views/helpers/feed/update.phtml b/app/views/helpers/feed/update.phtml
index f71be5135..8d6e5ef11 100644
--- a/app/views/helpers/feed/update.phtml
+++ b/app/views/helpers/feed/update.phtml
@@ -389,15 +389,6 @@
$xpath = Minz_Helper::htmlspecialchars_utf8($this->feed->attributes('xpath'));
?>
<p class="help"><?= _i('help') ?> <?= _t('sub.feed.kind.html_xpath.help') ?></p>
- <div class="form-group">
- <label class="group-name" for="xPathFeedTitle"><small><?= _t('sub.feed.kind.html_xpath.xpath') ?></small><br />
- <?= _t('sub.feed.kind.html_xpath.feed_title') ?></label>
- <div class="group-controls">
- <textarea class="valid-xpath" name="xPathFeedTitle" id="xPathFeedTitle" rows="2" cols="64" spellcheck="false"
- data-leave-validation="<?= $xpath['feedTitle'] ?? '' ?>"><?= $xpath['feedTitle'] ?? '' ?></textarea>
- <p class="help"><?= _i('help') ?> <?= _t('sub.feed.kind.html_xpath.feed_title.help') ?></p>
- </div>
- </div>
<div class="form-group">
<label class="group-name" for="xPathItem"><small><?= _t('sub.feed.kind.html_xpath.xpath') ?></small><br />
<?= _t('sub.feed.kind.html_xpath.item') ?></label>
diff --git a/app/views/subscription/add.phtml b/app/views/subscription/add.phtml
index 344e25ade..78380a407 100644
--- a/app/views/subscription/add.phtml
+++ b/app/views/subscription/add.phtml
@@ -72,7 +72,7 @@
<label class="group-name" for="xPathFeedTitle"><small><?= _t('sub.feed.kind.html_xpath.xpath') ?></small><br />
<?= _t('sub.feed.kind.html_xpath.feed_title') ?></label>
<div class="group-controls">
- <textarea class="valid-xpath" name="xPathFeedTitle" id="xPathFeedTitle" rows="2" cols="64" spellcheck="false"></textarea>
+ <textarea class="valid-xpath" name="xPathFeedTitle" id="xPathFeedTitle" rows="2" cols="64" spellcheck="false">//title</textarea>
<p class="help"><?= _i('help') ?> <?= _t('sub.feed.kind.html_xpath.feed_title.help') ?></p>
</div>
</div>