r43501 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r43500‎ | r43501 | r43502 >
Date:19:52, 14 November 2008
Author:dale
Status:deferred
Tags:
Comment:
minor fix to date format
Modified paths:
  • /trunk/extensions/MetavidWiki/maintenance/metavid2mvWiki.inc.php (modified) (history)

Diff [purge]

Index: trunk/extensions/MetavidWiki/maintenance/metavid2mvWiki.inc.php
@@ -457,8 +457,7 @@
458458
459459
460460 // 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 ) {
463462 /*$sql = "SELECT * FROM `metavid`.`streams` WHERE `name` LIKE '" . $mvTitle->getStreamName() . "'";
464463 $dbr = wfGetDB(DB_SLAVE);
465464 $res = $dbr->query($sql);
@@ -466,7 +465,15 @@
467466 $stream = $dbr->fetchObject($res);*/
468467 $stream_id = $stream->id;
469468 $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+
470473
 474+ $start_time = $stream->date_start_time;
 475+
 476+
 477+
471478 // add links/generic text at the start
472479 $date = date( 'Ymd', $start_time );
473480 $cspan_date = date( 'Y-m-d', $start_time );
@@ -554,9 +561,9 @@
555562 $dbw->commit();
556563 // more semantic properties
557564 $out .= "\n\n";
558 - $out .= '[[stream_duration::' . ( $end_time - $start_time ) . '| ]]' . "\n";
 565+ $out .= '[[stream_duration::' . ( $mvTitle->getDuration() ) . '| ]]' . "\n";
559566 if ( $stream->org_start_time ) {
560 - $out .= '[[original_date::' . $stream->org_start_time . '| ]]';
 567+ $out .= '[[original_date::' . $stream->date_start_time . '| ]]';
561568 }
562569 }
563570 }

Status & tagging log