Changeset 91
- Timestamp:
- 08/01/07 23:16:27 (5 years ago)
- File:
-
- 1 edited
-
openweather/openweather.module (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
openweather/openweather.module
r90 r91 88 88 if (arg(0) == 'node' && is_numeric(arg(1))) { 89 89 $node = node_load(arg(1)); 90 90 if ($node->type == 'openweather'){ 91 91 $items[] = array('path' => 'node/'. arg(1), 92 92 'title' => t('view openweather'), … … 108 108 'weight' => 3, 109 109 'type' => MENU_LOCAL_TASK); 110 } 110 111 } 111 112 } … … 438 439 } 439 440 440 $r = db_query("SELECT time(`time`) AS `timevalue`, unix_timestamp(`time`) as `timestamp`, $type FROM {openweather_readings} WHERE nid = $nid AND `time` >= ".(time() - (60*60*24)) . " ORDER BY `time`" );441 $r = db_query("SELECT time(`time`) AS `timevalue`, unix_timestamp(`time`) as `timestamp`, $type FROM {openweather_readings} WHERE nid = $nid ORDER BY `time` DESC LIMIT 144" ); 441 442 442 443 #$results = openweather_get_values($node); … … 457 458 $g->x_data = array_merge($g->x_data, array($e->timevalue=>$e->timestamp)); 458 459 $g->y_data[$type][] = $e->$type; 460 //echo $e->$type.",".$e->timevalue.",".$e->timestamp."<br>"; 459 461 if ($minY == null || $e->$type < $minY) $minY = $e->$type; 460 462 } 463 $g->x_data = array_reverse($g->x_data); 464 $g->y_data[$type] = array_reverse($g->y_data[$type]); 461 465 462 466 $g->y_format[$type] = array('colour'=>'red', 'line'=>'brush', 'brush_size'=>2);
Note: See TracChangeset
for help on using the changeset viewer.
