webmcp
diff framework/env/slot/__init.lua @ 262:c3d539e33710
Replaced request.add_initializer(...) and request.add_variable(...) with request.for_each(...) and request.configure(...) which both execute the passed function once in any case when being called
| author | jbe |
|---|---|
| date | Tue Mar 17 11:42:34 2015 +0100 (2015-03-17) |
| parents | f491011ebe16 |
| children | a88662f795e0 |
line diff
1.1 --- a/framework/env/slot/__init.lua Mon Mar 16 23:21:18 2015 +0100 1.2 +++ b/framework/env/slot/__init.lua Tue Mar 17 11:42:34 2015 +0100 1.3 @@ -1,8 +1,9 @@ 1.4 -request.add_variable(slot, "_active_slot", "default") 1.5 -request.add_variable(slot, "_current_layout", "default") 1.6 -request.add_variable(slot, "_content_type", nil) 1.7 +request.for_each(function() 1.8 1.9 -request.add_initializer(function() 1.10 + slot._active_slot = "default" 1.11 + 1.12 + slot._current_layout = "default" 1.13 + slot._content_type = nil 1.14 1.15 slot._data = nil 1.16 slot.reset_all()