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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ngocketit’s picture

views-unused-functions.patch queued for re-testing.

ngocketit’s picture

views_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.

ngocketit’s picture

Assigned: Unassigned » ngocketit
Status: Needs review » Needs work

The last submitted patch, views-unused-functions.patch, failed testing.

ngocketit’s picture

New patch attached.

ngocketit’s picture

Assigned: ngocketit » Unassigned
Status: Needs work » Needs review
dawehner’s picture

Status: Needs review » Reviewed & tested by the community

These two functions are indeed not useful. In general though I dislike when code is judged by usage in core only.

alexpott’s picture

Lets get a followup to add testing / debate whether to keep them for views_embed_view() and views_get_view_result()

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed 3c30539 and pushed to 8.x. Thanks!

  • alexpott committed 3c30539 on 8.x
    Issue #2208893 by ngocketit, longwave: Remove unused functions from...

Status: Fixed » Closed (fixed)

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