Explorar el Código

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>
Alexandre Alapetite hace 4 años
padre
commit
a9e23bd120

+ 0 - 1
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);

+ 0 - 9
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>

+ 1 - 1
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>