projects
/
Plinn.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Déplacement pour eggification.
[Plinn.git]
/
Products
/
Plinn
/
skins
/
control
/
setAndGetSessionVar.py
diff --git a/Products/Plinn/skins/control/setAndGetSessionVar.py
b/Products/Plinn/skins/control/setAndGetSessionVar.py
new file mode 100755
(executable)
index 0000000..
9a4eb15
--- /dev/null
+++ b/
Products/Plinn/skins/control/setAndGetSessionVar.py
@@ -0,0
+1,9
@@
+##parameters=key, value, allowFalse = 1
+sd = context.session_data_manager.getSessionData(create = 1)
+if allowFalse :
+ sd[key] = value
+ return value
+else :
+ if value :
+ sd[key] = value
+ return sd.get(key, None)
\ No newline at end of file