diff options
Diffstat (limited to 'mod/ecml/ecml_functions.php')
-rw-r--r-- | mod/ecml/ecml_functions.php | 30 |
1 files changed, 5 insertions, 25 deletions
diff --git a/mod/ecml/ecml_functions.php b/mod/ecml/ecml_functions.php index f0dcafa24..e818a8f99 100644 --- a/mod/ecml/ecml_functions.php +++ b/mod/ecml/ecml_functions.php @@ -42,9 +42,11 @@ function ecml_parse_view_match($matches) { break; case 'view': - // parses this into an acceptable array for $vars. - $info = ecml_keywords_parse_view_params($params_string); - $content = elgg_view($info['view'], $info['vars']); + // src is a required attribute of view + $vars = ecml_keywords_tokenize_params($params_string); + $vars['ecml_keyword'] = $keyword; + $vars['ecml_params_string'] = $params_string; + $content = elgg_view($vars['src'], $vars); break; @@ -166,28 +168,6 @@ function ecml_keywords_tokenize_params($string) { } /** - * Extract the view and vars for view: keyword - * - * @param $string - * @return array views, vars - */ -function ecml_keywords_parse_view_params($string) { - $vars = ecml_keywords_tokenize_params($string); - - // the first element key is the view - $var_keys = array_keys($vars); - $view = $var_keys[0]; - - $info = array( - 'view' => $view, - 'vars' => $vars - ); - - return $info; - -} - -/** * Returns an options array suitable for using in elgg_get_entities() * * @param string $string "name=value, name2=value2" |