function task_eventList() { /* Get the event list from the database * We might have to change the SQL query as the * event module is not yet build. */ $sql = 'SELECT nid, title FROM {node} WHERE type = %s'; $sql2 = db_query($sql, 'event'); // Formatting an array for the hook_menu $list[0] = 'No parent'; while ( $row = db_fetch_object($sql2) ) { $list[$row->nid] = $row->title; } // We return the array to process it return $list; }