diff --git a/charts.module b/charts.module index 34c0de4ab1713fa7d226f5403cc4f33f3516430e..a0e4bbe197e2791dba8204bae8415d98c4579a6b 100644 --- a/charts.module +++ b/charts.module @@ -24,7 +24,7 @@ */ function charts_chart($chart_provider, &$data) { if (function_exists()) { - $chart_provider = $chart_provider .'_printchart'; + $chart_provider = $chart_provider .'_chartapi'; return $chart_provider($data); } } @@ -52,4 +52,18 @@ function charts_menu() { 'type' => MENU_LOCAL_TASK, ); return $items; -} \ No newline at end of file +} + +/** + * Implementation of hook_requirements(). + */ +function charts_requirements($phase) { + if ($phase == 'runtime' and !$modules = module_invoke_all('chartsinfo', 'list')) { + $requirements['charts']['title'] = t('Charts'); + $requirements['charts']['value'] = t('No Charts provider installed'); + $requirements['charts']['severity'] = REQUIREMENT_ERROR; + $requirements['charts']['description'] = t('Charts core module only provides a a common set of functions. You must install a Charts provider module to create charts.'); + + return $requirements; + } +}