WildcardSearch / Advanced-Sidebox

A plugin for MyBB forums that displays custom boxes on various forum pages.
GNU General Public License v3.0
20 stars 10 forks source link

Addon Modules: Rework Settings #157

Closed WildcardSearch closed 10 years ago

WildcardSearch commented 10 years ago

I really don't know why it didn't occur to me from the beginning, but there are some improvements that can be made to the module system, chiefly where settings are concerned.

The current model passes the entire setting definitions array to the called module, when all the module really needs is the values. Consequently, the cache has to store more data than necessary and memory overhead is impacted (albeit minimally).

WildcardSearch commented 10 years ago

This should be done.

@tanweth and any of the many other module authors in secret :tongue: this is not backward compatible. On the module end it comes down to changing all of the settings references from:

$settings['setting_name']['value']

to

$settings['setting_name']

Also, see #177 for another change.