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').
Comment | File | Size | Author |
---|---|---|---|
aggregator-form-feed-cleanup-0.patch | 1.45 KB | akahn | |
Comments
Comment #1
alex_b CreditAttribution: alex_b commentedThis was on my mind for a long time :-) Thanks for fixing this.
Comment #2
webchickWow, 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!