Commit 707cbde7 authored by webchick's avatar webchick

Issue #1843410 by ACF: Change variable batch_test_stack() to the state system.

parent 7502e7bc
......@@ -527,12 +527,12 @@ function _batch_test_theme_callback() {
*/
function batch_test_stack($data = NULL, $reset = FALSE) {
if ($reset) {
variable_del('batch_test_stack');
state()->delete('batch_test.stack');
}
if (!isset($data)) {
return variable_get('batch_test_stack', array());
return state()->get('batch_test.stack');
}
$stack = variable_get('batch_test_stack', array());
$stack = state()->get('batch_test.stack');
$stack[] = $data;
variable_set('batch_test_stack', $stack);
state()->set('batch_test.stack', $stack);
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment