Commit bd4e854a authored by merlinofchaos's avatar merlinofchaos
Browse files

#105620: (Attempt 2) allow modules to alter views tables + arguments

parent 3ecc390c
......@@ -129,4 +129,5 @@ Views --dev
o #111881: change 'user' table to use INNER join because every node has an author
o #102716: Reduced the number of JOINs for taxonomy hierarchy queries
New features:
o #105620: (Attempt 2) allow modules to alter views tables + arguments
......@@ -34,6 +34,12 @@ function _views_get_arguments($titles = false) {
}
else {
$arguments = module_invoke_all('views_arguments');
// allow modules to alter the definitions supplied others
foreach (module_implements('views_arguments_alter') as $module) {
$function = $module . '_views_arguments_alter';
$function($arguments);
}
uasort($arguments, '_views_sort_arrays');
foreach ($arguments as $name => $arg) {
if ($arg['option'] && !is_array($arg['option'])) {
......@@ -72,6 +78,11 @@ function _views_get_tables($full = false) {
else {
$table_data = module_invoke_all('views_tables');
$views_tables['tables'] = $table_data;
// allow modules to alter the definitions supplied others
foreach (module_implements('views_tables_alter') as $module) {
$function = $module . '_views_tables_alter';
$function($table_data);
}
foreach ($table_data as $name => $table) {
if (is_array($table['filters'])) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment