summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEarl Miles2009-02-20 20:17:13 (GMT)
committer Earl Miles2009-02-20 20:17:13 (GMT)
commit5e1c96d449a67a8f371a1e08c7007ec96ef2857d (patch)
tree5bedc541e533a1f0c66cce988407d2d0294ca472
parent69236c34902ef762d2493dc13892427e210a33f2 (diff)
#375182: Allow a reset parameter to views_get_all_views().
-rw-r--r--CHANGELOG.txt3
-rw-r--r--views.module9
2 files changed, 10 insertions, 2 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index a45040b..8cf0f83 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 dbe6e04..591750e 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();