search_admin_settings() calls _search_get_module_names() which does an ugly old-school job of getting module names by unserializing the info column from the DB. Somewhat late in D7 we added a helper function to avoid this mess: system_get_info(), which caches the data and presents a clean API call in stead hacking around with the {system} table.

We should fix the search module to use that function instead.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

pwolanin’s picture

Title: Use search_get_info() API function instead of unserializing from DB to get module names » Use system_get_info() API function instead of unserializing from DB to get module names
Status: Active » Needs review
FileSize
1.9 KB

I assume fixes are going in 8.x first? In any case, this is pretty trivial.

pwolanin’s picture

Actually, we are not assured the modules will come back from the hook in a sensible order, so this adds an asort() too.

jhodgdon’s picture

Status: Needs review » Reviewed & tested by the community

The patch looks quite reasonable to me. +1 for RTBC and commit to d8 and d7, assuming that the test bot agrees.

Dries’s picture

Version: 8.x-dev » 7.x-dev

Patch looks good. Committed this patch to my local 8.x tree. I'll push it out later tonight. Moving to 7.x in the mean time.

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Committed to 7.x. Thanks!

Status: Fixed » Closed (fixed)

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