Index: trunk/extensions/MetavidWiki/maintenance/metavid2mvWiki.inc.php |
— | — | @@ -457,8 +457,7 @@ |
458 | 458 | |
459 | 459 | |
460 | 460 | // given a stream name it pulls all metavid stream data and builds semantic wiki page |
461 | | -function mv_semantic_stream_desc( & $mvTitle, & $stream ) { |
462 | | - global $start_time, $end_time; |
| 461 | +function mv_semantic_stream_desc( & $mvTitle, & $stream ) { |
463 | 462 | /*$sql = "SELECT * FROM `metavid`.`streams` WHERE `name` LIKE '" . $mvTitle->getStreamName() . "'"; |
464 | 463 | $dbr = wfGetDB(DB_SLAVE); |
465 | 464 | $res = $dbr->query($sql); |
— | — | @@ -466,7 +465,15 @@ |
467 | 466 | $stream = $dbr->fetchObject($res);*/ |
468 | 467 | $stream_id = $stream->id; |
469 | 468 | $out = ''; |
| 469 | + //(if we have old version of stream copy over is properties) |
| 470 | + if( isset( $stream->org_start_time ) ) |
| 471 | + $stream->date_start_time =$stream->org_start_time; |
| 472 | + |
470 | 473 | |
| 474 | + $start_time = $stream->date_start_time; |
| 475 | + |
| 476 | + |
| 477 | + |
471 | 478 | // add links/generic text at the start |
472 | 479 | $date = date( 'Ymd', $start_time ); |
473 | 480 | $cspan_date = date( 'Y-m-d', $start_time ); |
— | — | @@ -554,9 +561,9 @@ |
555 | 562 | $dbw->commit(); |
556 | 563 | // more semantic properties |
557 | 564 | $out .= "\n\n"; |
558 | | - $out .= '[[stream_duration::' . ( $end_time - $start_time ) . '| ]]' . "\n"; |
| 565 | + $out .= '[[stream_duration::' . ( $mvTitle->getDuration() ) . '| ]]' . "\n"; |
559 | 566 | if ( $stream->org_start_time ) { |
560 | | - $out .= '[[original_date::' . $stream->org_start_time . '| ]]'; |
| 567 | + $out .= '[[original_date::' . $stream->date_start_time . '| ]]'; |
561 | 568 | } |
562 | 569 | } |
563 | 570 | } |