diff --git a/CHANGELOG.txt b/CHANGELOG.txt index a45040b818608fc3cf375aad731c9ee6cf952b59..8cf0f831cbb5212fe80844823e7e4338ab340d2e 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -131,3 +131,6 @@ Views 2.4 o #373155: Not clearing "many to one" data breaks some attachment displays. o #375000: View name should always be LTR. o #378534: Validators do not fire if argument === 0 due to PHP loose type conversions. + + Other changes: + o #375182: Allow a reset parameter to views_get_all_views(). \ No newline at end of file diff --git a/views.module b/views.module index dbe6e04316b41c7804271fea7b702b8e7bd9feb9..591750e256ac9d6cec5390c804f87fa3670ce9c0 100644 --- a/views.module +++ b/views.module @@ -786,11 +786,16 @@ function views_get_applicable_views($type) { /** * Return an array of all views as fully loaded $view objects. + * + * @param $reset + * If TRUE, reset the static cache forcing views to be reloaded. */ -function views_get_all_views() { +function views_get_all_views($reset = FALSE) { static $views = array(); - if (empty($views)) { + if (empty($views) || $reset) { + $views = array(); + // First, get all applicable views. views_include('view'); $views = view::load_views();