Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
U
UNL-CMS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
yzha1
UNL-CMS
Commits
2feeb207
Commit
2feeb207
authored
12 years ago
by
Eric Rasmussen
Committed by
Tim Steiner
12 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[gh-500] Purge varnish when Draggable Views form is saved
parent
7a3fbdbc
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
sites/all/modules/unl/unl_varnish/unl_varnish.module
+10
-0
10 additions, 0 deletions
sites/all/modules/unl/unl_varnish/unl_varnish.module
with
10 additions
and
0 deletions
sites/all/modules/unl/unl_varnish/unl_varnish.module
+
10
−
0
View file @
2feeb207
...
@@ -26,6 +26,7 @@ function unl_varnish_form_system_performance_settings_alter(&$form, &$form_state
...
@@ -26,6 +26,7 @@ function unl_varnish_form_system_performance_settings_alter(&$form, &$form_state
'#title'
=>
t
(
'Purge varnish on all sites'
),
'#title'
=>
t
(
'Purge varnish on all sites'
),
'#access'
=>
user_access
(
'administer varnish'
)
&&
conf_path
()
==
'sites/default'
,
'#access'
=>
user_access
(
'administer varnish'
)
&&
conf_path
()
==
'sites/default'
,
'#weight'
=>
-
1
,
'#weight'
=>
-
1
,
'varnish_path'
=>
array
(
'varnish_path'
=>
array
(
'#type'
=>
'radios'
,
'#type'
=>
'radios'
,
'#required'
=>
TRUE
,
'#required'
=>
TRUE
,
...
@@ -35,6 +36,7 @@ function unl_varnish_form_system_performance_settings_alter(&$form, &$form_state
...
@@ -35,6 +36,7 @@ function unl_varnish_form_system_performance_settings_alter(&$form, &$form_state
),
),
'#default_value'
=>
'^/wdn'
,
'#default_value'
=>
'^/wdn'
,
),
),
'purge'
=>
array
(
'purge'
=>
array
(
'#type'
=>
'submit'
,
'#type'
=>
'submit'
,
'#value'
=>
t
(
'Purge varnish system-wide'
),
'#value'
=>
t
(
'Purge varnish system-wide'
),
...
@@ -82,3 +84,11 @@ function unl_varnish_file_update($file) {
...
@@ -82,3 +84,11 @@ function unl_varnish_file_update($file) {
function
unl_varnish_node_update
(
$node
)
{
function
unl_varnish_node_update
(
$node
)
{
varnish_purge_all_pages
();
varnish_purge_all_pages
();
}
}
/**
* Implements hook_form_FORM_ID_alter().
* Purges varnish when a Draggable Views form is saved.
*/
function
unl_varnish_form_views_form_drag_page_alter
(
&
$form
,
$form_state
,
$form_id
)
{
$form
[
'#submit'
][]
=
'varnish_purge_all_pages'
;
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment