aboutsummaryrefslogtreecommitdiff
path: root/mod/ecml/ecml_functions.php
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-04-15 19:01:51 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-04-15 19:01:51 +0000
commiteb3f65345410313a6b87149fdea504d0a66e53af (patch)
treef2013a420db7d201634a6fea0d18761c1d5e3eb4 /mod/ecml/ecml_functions.php
parentc852d9e9e0fd64d70dcaace105f2bf7e7d3c1b95 (diff)
downloadelgg-eb3f65345410313a6b87149fdea504d0a66e53af.tar.gz
elgg-eb3f65345410313a6b87149fdea504d0a66e53af.tar.bz2
Added ability for ECML keyword definitions to restrict themselves to specific views.
git-svn-id: http://code.elgg.org/elgg/trunk@5750 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/ecml/ecml_functions.php')
-rw-r--r--mod/ecml/ecml_functions.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/mod/ecml/ecml_functions.php b/mod/ecml/ecml_functions.php
index 58395aa7b..7a30cde16 100644
--- a/mod/ecml/ecml_functions.php
+++ b/mod/ecml/ecml_functions.php
@@ -203,6 +203,12 @@ function ecml_is_valid_keyword($keyword, $view = NULL) {
return FALSE;
}
+ // this keyword is restricted to certain views
+ if (isset($CONFIG->ecml_keywords[$keyword]['restricted'])
+ && !in_array($view, $CONFIG->ecml_keywords[$keyword]['restricted'])) {
+ return FALSE;
+ }
+
$views = $CONFIG->ecml_permissions;
// this is a blacklist, so return TRUE by default.