Skip to content

Verify that configuration values are not used for values that are not configuration #79

@avpaderno

Description

@avpaderno

On #43, values stored as configuration values have been replaced by state values. That issue fixed the most obvious cases of configuration values that instead were values describing the state of the site, which for example are the last time cron tasks have been execute, or the last time a site checked for module/theme updates.

There are other cases where configuration values should not be used. For example, the ajax_example/ajax_example_progressbar.inc contains the following code.

$variable_name = 'example_progressbar_' . $form_state['time'];
$commands = array();

config_set('ajax_example', $variable_name, 10);
sleep(2);
config_set('ajax_example', $variable_name, 40);
sleep(2);
config_set('ajax_example', $variable_name, 70);
sleep(2);
config_set('ajax_example', $variable_name, 90);
sleep(2);
config_set('ajax_example', $variable_name, NULL);

That code is saving a temporary value, not a value that needs to be exported, for example, from a development site to a production site.
In those cases, another way to store those values should be used.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions