Following #2208165: Replace usage of views deprecated functions in views I noticed that there are some unused functions in Views.
views_ui_load() is a menu loader function, no longer needed since we converted to routes, I think this could have been removed in #1904854: Convert Views UI to routes.
views_process_check_options() dates back to D6 and all calls were removed from D7 in #1058464: No multiple select possible in exposed filter for CCK list field but the function itself was not deleted.
The attached patch removes the above two functions. There is also views_embed_view() and views_get_view_result() which are never called, but at least the former was useful in contrib in D7, so they should perhaps remain in D8 - but I guess ideally they need tests to prove they do what is expected of them.
Comment | File | Size | Author |
---|---|---|---|
#5 | D8-views-unused-functions-2208893-4.patch | 1.55 KB | ngocketit |
views-unused-functions.patch | 1.55 KB | longwave | |
Comments
Comment #1
ngocketit CreditAttribution: ngocketit commentedviews-unused-functions.patch queued for re-testing.
Comment #2
ngocketit CreditAttribution: ngocketit commentedviews_process_check_options() obviously should have been removed since D7. Currently there is no use of views_ui_load() any more so I don't find any reason for keeping it either. The patch needs to be re-rolled however.
Comment #3
ngocketit CreditAttribution: ngocketit commentedComment #5
ngocketit CreditAttribution: ngocketit commentedNew patch attached.
Comment #6
ngocketit CreditAttribution: ngocketit commentedComment #7
dawehnerThese two functions are indeed not useful. In general though I dislike when code is judged by usage in core only.
Comment #8
alexpottLets get a followup to add testing / debate whether to keep them for
views_embed_view()
andviews_get_view_result()
Comment #9
alexpottCommitted 3c30539 and pushed to 8.x. Thanks!