Revision: 48583
Author: dale
Date: 2009-03-19 17:09:25 +0000 (Thu, 19 Mar 2009)
Log Message:
-----------
minor fixes/rewording of parent stream reference
Modified Paths:
--------------
trunk/extensions/MetavidWiki/includes/MV_GlobalFunctions.php
trunk/extensions/MetavidWiki/includes/MV_Index.php
trunk/extensions/MetavidWiki/includes/specials/MV_SpecialMediaSearch.php
trunk/extensions/MetavidWiki/languages/MV_Messages.php
trunk/extensions/MetavidWiki/skins/mv_search.js
Modified: trunk/extensions/MetavidWiki/includes/MV_GlobalFunctions.php
===================================================================
--- trunk/extensions/MetavidWiki/includes/MV_GlobalFunctions.php
2009-03-19 15:04:39 UTC (rev 48582)
+++ trunk/extensions/MetavidWiki/includes/MV_GlobalFunctions.php
2009-03-19 17:09:25 UTC (rev 48583)
@@ -672,18 +672,22 @@
return sprintf( "%d:%02d:%02d", $dur['hours'], $dur['minutes'],
$dur['seconds'] );
}
}
-function seconds2Description( $seconds, $short=false){
+function seconds2Description( $seconds, $short=false, $singular=false){
$dur = time_duration_2array( $seconds );
$o='';
- if( $dur['hours'] )
- $o.= wfMsg('mv_hours', intval( $dur['hours']) );
- if( $dur['minutes'] ){
+ if( $dur['hours'] != 0 ){
+ $msg = ($singular)?'mv_hours_singular':'mv_hours';
+ $o.= wfMsg($msg, intval( $dur['hours']) );
+ }
+ if( $dur['minutes'] != 0 ){
+ $msg = ($singular)?'mv_minutes_singular':'mv_minutes';
$o.=($o!='')?' ':'';
- $o.= wfMsg('mv_minutes', intval( $dur['minutes']) );
- }
- if( $short==false && $dur['seconds'] ){
+ $o.= wfMsg($msg, intval( $dur['minutes']) );
+ }
+ if( ( $short == false || $o == '' ) && $dur['seconds'] ){
+ $msg = ($singular)?'mv_seconds_singular':'mv_seconds';
$o.=($o!='')?' ':'';
- $o.= wfMsg('mv_seconds', intval( $dur['seconds']) );
+ $o.= wfMsg($msg, intval( $dur['seconds']) );
}
return $o;
}
Modified: trunk/extensions/MetavidWiki/includes/MV_Index.php
===================================================================
--- trunk/extensions/MetavidWiki/includes/MV_Index.php 2009-03-19 15:04:39 UTC
(rev 48582)
+++ trunk/extensions/MetavidWiki/includes/MV_Index.php 2009-03-19 17:09:25 UTC
(rev 48583)
@@ -511,8 +511,8 @@
__METHOD__,
$options );
- //echo "SQL:".$dbr->lastQuery($result)." \n";
- //die;
+ //echo "SQL:".$dbr->lastQuery($result)." \n";
+ //die;
// $result = $dbr->query($sql, 'MV_Index:doFiltersQuery_base');
$this->numResults = $dbr->numRows( $result );
Modified:
trunk/extensions/MetavidWiki/includes/specials/MV_SpecialMediaSearch.php
===================================================================
--- trunk/extensions/MetavidWiki/includes/specials/MV_SpecialMediaSearch.php
2009-03-19 15:04:39 UTC (rev 48582)
+++ trunk/extensions/MetavidWiki/includes/specials/MV_SpecialMediaSearch.php
2009-03-19 17:09:25 UTC (rev 48583)
@@ -416,8 +416,9 @@
$clip_desc_txt = 'Speech By ' .
$personTitle->getText();
}
- $pmeta_out.='This clip is part of a '.
seconds2Description ( $pMvTitle->getSegmentDuration() ). ' ' .
-
$sk->makeKnownLinkObj($pAnnoStreamLink, $clip_desc_txt );
+ $pmeta_out.='This '.
$sk->makeKnownLinkObj($pAnnoStreamLink, seconds2Description (
$mvTitle->getSegmentDuration(), true, true ) ).
+ ' clip is part
of a larger '.
+
$sk->makeKnownLinkObj($pAnnoStreamLink, seconds2Description (
$pMvTitle->getSegmentDuration(), true, true ) ) . ' Speech';
if($pmvd->category){
$pmeta_out.='<br>Covering: ';
$coma='';
@@ -859,9 +860,9 @@
if ( $f['t'] != 'match' ) // no desc
for text search
$o .= ( $query_key ) ? $a : $a
. wfMsg( 'mv_' . $f['t'] ) . ' ';
if ( $f['t'] == 'date_range' ) { // handle
special case of date range:
- $o .= wfMsg( 'mv_time_separator', $bo .
htmlspecialchars( $f['vs'] ) . $bc, $bo . htmlspecialchars( $f['ve'] ) . $bc );
+ $o .= ' '+ wfMsg( 'mv_time_separator',
$bo . htmlspecialchars( $f['vs'] ) . $bc, $bo . htmlspecialchars( $f['ve'] ) .
$bc );
} else {
- $o .= $bo . str_replace( '_', ' ',
htmlspecialchars( $f['v'] ) ) . $bc;
+ $o .=' '. $bo . str_replace( '_', ' ',
htmlspecialchars( $f['v'] ) ) . $bc .' ';
}
}
}
Modified: trunk/extensions/MetavidWiki/languages/MV_Messages.php
===================================================================
--- trunk/extensions/MetavidWiki/languages/MV_Messages.php 2009-03-19
15:04:39 UTC (rev 48582)
+++ trunk/extensions/MetavidWiki/languages/MV_Messages.php 2009-03-19
17:09:25 UTC (rev 48583)
@@ -427,8 +427,11 @@
'mv_other_options' => 'Other options',
'mv_contextmenu_opt' => 'Enable context menus',
'mv_hours' => '$1 {{PLURAL:$1|hour|hours}} ',
+ 'mv_hours_singular' => '$1 hour',
'mv_minutes' => '$1 {{PLURAL:$1|minute|minutes}}',
+ 'mv_minutes_singular' => '$1 minute',
'mv_seconds' => '$1 {{PLURAL:$1|second|seconds}}',
+ 'mv_seconds_singular' => '$1 second',
'mv_stream_length' => 'Total video length: ',
'mv_sequence_timeline' => 'Sequence timeline:',
Modified: trunk/extensions/MetavidWiki/skins/mv_search.js
===================================================================
--- trunk/extensions/MetavidWiki/skins/mv_search.js 2009-03-19 15:04:39 UTC
(rev 48582)
+++ trunk/extensions/MetavidWiki/skins/mv_search.js 2009-03-19 17:09:25 UTC
(rev 48583)
@@ -389,6 +389,8 @@
js_log('selected:' + v.innerHTML );
//update the image:
$j('#mv_person_img_'+inx).attr('src',
$j(v).children('img').attr('src'));
+ //update the text:
+ $j('#mv_person_input_'+inx).val(
$j('#mv_person_input_'+inx).val().replace('_', ' ') );
},
formatItem:function(row){
//return '<img width="44" src="'+ row[2] +
'">'+row[1];
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs