aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2022-03-06 21:39:11 +0100
committerGravatar GitHub <noreply@github.com> 2022-03-06 21:39:11 +0100
commita9e23bd1203f36006f7b00654132f48a913b2279 (patch)
treede99e58754242499b7ca4b0556fada5f01f77b7b
parentd27cf132481af5e16ce09a1aea8d410c973a8e08 (diff)
Remove XPath title in feed update (#4259)
* Remove XPath title in feed update #fix https://github.com/FreshRSS/FreshRSS/issues/4253 * Pre-fill //title https://github.com/FreshRSS/FreshRSS/issues/4253#issuecomment-1059746286 Co-authored-by: maTh <math-home@web.de>
-rw-r--r--app/Controllers/subscriptionController.php1
-rw-r--r--app/views/helpers/feed/update.phtml9
-rw-r--r--app/views/subscription/add.phtml2
3 files changed, 1 insertions, 11 deletions
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
@@ -390,15 +390,6 @@
?>
<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>
<div class="group-controls">
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>