Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Eric Rasmussen
UNL-CMS
Commits
eec2cc20
Commit
eec2cc20
authored
Feb 08, 2013
by
Eric Rasmussen
Browse files
[gh-586] No need to mess with time() if not using $_SESSION
parent
86ea2f2e
Changes
1
Hide whitespace changes
Inline
Side-by-side
sites/all/modules/unl_varnish/unl_varnish.module
View file @
eec2cc20
...
...
@@ -89,11 +89,11 @@ function unl_varnish_node_update($node) {
* Implements hook_webform_component_update().
*/
function
unl_varnish_webform_component_update
(
$component
)
{
//
This functions runs once for every component in the form on save; flush varnish at most every 2 seconds
.
static
$unl_varnish_webform_component_update
_time
;
if
(
!
isset
(
$unl_varnish_webform_component_update
_time
)
||
time
()
-
$unl_varnish_webform_component_update_time
>
2
)
{
//
Only flush for the first component in the form
.
static
$unl_varnish_webform_component_update
;
if
(
!
isset
(
$unl_varnish_webform_component_update
)
)
{
unl_varnish_purge_all_pages
();
$unl_varnish_webform_component_update
_time
=
time
()
;
$unl_varnish_webform_component_update
=
TRUE
;
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment