Index: graphstat.module
===================================================================
RCS file: /cvs/drupal/contributions/modules/graphstat/graphstat.module,v
retrieving revision 1.5
diff -u -r1.5 graphstat.module
--- graphstat.module    10 Feb 2006 13:30:50 -0000      1.5
+++ graphstat.module    6 Mar 2006 17:52:05 -0000
@@ -32,7 +32,7 @@
  * Implementation of hook_menu().
  */
 function graphstat_menu($may_cache) {
-  $stylesheet = drupal_get_path('module', 'graphstat').'/graphstat.css';
+  $stylesheet = url(drupal_get_path('module', 'graphstat').'/graphstat.css');
   drupal_set_html_head(theme('stylesheet_import', $stylesheet));
   $items = array();
   if ($may_cache) {
@@ -184,6 +184,13 @@
   return $output;
 }
 
+function graphstat_date_pick_validate() {
+}
+
+function graphstat_date_pick_submit() {
+  return FALSE;
+}
+
 /**
  * Menu callback. Generates history graphs page.
  */

Comments

DriesK’s picture

I think this:

  $stylesheet = url(drupal_get_path('module', 'graphstat').'/graphstat.css');
  drupal_set_html_head(theme('stylesheet_import', $stylesheet));

should be (in head)

<?
theme('add_style', drupal_get_path('module', 'graphstat').'/graphstat.css');
?>

Furtermore, I have been very busy, and I've not been following recent developments very closely, but I can't imagine that the _validate and _submit hooks are _required_ now, even if you don't use them? Why did you add those?

DriesK’s picture

something went wrong. This was missing:

theme('add_style', drupal_get_path('module', 'graphstat').'/graphstat.css');
sugree’s picture

_submit must return FALSE, otherwise, form apis will redirect to the empty form. I don't know much though. ;-)

DriesK’s picture

Status: Needs review » Fixed

both issues have been fixed.

Anonymous’s picture

Status: Fixed » Closed (fixed)