Index: upcoming_event/upcoming_event.module
===================================================================
--- upcoming_event/upcoming_event.module	(revision 1)
+++ upcoming_event/upcoming_event.module	(working copy)
@@ -6,7 +6,7 @@
  */
 function upcoming_event_init() {
   global $_upcoming_event_cookie_file;
-  $_upcoming_event_cookie_file = file_directory_path(). '/ua_'.md5(rand()).'.txt';
+  $_upcoming_event_cookie_file = file_directory_path() .'/ua_'. md5(rand()) .'.txt';
   global $_upcoming_event_api_key;
   $_upcoming_event_api_key = 'ad5d532d1a';
 }
@@ -18,8 +18,8 @@
   $url ='https://login.yahoo.com/config/login';
   $ch = curl_init($url);
   // Tell curl not to return headers, but do return the response
-  curl_setopt($ch, CURLOPT_HEADER, false);
-  curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
+  curl_setopt($ch, CURLOPT_HEADER, FALSE);
+  curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
   
   $response = curl_exec($ch);
   curl_close($ch);
@@ -52,8 +52,8 @@
   global $_upcoming_event_cookie_file;
   $url = 'https://login.yahoo.com/config/login?';
   $ch = curl_init($url);
-  curl_setopt($ch, CURLOPT_POST, true);
-  curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
+  curl_setopt($ch, CURLOPT_POST, TRUE);
+  curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
   curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
   curl_setopt($ch, CURLOPT_COOKIEJAR, $_upcoming_event_cookie_file);
   curl_setopt($ch, CURLOPT_POSTFIELDS, $vars);
@@ -70,7 +70,7 @@
   global $_upcoming_event_cookie_file;
   $url = 'http://upcoming.yahoo.com/services/auth/?'. $vars;
   $ch = curl_init($url);
-  curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
+  curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
   curl_setopt($ch, CURLOPT_COOKIEFILE, $_upcoming_event_cookie_file);
   curl_setopt($ch, CURLOPT_COOKIEJAR, $_upcoming_event_cookie_file);
   
@@ -100,7 +100,7 @@
   // Make request
   $url = 'http://upcoming.yahoo.com/services/rest/?'. $get_query;
   $ch = curl_init($url);
-  curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
+  curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
   if ($post_query != '')
     curl_setopt($ch, CURLOPT_POSTFIELDS, $post_query);
   $result = curl_exec($ch);
@@ -117,7 +117,7 @@
 function _upcoming_event_parse_vars($vars) {
   $query = '';
   foreach ($vars as $var => $value) {
-    $query.= $var .'='. urlencode($value) .'&';
+    $query .= $var .'='. urlencode($value) .'&';
   }
   return $query;
 }
@@ -190,7 +190,7 @@
   // Just one node for one upcoming event
   if (is_numeric($node_id) && is_numeric($event_id)) {
     $rs = db_query('SELECT * FROM {upcoming_event} WHERE node_id = %d', $node_id);
-    if (db_num_rows($rs)) {
+    if (db_result($rs)) {
       $upcoming_event = db_fetch_object($rs);
       db_query('UPDATE {upcoming_event} SET event_id = %d, category_id = %d, venue_id = %d WHERE node_id = %d',
         $event_id, $category_id, $event_id, $node_id);
@@ -229,7 +229,7 @@
   node_id = %d
     ';
     $query = db_query($query, $node->nid);
-    if (db_num_rows($query)) {
+    if (db_result($query)) {
       $upcoming_event[$node->nid] = db_fetch_array($query);
     }
   }
@@ -242,33 +242,28 @@
 /**
  * Implementation of hook_menu().
  */
-function upcoming_event_menu($may_cache) {
+function upcoming_event_menu() {
   $access = user_access('administer YUE settings');
   $items = array();
-  if ($may_cache) {
-    $items[] = array(
-      'path' => 'admin/settings/upcoming_event',
-      'title' => t('Upcoming Event'),
-      'callback' => 'drupal_get_form',
-      'callback arguments' => array('upcoming_event_admin_settings'),
-      'access' => $access,
-      'weight' => 0.1,
-    );
-    $items[] = array(
-      'path' => 'admin/settings/upcoming_event/options',
-      'type' => MENU_DEFAULT_LOCAL_TASK,
-      'title' => t('Settings'),
-    );
-    $items[] = array(
-      'path' => 'admin/settings/upcoming_event/get_token',
-      'title' => t('Get Token'),
-      'callback' => 'drupal_get_form',
-      'callback arguments' => array('upcoming_event_get_token_form'),
-      'access' => $access,
-      'type' => MENU_LOCAL_TASK,
-      'weight' => 0.2,
-    );
-  }
+  $items['admin/settings/upcoming_event'] = array(
+    'title' => 'Upcoming Event',
+    'page callback' => 'drupal_get_form',
+    'page arguments' => array('upcoming_event_admin_settings'),
+    'access arguments' => user_access('administer YUE settings'),
+    'weight' => 0,
+  );
+  $items['admin/settings/upcoming_event/options'] = array(
+    'type' => MENU_DEFAULT_LOCAL_TASK,
+    'title' => 'Settings',
+  );
+  $items['admin/settings/upcoming_event/get_token'] = array(
+    'title' => 'Get Token',
+    'page callback' => 'drupal_get_form',
+    'page arguments' => array('upcoming_event_get_token_form'),
+    'access arguments' => user_access('administer YUE settings'),
+    'type' => MENU_LOCAL_TASK,
+    'weight' => 1,
+  );
   return $items;
 }
 
@@ -333,7 +328,7 @@
   );
   $countries = variable_get('upcoming_event_countries', array());
   $options = array();
-  foreach($countries as $id => $info) {
+  foreach ($countries as $id => $info) {
     $options[$id] = '['. $info['code'] .'] '. $info['name'];
   }
   $form['get_token']['country'] = array(
@@ -350,7 +345,7 @@
   $options = array();
   foreach ($states as $country_id => $country_states) {
     foreach ($country_states as $state_id => $info) {
-      $options[$countries[$country_id]['name']][$country_id. '-' .$state_id] =
+      $options[$countries[$country_id]['name']][$country_id . '-' . $state_id] =
         '['. $info['code'] .'] '. $info['name'];
     }
   }
@@ -372,7 +367,7 @@
         $options[
           $countries[$country_id]['name'] .' - '.
           $states[$country_id][$state_id]['name']
-        ][$country_id. '-' .$state_id .'-'. $metro_id] =
+        ][$country_id . '-' . $state_id .'-'. $metro_id] =
           '['. $info['code'] .'] '. $info['name'];
       }
     }
@@ -411,9 +406,9 @@
  * Get Token Form submit handler. Login to Yahoo.com then retrieve Token from
  * Upcoming.yahoo.com. CURL based.
  */
-function upcoming_event_get_token_form_submit($form_id, $form_values) {
+function upcoming_event_get_token_form_submit($form, &$form_state) {
   global $_upcoming_event_api_key;
-  switch ($form_values['op']) {
+  switch ($form_state['values']['op']) {
     case t('Retrieve token'):
       // Get Login Form
       $form = _upcoming_event_get_form();
@@ -486,7 +481,7 @@
 
     case t('Get State List'):
       $states = variable_get('upcoming_event_states', array());
-      $country_id = $form_values['country'];
+      $country_id = $form_state['values']['country'];
       $vars = array(
         'api_key' => $_upcoming_event_api_key,
         'method' => 'metro.getStateList',
@@ -504,8 +499,8 @@
 
     case t('Get Metro List'):
       $metros = variable_get('upcoming_event_metros', array());
-      $country_id = current(explode('-', $form_values['state']));
-      $state_id = next(explode('-', $form_values['state']));
+      $country_id = current(explode('-', $form_state['values']['state']));
+      $state_id = next(explode('-', $form_state['values']['state']));
       $vars = array(
         'api_key' => $_upcoming_event_api_key,
         'method' => 'metro.getList',
@@ -523,7 +518,7 @@
 
     case t('Get Venue List'):
       $venues = variable_get('upcoming_event_venues', array());
-      $ids = explode('-', $form_values['metro']);
+      $ids = explode('-', $form_state['values']['metro']);
       $country_id = $ids[0];
       $state_id = $ids[1];
       $metro_id = $ids[2];
@@ -563,7 +558,7 @@
       $vars = array(
         'api_key' => $_upcoming_event_api_key,
         'method' => 'venue.search',
-        'search_text' => $form_values['search_text'],
+        'search_text' => $form_state['values']['search_text'],
       );
       $response = upcoming_event_exec(_upcoming_event_parse_vars($vars), 'GET');
       break;
@@ -577,7 +572,7 @@
 /**
  * Implementation of hook_form_alter().
  */
-function upcoming_event_form_alter($form_id, &$form) {
+function upcoming_event_form_alter(&$form, $form_state, $form_id) {
   $admin_access = user_access('administer YUE settings');
   $access = $admin_access || user_access('publish to Upcoming.yahoo.com');
   if ($form_id == 'event_node_form' && $access) {
@@ -605,7 +600,7 @@
 
     $categories = variable_get('upcoming_event_categories', array());
     $options = array();
-    foreach($categories as $category_id => $info) {
+    foreach ($categories as $category_id => $info) {
       $options[$category_id] = $info['description'];
     }
     $form['upcoming_event']['category'] = array(
@@ -631,7 +626,7 @@
               $states[$country_id][$state_id]['name'] .' - '.
               $metros[$country_id][$state_id][$metro_id]['name']
             ][$venue_id] =
-              $info['name'] .($info['private'] ? '(private)' : '') ."\n\r". $info['address'];
+              $info['name'] . ($info['private'] ? '(private)' : '') ."\n\r". $info['address'];
           }
         }
       }
@@ -685,7 +680,7 @@
           'start_date' => $start_date,
           'start_time' => $start_time,
           'description' => $node->body,
-          'url' => $base_url. '/node/'. $node->nid,
+          'url' => $base_url . '/node/'. $node->nid,
         );
         if ($node->event_end > $node->event_start) {
           $end_date = date('Y-m-d', $node->event_end);
@@ -713,7 +708,7 @@
     case 'view':
       if ($node->upcoming_event['event_id']) {
         $node->content['body']['#value'] =
-          l(t('View at Upcoming.yahoo.com'), 'http://upcoming.yahoo.com/event/'. $node->upcoming_event['event_id']).
+          l(t('View at Upcoming.yahoo.com'), 'http://upcoming.yahoo.com/event/'. $node->upcoming_event['event_id']) . 
           $node->content['body']['#value'];
       }
       break;
Index: upcoming_event/upcoming_event.info
===================================================================
--- upcoming_event/upcoming_event.info	(revision 1)
+++ upcoming_event/upcoming_event.info	(working copy)
@@ -1,10 +1,5 @@
 ; $Id: upcoming_event.info,v 1.1 2008/07/30 04:53:53 develCuy Exp $
 name = Yahoo's Upcoming Event
 description = "Very simple module to publish Events via Yahoo!'s Upcoming API."
-dependencies = event
-
-; Information added by drupal.org packaging script on 2010-11-12
-version = "5.x-1.x-dev"
-project = "upcoming_event"
-datestamp = "1289564764"
-
+core=6.x
+dependencies[] = event
