From fbd68916cdfe4edf7c65e34318e0f498acaa3d15 Mon Sep 17 00:00:00 2001
From: Bruno Massa <brmassa@67164.no-reply.drupal.org>
Date: Thu, 13 Nov 2008 01:35:00 +0000
Subject: [PATCH] New features: * Alert users when the Charts module default
 settings were not yet set.

---
 charts.module | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/charts.module b/charts.module
index 30c4c62..b7de676 100644
--- a/charts.module
+++ b/charts.module
@@ -111,6 +111,14 @@ function charts_requirements($phase) {
     $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;
+  }
+  elseif ($phase == 'runtime' and !$settings = variable_get('charts_settings', array())) {
+    $requirements['charts']['title']        = t('Charts');
+    $requirements['charts']['value']        = t('Charts module not yet configured');
+    $requirements['charts']['severity']     = REQUIREMENT_ERROR;
+    $requirements['charts']['description']  = t('Charts core module needs to get some default options in order to operate. You must go to <a href="!link">settings page</a> and configure it.', array('!link' => url('admin/settings/charts')));
+
     return $requirements;
   }
 }
-- 
GitLab