This came up in work on #19646: Aggregator: Feed Suspend Option and alex_b suggested creating a separate issue.

The form builder function for admin/content/aggregator/edit/feed/% contains some confusing, ugly code. This patch modifies the function to correctly use default_value for the refresh form element without creating a new stdClass to hold a dummy $feed.

Simplifying this function will facilitate allowing feeds to be suspended as in the issue linked above. Presently, the empty($feed->refresh) check evaluates to TRUE for the 0 ('suspended') refresh setting, which prevents proper default_value functionality when editing a feed that is suspended (the select instead defaults to 1 hour, even when the feed has been set to 'never').

CommentFileSizeAuthor
aggregator-form-feed-cleanup-0.patch1.45 KBakahn
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

alex_b’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: +Quick fix

This was on my mind for a long time :-) Thanks for fixing this.

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Wow, that old code is incredibly perplexing. The only thing I can think is it's leftover from when we were trying to get all notices out of D6.

Committed to HEAD. Thanks!

Status: Fixed » Closed (fixed)
Issue tags: -Quick fix

Automatically closed -- issue fixed for 2 weeks with no activity.