r99812 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r99811‎ | r99812 | r99813 >
Date:21:26, 14 October 2011
Author:reedy
Status:deferred
Tags:
Comment:
Fix comments
Modified paths:
  • /trunk/extensions/MetavidWiki/includes/MV_AutoCompleteCache.php (modified) (history)
  • /trunk/extensions/MetavidWiki/includes/MV_EditSequencePage.php (modified) (history)
  • /trunk/extensions/MetavidWiki/includes/MV_EditStreamPage.php (modified) (history)
  • /trunk/extensions/MetavidWiki/includes/MV_GlobalFunctions.php (modified) (history)
  • /trunk/extensions/MetavidWiki/includes/MV_Hooks.php (modified) (history)
  • /trunk/extensions/MetavidWiki/includes/MV_Image.php (modified) (history)
  • /trunk/extensions/MetavidWiki/includes/MV_ImageGallery.php (modified) (history)
  • /trunk/extensions/MetavidWiki/includes/MV_Index.php (modified) (history)
  • /trunk/extensions/MetavidWiki/includes/MV_MagicWords.php (modified) (history)
  • /trunk/extensions/MetavidWiki/includes/MV_MetavidInterface/MV_Component.php (modified) (history)
  • /trunk/extensions/MetavidWiki/includes/MV_MetavidInterface/MV_EditPageAjax.php (modified) (history)
  • /trunk/extensions/MetavidWiki/includes/MV_MetavidInterface/MV_MetavidInterface.php (modified) (history)
  • /trunk/extensions/MetavidWiki/includes/MV_MetavidInterface/MV_Navigator.php (modified) (history)
  • /trunk/extensions/MetavidWiki/includes/MV_MetavidInterface/MV_Overlay.php (modified) (history)
  • /trunk/extensions/MetavidWiki/includes/MV_MetavidInterface/MV_PageHistoryAjax.php (modified) (history)
  • /trunk/extensions/MetavidWiki/includes/MV_MetavidInterface/MV_SequencePlayer.php (modified) (history)
  • /trunk/extensions/MetavidWiki/includes/MV_MetavidInterface/MV_SequenceTools.php (modified) (history)
  • /trunk/extensions/MetavidWiki/includes/MV_MetavidInterface/MV_StreamMeta.php (modified) (history)
  • /trunk/extensions/MetavidWiki/includes/MV_MetavidInterface/MV_Tools.php (modified) (history)
  • /trunk/extensions/MetavidWiki/includes/MV_MetavidInterface/MV_VideoPlayer.php (modified) (history)
  • /trunk/extensions/MetavidWiki/includes/MV_OggHandler.php (modified) (history)
  • /trunk/extensions/MetavidWiki/includes/MV_Settings.php (modified) (history)
  • /trunk/extensions/MetavidWiki/includes/MV_Stream.php (modified) (history)
  • /trunk/extensions/MetavidWiki/includes/MV_StreamFile.php (modified) (history)
  • /trunk/extensions/MetavidWiki/includes/MV_StreamImage.php (modified) (history)
  • /trunk/extensions/MetavidWiki/includes/MV_Title.php (modified) (history)
  • /trunk/extensions/MetavidWiki/includes/articlepages/MV_CategoryPage.php (modified) (history)
  • /trunk/extensions/MetavidWiki/includes/articlepages/MV_DataPage.php (modified) (history)
  • /trunk/extensions/MetavidWiki/includes/articlepages/MV_SequencePage.php (modified) (history)
  • /trunk/extensions/MetavidWiki/includes/articlepages/MV_StreamPage.php (modified) (history)
  • /trunk/extensions/MetavidWiki/includes/specials/MV_SpecialCRUDStream.php (modified) (history)
  • /trunk/extensions/MetavidWiki/includes/specials/MV_SpecialExport.php (modified) (history)
  • /trunk/extensions/MetavidWiki/includes/specials/MV_SpecialListStreams.php (modified) (history)
  • /trunk/extensions/MetavidWiki/includes/specials/MV_SpecialMVAdmin.php (modified) (history)
  • /trunk/extensions/MetavidWiki/includes/specials/MV_SpecialMediaSearch.php (modified) (history)
  • /trunk/extensions/MetavidWiki/languages/MV_Language.php (modified) (history)
  • /trunk/extensions/MetavidWiki/languages/MV_Messages.php (modified) (history)
  • /trunk/extensions/MetavidWiki/maintenance/MV_TaskRunner.php (modified) (history)
  • /trunk/extensions/MetavidWiki/maintenance/maintenance_util.inc.php (modified) (history)
  • /trunk/extensions/MetavidWiki/maintenance/metavid2mvWiki.inc.php (modified) (history)
  • /trunk/extensions/MetavidWiki/maintenance/metavid2mvWiki.php (modified) (history)
  • /trunk/extensions/MetavidWiki/maintenance/ogg_thumb_insert.php (modified) (history)
  • /trunk/extensions/MetavidWiki/maintenance/scrape_and_insert.inc.php (modified) (history)
  • /trunk/extensions/MetavidWiki/maintenance/scrape_and_insert.php (modified) (history)
  • /trunk/extensions/MetavidWiki/maintenance/video_ocr_thumb_insert.php (modified) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_embed/flvServer/mvFlvServer.php (modified) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_embed/oggServer/OggChopRequestHanlder.php (modified) (history)

Diff [purge]

Index: trunk/extensions/MetavidWiki/maintenance/scrape_and_insert.inc.php
@@ -1,5 +1,5 @@
22 <?php
3 -/*
 3+/**
44 * scrape_and_insert.inc.php Created on Feb 14, 2008
55 *
66 * All Metavid Wiki code is Released under the GPL2
Index: trunk/extensions/MetavidWiki/maintenance/video_ocr_thumb_insert.php
@@ -1,5 +1,5 @@
22 <?php
3 -/*
 3+/**
44 * video_ocr_thumb_insert.php Created on January, 2009
55 * based on ogg_thumb_insert
66 * All Metavid Wiki code is Released under the GPL2
@@ -14,7 +14,7 @@
1515 // include commandLine.inc from the mediaWiki maintance dir:
1616 require_once ( '../../../maintenance/commandLine.inc' );
1717 require_once ( 'metavid2mvWiki.inc.php' );
18 -
 18+
1919 // include util functions:
2020 require_once( 'maintenance_util.inc.php' );
2121
@@ -23,13 +23,13 @@
2424 USAGE
2525 php video_thumb_insert.php stream_name interval [options]
2626
27 -EXAMPLE" we get a frame every 5 seconds from input file stream.mpeg:
28 - video2image2mvwiki.php stream_name [options]
 27+EXAMPLE" we get a frame every 5 seconds from input file stream.mpeg:
 28+ video2image2mvwiki.php stream_name [options]
2929
3030 OPTIONS:
3131 --interval @default 5 seconds
32 - --overwrite_image @default no overwrite; if set will force image output
33 - --use_file $file //the full path to the file you want to use to generate thumbnails
 32+ --overwrite_image @default no overwrite; if set will force image output
 33+ --use_file $file //the full path to the file you want to use to generate thumbnails
3434
3535 DURATION is scraped from ffmpeg
3636
@@ -43,7 +43,7 @@
4444 if(isset($args[0])){
4545 $stream_name = $args[0];
4646 }else{
47 - die('no stream name provided'."\n");
 47+ die('no stream name provided'."\n");
4848 }
4949 //default options:
5050 $interval = 5;
@@ -60,7 +60,7 @@
6161 $filename = $options['use_file'];
6262 }else{
6363 $filename = $workingdir .'/'. $stream_name . '.mpeg';
64 -}
 64+}
6565 $duration = getDuration($filename);
6666
6767
@@ -68,36 +68,36 @@
6969 $srt_file = $workingdir . '/' . $stream_name . '.srt';
7070 $srt_ary = file( $srt_file );
7171 if($srt_ary === false)
72 - die(' could not find srt file: ' . $srt_file);
73 -
74 -//time stamp:
75 -$org_start_time = intval( trim( str_replace( 'starttime' , '', $srt_ary[2] )) );
76 -
77 -class streamObject{ };
 72+ die(' could not find srt file: ' . $srt_file);
 73+
 74+//time stamp:
 75+$org_start_time = intval( trim( str_replace( 'starttime' , '', $srt_ary[2] )) );
 76+
 77+class streamObject{ };
7878 $stream = new streamObject();
7979 $stream->name = $stream_name;
80 -$stream->date_start_time = $org_start_time;
 80+$stream->date_start_time = $org_start_time;
8181 $stream->sync_status = 'in_sync';
8282 $stream->duration = $duration;
83 -
8483
 84+
8585 $mvTitle = new MV_Title( 'Stream:' . $stream_name );
8686 if ( !$mvTitle->doesStreamExist() ) {
8787 print $stream_name . " does not exist ... creating\n";
88 - // print 'do stream desc'."\n";
89 -
 88+ // print 'do stream desc'."\n";
 89+
9090 if(!isset($MVStreams))
9191 $MVStreams = array();
92 -
93 - // init the stream (legacy from old stream insert system)
94 - $MVStreams[ $stream->name ] = new MV_Stream( $stream );
95 -
 92+
 93+ // init the stream (legacy from old stream insert system)
 94+ $MVStreams[ $stream->name ] = new MV_Stream( $stream );
 95+
9696 do_add_stream( $mvTitle, $stream );
9797 }
9898 $stream_id = $mvTitle->getStreamId();
9999 print 'got stream id: '. $stream_id . "\n";
100100
101 -//check for & update stream files:
 101+//check for & update stream files:
102102 do_stream_file_check( $stream );
103103
104104
@@ -108,9 +108,9 @@
109109 }
110110 echo "working on: $filename \n";
111111 $ocroutput = "";
112 -//@@TODO we should do sequential output and parse the OCR file if it already exists.
 112+//@@TODO we should do sequential output and parse the OCR file if it already exists.
113113
114 -//make sure we can write to the ocr file:
 114+//make sure we can write to the ocr file:
115115 $ocrfileloc = "$workingdir/$stream_name.ocr";
116116 $fh = @fopen($ocrfileloc, 'a') or die ("\nError: can't write to ocr file\n");
117117 fclose($fh);
@@ -118,7 +118,7 @@
119119
120120 $dbw = $dbr = wfGetDB( DB_MASTER );
121121 for ( $i = 0; $i < $duration; $i += $interval ) {
122 - //only run the ffmpeg cmd if we have to:
 122+ //only run the ffmpeg cmd if we have to:
123123 if(!is_file("{$filedir}/{$i}.jpg") || $overwrite_image){
124124 if( is_file("{$filedir}/{$i}.jpg") ){
125125 print "overwriting image: {$i}.jpg\n";
@@ -126,23 +126,23 @@
127127 }
128128 shell_exec( "ffmpeg -ss $i -i {$filename} -vcodec mjpeg -vframes 1 -an -f rawvideo -y {$filedir}/{$i}.jpg 2>&1" );
129129 }
130 -
 130+
131131 if(is_file("{$filedir}/{$i}.jpg")){
132132 //insert the image into the db:
133133 $dbw->query( "INSERT INTO `mv_stream_images` (`stream_id`, `time`) VALUES ($stream_id, $i)" );
134 -
 134+
135135 //get ocr:
136136 shell_exec("convert {$filedir}/{$i}.jpg -crop 457x30+63+358 {$workingdir}/temp.{$stream_id}.ocr.tif && convert {$workingdir}/temp.{$stream_id}.ocr.tif -resize 300% -level 10%,1,20% -monochrome +compress {$workingdir}/temp.{$stream_id}.ocr.tif");
137137 shell_exec("tesseract {$workingdir}/temp.{$stream_id}.ocr.tif {$workingdir}/ocrtemp{$stream_id} nobatch lettersonly 2>&1");
138138 $ocr = shell_exec("tail {$workingdir}/ocrtemp{$stream_id}.txt") ." at " . seconds2npt($i) ." \n";
139139 echo 'got ocr:'. $ocr;
140 - $ocroutput .= $ocr;
141 -
 140+ $ocroutput .= $ocr;
 141+
142142 }else{
143 - print "failed to create file: {$filedir}/{$i}.jpg \n";
 143+ print "failed to create file: {$filedir}/{$i}.jpg \n";
144144 }
145145 }
146 -//remove temporary files:
 146+//remove temporary files:
147147 shell_exec("rm {$workingdir}/ocrtemp{$i}.txt");
148148 shell_exec("rm {$workingdir}/temp.{$stream_id}.ocr.tif");
149149
Index: trunk/extensions/MetavidWiki/maintenance/MV_TaskRunner.php
@@ -1,5 +1,5 @@
22 <?php
3 -/*
 3+/**
44 * MV_taskRunner.php Created on Nov 29, 2007
55 *
66 * All Metavid Wiki code is Released Under the GPL2
Index: trunk/extensions/MetavidWiki/maintenance/ogg_thumb_insert.php
@@ -1,5 +1,5 @@
22 <?php
3 -/*
 3+/**
44 * ogg_thum_insert.php Created on Mar 13, 2008
55 *
66 * All Metavid Wiki code is Released under the GPL2
Index: trunk/extensions/MetavidWiki/maintenance/metavid2mvWiki.php
@@ -1,5 +1,5 @@
22 <?php
3 -/*
 3+/**
44 * metavid2mvWiki.php Created on May 8, 2007
55 *
66 * All Metavid Wiki code is Released under the GPL2
@@ -19,12 +19,12 @@
2020
2121 // include util functions:
2222 require_once( 'maintenance_util.inc.php' );
23 -/*
 23+/**
2424 * assume the wiki user has access to the metavid table and that the
2525 * metavid table is titled `metavid`
2626 */
2727
28 -/*
 28+/**
2929 * default pages (@@todo move to install script)
3030
3131
@@ -90,19 +90,19 @@
9191 'all_sync_past_date' --date [mm/dd/yy] all in_sync streams past date (-d option required)
9292 [stream_name] will insert all records for the given stream name
9393 'people' [person_name] will insert all the people articles optional followed by a person name
94 - 'bill' [bill_key]? ...empty bill key will insert all bills based on gov track subject page
 94+ 'bill' [bill_key]? ...empty bill key will insert all bills based on gov track subject page
9595 'interest' will insert interests (uses people as base so run people first)
9696 'update_templates' will update templates & some semantic properties
9797 'file_check' checks inserted streams file urls/pointers
9898 'do_stream_date_check'
99 - 'do_remove_orphaned_streams'
100 - 'mvd_consistancy_check' makes sure all mvd text layers are consistent
 99+ 'do_remove_orphaned_streams'
 100+ 'mvd_consistancy_check' makes sure all mvd text layers are consistent
101101
102102 EOT;
103103 exit ();
104104 }
105105
106 -/*
 106+/**
107107 * set up the article set for the given stream/set
108108 */
109109 $mvForceUpdate = ( isset( $options['force'] ) ) ? true:false;
@@ -120,7 +120,7 @@
121121 case 'all_sync_past_date':
122122 if ( !isset( $options['date'] ) )die( 'date missing' . "\n" );
123123 do_stream_insert( 'all_sync_past_date' );
124 - break;
 124+ break;
125125 case 'people' :
126126 $force = ( isset( $options['force'] ) ) ? true:false;
127127 $person_name = ( isset( $args[1] ) ) ? $args[1]:'';
@@ -156,5 +156,5 @@
157157 break;
158158 default :
159159 do_stream_insert( 'stream', $args[0] );
160 - break;
 160+ break;
161161 }
Index: trunk/extensions/MetavidWiki/maintenance/metavid2mvWiki.inc.php
@@ -1,5 +1,5 @@
22 <?php
3 -/*
 3+/**
44 * metavid2mvWiki.inc.php Created on Jan 19, 2008
55 *
66 * All Metavid Wiki code is Released under the GPL2
@@ -483,7 +483,7 @@
484484 do_update_wiki_page( 'Ht_en:' . $page_title, $page_body, MV_NS_MVD );
485485 }
486486 }
487 -/*
 487+/**
488488 * for each image add it to the image directory
489489 */
490490 function do_process_images( $stream, $force = false ) {
Index: trunk/extensions/MetavidWiki/maintenance/scrape_and_insert.php
@@ -1,5 +1,5 @@
22 <?php
3 -/*
 3+/**
44 * scrape_and_insert.php Created on Oct 1, 2007
55 *
66 * All Metavid Wiki code is Released Under the GPL2
@@ -38,7 +38,7 @@
3939 EOT;
4040 exit();
4141 }
42 -/*
 42+/**
4343 * procc the request
4444 */
4545 function proc_args() {
Index: trunk/extensions/MetavidWiki/maintenance/maintenance_util.inc.php
@@ -1,5 +1,5 @@
22 <?php
3 -/*
 3+/**
44 * maintenance_util.inc.php Created on Jan 19, 2008
55 *
66 * All Metavid Wiki code is Released under the GPL2
@@ -13,7 +13,7 @@
1414 * Maintenance Utility Functions:
1515 */
1616 require_once ( '../../../maintenance/commandLine.inc' );
17 - /*
 17+/**
1818 * set up the bot user:
1919 */
2020 $botUserName = 'MvBot';
Index: trunk/extensions/MetavidWiki/includes/MV_GlobalFunctions.php
@@ -419,7 +419,7 @@
420420 }
421421 }
422422
423 -/*
 423+/**
424424 * Utility functions:
425425 */
426426 function mvOutputJSON( & $data ) {
@@ -513,7 +513,7 @@
514514 return true;
515515 return false;
516516 }
517 -/*
 517+/**
518518 * simple array increment (supports up two 2 dim deep)
519519 * should be a cleaner way to write this... hmm...
520520 */
@@ -540,7 +540,7 @@
541541 }
542542 }
543543
544 -/*
 544+/**
545545 * takes ntp time of format hh:mm:ss and converts to seconds
546546 */
547547 function npt2seconds( $str_time ) {
@@ -558,7 +558,7 @@
559559 }
560560 return ( $hours * 3600 ) + ( $min * 60 ) + $sec;
561561 }
562 -/*
 562+/**
563563 * takes seconds duration and return hh:mm:ss time
564564 */
565565 function seconds2npt( $seconds, $short = false ) {
@@ -607,7 +607,7 @@
608608 }
609609 return $o;
610610 }
611 -/*
 611+/**
612612 * converts seconds to time unit array
613613 */
614614 function time_duration_2array ( $seconds, $periods = null ) {
@@ -644,7 +644,7 @@
645645 }
646646 return $values;
647647 }
648 -/*
 648+/**
649649 * direct output for quick creation of non editable pages (errors, stream access etc)
650650 */
651651 function mvOutputSpecialPage( $title, & $page ) {
@@ -719,7 +719,7 @@
720720 }
721721 }
722722
723 -/*
 723+/**
724724 * global MV_Stream server
725725 * @@todo cache this function
726726 */
Index: trunk/extensions/MetavidWiki/includes/MV_Stream.php
@@ -1,5 +1,5 @@
22 <?php
3 -/*
 3+/**
44 * MV_Stream.php Created on Apr 24, 2007
55 *
66 * All Metavid Wiki code is Released Under the GPL2
Index: trunk/extensions/MetavidWiki/includes/MV_StreamFile.php
@@ -1,17 +1,17 @@
22 <?php
3 -/*
 3+/**
44 * MV_StreamFiles.php Created on Sep 25, 2007
5 - *
 5+ *
66 * All Metavid Wiki code is Released Under the GPL2
77 * for more info visit http://metavid.org/wiki/Code
8 - *
 8+ *
99 * @author Michael Dale
1010 * @email dale@ucsc.edu
1111 * @url http://metavid.org
1212 */
1313 if ( !defined( 'MEDIAWIKI' ) ) die( 1 );
1414 /*
15 - * MvStreamFile handles the mapping of path types to urls &
 15+ * MvStreamFile handles the mapping of path types to urls &
1616 * active record style management of the mv_stream_files table
1717 */
1818 class MV_StreamFile {
@@ -23,8 +23,8 @@
2424 var $id = '';
2525 var $path = '';
2626 var $_parent_stream = null;
27 -
28 - // @@todo this should not be hard coded... read the header of the file? or extend path_type
 27+
 28+ // @@todo this should not be hard coded... read the header of the file? or extend path_type
2929 function getTypeForQK( $key ) {
3030 global $mvMsgContentTypeLookup;
3131 if ( isset( $mvMsgContentTypeLookup[$key] ) )
@@ -32,7 +32,7 @@
3333 }
3434 function __construct( &$parent_stream, $initRow = '' ) {
3535 $this->_parent_stream =& $parent_stream;
36 - // no init val.. populate from db
 36+ // no init val.. populate from db
3737 if ( $this->_parent_stream && $initRow == '' ) {
3838 $this->getStreamFileDB();
3939 } else {
@@ -52,7 +52,7 @@
5353 if ( isset( $mvMsgContentTypeLookup[$this->file_desc_msg] ) ) {
5454 return $mvMsgContentTypeLookup[$this->file_desc_msg];
5555 }
56 - // default content type?
 56+ // default content type?
5757 return 'application/octet-stream';
5858 }
5959 function updateValues( $initRow ) {
@@ -79,7 +79,7 @@
8080 'path' => $this->path
8181 ), __METHOD__ );
8282 } else {
83 - // update:
 83+ // update:
8484 $dbw->update( 'mv_stream_files', array(
8585 'base_offset' => $this->base_offset,
8686 'duration' => $this->duration,
@@ -106,14 +106,14 @@
107107 }
108108 }
109109 // @@todo as mentioned before we should better integrate with medaiWikis commons file system
110 - // returns the local path (if the video file is local) if not return null
 110+ // returns the local path (if the video file is local) if not return null
111111 function getLocalPath( $quality = null ) {
112112 global $mvLocalVideoLoc, $mvDefaultVideoQualityKey;
113113 if ( $quality == null )$quality = $mvDefaultVideoQualityKey;
114 -
 114+
115115 if ( !is_dir( $mvLocalVideoLoc ) )return null;
116116 if ( !is_file( $mvLocalVideoLoc . $this->_parent_stream->getStreamName() ) )return null;
117 - // all looks good return:
 117+ // all looks good return:
118118 return $mvLocalVideoLoc . $this->_parent_stream->getStreamName();
119119 }
120120 function getDuration(){
@@ -133,7 +133,7 @@
134134 return ( $this->path_type == 'url_anx' || $this->path_type=='mp4_stream' );
135135 }
136136 function getFullURL() {
137 - // @@todo check on path if local
 137+ // @@todo check on path if local
138138 return $this->getPath();
139139 }
140140 function get_desc() {
Index: trunk/extensions/MetavidWiki/includes/MV_EditStreamPage.php
@@ -1,5 +1,5 @@
22 <?php
3 -/*
 3+/**
44 * MV_EditStreamPage.php Created on Nov 28, 2007
55 *
66 * All Metavid Wiki code is Released Under the GPL2
Index: trunk/extensions/MetavidWiki/includes/MV_StreamImage.php
@@ -1,15 +1,15 @@
22 <?php
3 -/*
 3+/**
44 * MV_OggImage.php Created on Nov 29, 2007
5 - *
 5+ *
66 * All Metavid Wiki code is Released Under the GPL2
77 * for more info visit http://metavid.org/wiki/Code
8 - *
 8+ *
99 * @author Michael Dale
1010 * @email dale@ucsc.edu
1111 * @url http://metavid.org
12 - *
13 - * set up all the default settings (can be overwritten)
 12+ *
 13+ * set up all the default settings (can be overwritten)
1414 */
1515
1616 // two modes -stand alone- and -mediaWiki-
@@ -19,14 +19,14 @@
2020 // serves up images and does necessary transforms if the file does not exist
2121 // @@TODO in the future it would be ideal if it was integrated similar to oggHandler
2222 // http://www.mediawiki.org/wiki/Extension:OggHandler
23 -// (ie streams images use normal mediaWiki file handlers and
24 -// are placed in the image directory)
 23+// (ie streams images use normal mediaWiki file handlers and
 24+// are placed in the image directory)
2525 // * this is not easy to enforce while *Stream* is not tied to a given uploaded file*
26 -// all static functions:
 26+// all static functions:
2727 class MV_StreamImage {
2828 /*
2929 * getStreamImageURL
30 - *
 30+ *
3131 * @parm:
3232 * $stream_name: the unique stream name
3333 * $req_time: the requested time in seconds or ntp format: hh:mm:ss
@@ -36,15 +36,15 @@
3737 */
3838 function getStreamImageURL( $stream_id, $req_time = null, $req_size = null, $directLink = false ) {
3939 global $wgScript, $mvWebImgLoc, $mvLocalImgLoc, $mvExternalImages;
40 - // check global external image prefrence:
 40+ // check global external image prefrence:
4141 $req_size_out = ( $req_size != null ) ? '&size=' . $req_size :'';
4242 if ( $mvExternalImages ) {
4343 global $mvExternalImgServerPath;
44 - // try to get the stream_name for external requests:
 44+ // try to get the stream_name for external requests:
4545 $sn = MV_Stream::getStreamNameFromId( $stream_id );
4646 return $mvExternalImgServerPath . '?action=ajax&rs=mv_frame_server&stream_name=' . $sn . '&t=' . $req_time . $req_size_out;
4747 }
48 -
 48+
4949 // by default return a non-direct link so that javascript can modify the url to get time offsets
5050 if ( !$directLink ) {
5151 return $wgScript . '?action=ajax&rs=mv_frame_server&stream_id=' .
@@ -68,7 +68,7 @@
6969 return htmlspecialchars( $mvWebImgLoc ) . '/' . MV_StreamImage::getRelativeImagePath( $stream_id ) .
7070 '/' . htmlspecialchars( $req_time ) . htmlspecialchars( $s ) . '.' . htmlspecialchars( $ext );
7171 } else {
72 - // throw 'error finding image';
 72+ // throw 'error finding image';
7373 return MV_StreamImage::getMissingImageURL( $req_size );
7474 }
7575 }
@@ -78,7 +78,7 @@
7979 list( $im_width, $im_height, $ext ) = MV_StreamImage::getSizeType( $req_size );
8080 $s = '';
8181 if ( $req_size )$s = '_' . $im_width . 'x' . $im_height;
82 -
 82+
8383 if ( MV_StreamImage::getMissingImagePath( $req_size, $s, $ext ) ) {
8484 return htmlspecialchars( $mvWebImgLoc ) . '/images_not_available' . $s . '.' . $ext;
8585 }
@@ -88,12 +88,12 @@
8989 list( $im_width, $im_height, $ext ) = MV_StreamImage::getSizeType( $req_size );
9090 $s = '';
9191 if ( $req_size )$s = '_' . $im_width . 'x' . $im_height;
92 -
 92+
9393 if ( is_file( $mvLocalImgLoc . '/images_not_available' . $s . '.' . $ext ) ) {
9494 return htmlspecialchars( $mvLocalImgLoc ) .
9595 '/images_not_available' . htmlspecialchars( $s ) . '.' . htmlspecialchars( $ext );
9696 } else {
97 - // try and generate it;
 97+ // try and generate it;
9898 if ( !MV_StreamImage::doTransformImage( $mvLocalImgLoc . '/images_not_available.jpg',
9999 $mvLocalImgLoc . '/images_not_available' . $s . '.' . $ext,
100100 $im_width, $im_height, $ext ) ) {
@@ -104,23 +104,23 @@
105105 }
106106 }
107107 function getStreamImageRaw( $stream_id, $req_time = null, $req_size = null ) {
108 - //set out a long expire:
109 - //keep in the cache for a 90 days:
 108+ //set out a long expire:
 109+ //keep in the cache for a 90 days:
110110 header('Expires: ' . gmdate('D, d M Y H:i:s', time()+90*24*60*60) . ' GMT');
111 -
 111+
112112 // print "get raw img\n";
113113 $req_time = MV_StreamImage::procRequestTime( $stream_id, $req_time );
114114 list( $im_width, $im_height, $ext ) = MV_StreamImage::getSizeType( $req_size );
115 -
 115+
116116 if ( !$req_time ) {
117117 $img_path = $s = '_' . $im_width . 'x' . $im_height;
118118 }
119119 $img_path = MV_StreamImage::getLocalImagePath( $stream_id, $req_time, $req_size );
120120 list( $im_width, $im_height, $ext ) = MV_StreamImage::getSizeType( $req_size );
121121 if ( $ext == 'jpg' )header( "Content-type: image/jpeg" );
122 - if ( $ext == 'png' )header( "Content-type: image/png" );
 122+ if ( $ext == 'png' )header( "Content-type: image/png" );
123123 // print "img path: $img_path";
124 - // @@todo a redirect to real image (will serv from cache that way)
 124+ // @@todo a redirect to real image (will serv from cache that way)
125125 if ( is_file( $img_path ) ) {
126126 // print "file present: $img_path";
127127 @readfile( $img_path );
@@ -146,7 +146,7 @@
147147 // if($req_time<$mvImageGranularityRate)$req_time = $mvImageGranularityRate;
148148 $vars = " `id`, `time`, `time`-'$req_time' as distance ";
149149 $conds = " `stream_id`=" . mysql_real_escape_string( $stream_id ) . "
150 - AND (`time`-'$req_time')>=0
 150+ AND (`time`-'$req_time')>=0
151151 AND (`time`-'$req_time')<= " . mysql_real_escape_string( $mvImageGranularityRate );
152152 $opt['ORDER BY'] = ' `distance` ASC ';
153153 $opt['LIMIT'] = 1;
@@ -160,7 +160,7 @@
161161 if ( $dbr->numRows( $res ) == 0 ) {
162162 // could do a request to generate image for video here:
163163 if ( MV_StreamImage::genLocalStreamImage( $stream_id, $req_time, '320x240' ) ) {
164 - // we just generated the current request time return it as valid:
 164+ // we just generated the current request time return it as valid:
165165 return $req_time;
166166 } else {
167167 return false;
@@ -186,7 +186,7 @@
187187 } else {
188188 // Based on settings we may do an ffmpeg call here:
189189 // @@FFMPEG call goes here:
190 - // make the call to generate the image for that time:
 190+ // make the call to generate the image for that time:
191191 return MV_StreamImage::genLocalStreamImage( $stream_id, $req_time, $req_size );
192192 }
193193 } else {
@@ -198,17 +198,17 @@
199199 } else {
200200
201201 if ( !is_file( $base_img ) ) {
202 - // print "missing base img $base_img \n";
 202+ // print "missing base img $base_img \n";
203203 $img_file = MV_StreamImage::genLocalStreamImage( $stream_id, $req_time, $req_size );
204204 if ( is_file( $base_img ) ) {
205 - // got file successful:
 205+ // got file successful:
206206 // continue:
207207 } else {
208208 return false;
209209 }
210210 }
211211 // would be great to use mediaWIki's bitmap transform but not super easy to integrate...
212 - // @@todo eventually we should integrate with oggHanlder...
 212+ // @@todo eventually we should integrate with oggHanlder...
213213 // $thumb = Bitmap::doTransform($image)
214214 if ( !MV_StreamImage::doTransformImage( $base_img, $img_file, $im_width, $im_height, $ext ) ) {
215215 // print 'failed image transform\n';
@@ -223,7 +223,7 @@
224224 $gd_img_base = imagecreatefromjpeg( $base_img );
225225 $gd_img_dest = imagecreatetruecolor( $im_width, $im_height );
226226 imagecopyresampled( $gd_img_dest, $gd_img_base, 0, 0, 0, 0, $im_width, $im_height, $base_width, $base_height );
227 -
 227+
228228 if ( $ext == 'jpg' ) {
229229 // write out the image:
230230 if ( !imagejpeg( $gd_img_dest, $img_file, 90 ) ) {
@@ -242,7 +242,7 @@
243243 }
244244 imagedestroy( $gd_img_base );
245245 imagedestroy( $gd_img_dest );
246 - // success:
 246+ // success:
247247 return true;
248248 }
249249 function getLocalImageDir( $stream_id ) {
@@ -281,11 +281,11 @@
282282 $width = 480; $height = 360;
283283 break;
284284 case 'full': case '720x540':
285 - // this is somewhat legacy as our capture card is now set to 512x384 but in a HQ setup could be useful.
 285+ // this is somewhat legacy as our capture card is now set to 512x384 but in a HQ setup could be useful.
286286 $width = 720; $height = 540;
287287 break;
288288 default:
289 - // defaults to 320x240 if size does not match above:
 289+ // defaults to 320x240 if size does not match above:
290290 $width = 320; $height = 240;
291291 break;
292292 }
@@ -320,7 +320,7 @@
321321 MV_StreamImage::getLocalStreamPath( $stream_id );
322322
323323 if ( is_file( $streampath ) ) {
324 - // check if the ffmpeg extension is installed:
 324+ // check if the ffmpeg extension is installed:
325325 $extension = "ffmpeg";
326326 $extension_soname = $extension . "." . PHP_SHLIB_SUFFIX;
327327 $extension_fullname = PHP_EXTENSION_DIR . "/" . $extension_soname;
@@ -354,7 +354,7 @@
355355 $insAry = array ();
356356 $insAry[stream_id] = $stream_id;
357357 $insAry[time] = $req_time;
358 -
 358+
359359 $db = & wfGetDB( DB_WRITE );
360360 if ( $db->insert( $mvStreamImageTable, $insAry ) ) {
361361 return $img_file;
@@ -369,7 +369,7 @@
370370
371371 function getLocalStreamPath ( $stream_id, $quality = '' ) {
372372 global $mvStreamTable, $mvLocalVideoLoc;
373 - // grab streamFile
 373+ // grab streamFile
374374 $stream =& mvGetMVStream( array( 'id' => $stream_id ) );
375375 $stream->db_load_stream();
376376 $streamFile = new MV_StreamFile( $stream );
Index: trunk/extensions/MetavidWiki/includes/MV_MagicWords.php
@@ -1,5 +1,5 @@
22 <?php
3 -/*
 3+/**
44 * MV_MagicWords.php Created on May 16, 2007
55 *
66 * All Metavid Wiki code is Released under the GPL2
@@ -81,7 +81,7 @@
8282 function getTotalLength(){
8383 $dbr = & wfGetDB( DB_READ );
8484 $result =& $dbr->query('SELECT SUM( `duration` ) as `dur`
85 -FROM `mv_streams` ');
 85+FROM `mv_streams` ');
8686 if ( $dbr->numRows( $result ) == 0 ) {
8787 return '';
8888 } else {
@@ -101,7 +101,7 @@
102102 $ms->filters[] = array ( 'a' => 'and', 't' => 'bill', 'v' => $bill_name );
103103 $ms->doSearch( $log_search = false );
104104 return $ms->getUnifiedResultsHTML( $show_sidebar = false );
105 - }
 105+ }
106106 function getPersonOut( $sp_mode = 'speech_by' ) {
107107 if ( $this->params['person'] != '' ) {
108108 $person_name = $this->params['person'];
@@ -154,11 +154,11 @@
155155 $outItems = Array();
156156 while ( $row = $dbr->fetchObject( $result ) ) {
157157 $row->stream_id = $row->id;
158 - //$row->end_time = $row->duration;
159 - //get the first speech in that day:
160 - $o = $this->getItemOutput($row, array('use_mvd_time'=>true, 'remove_no_meta'=>true));
 158+ //$row->end_time = $row->duration;
 159+ //get the first speech in that day:
 160+ $o = $this->getItemOutput($row, array('use_mvd_time'=>true, 'remove_no_meta'=>true));
161161 if($o)
162 - $outItems[]=$o;
 162+ $outItems[]=$o;
163163 }
164164 return $this->formatOutputItems($outItems);
165165 }
@@ -168,7 +168,7 @@
169169 $dbr = & wfGetDB( DB_READ );
170170 $o = '';
171171 $vars = array( 'query_key', 'stream_id', 'start_time', 'end_time', 'COUNT(1) as hit_count' );
172 - $conds = array( 'view_date >=' . $dbr->addQuotes( $this->getStartTime() ) );
 172+ $conds = array( 'view_date >=' . $dbr->addQuotes( $this->getStartTime() ) );
173173 $options = array( 'GROUP BY' => 'query_key', 'ORDER BY' => '`hit_count` DESC ',
174174 'LIMIT' => intval( $this->params['num_results'] ) );
175175 $result = $dbr->select( 'mv_clipview_digest',
@@ -184,18 +184,18 @@
185185 while ( $row = $dbr->fetchObject( $result ) ) {
186186 $o = $this->getItemOutput($row);
187187 if($o)
188 - $outItems[]=$o;
 188+ $outItems[]=$o;
189189 }
190190 return $this->formatOutputItems($outItems);
191191 }
192 -
 192+
193193 }
194194 function getItemOutput( $row, $opt=array() ){
195195 global $wgUser;
196 - $sk = $wgUser->getSkin();
 196+ $sk = $wgUser->getSkin();
197197 //set defaults:
198198 $person_ht = $bill_ht = $category_ht = $o= '';
199 -
 199+
200200 if(!isset($row->start_time)){
201201 $row->start_time=0;
202202 }
@@ -213,7 +213,7 @@
214214 $options = array( 'limit' => 1 )
215215 );
216216 if ( count( $mvd_rows ) != 0 ) {
217 - reset( $mvd_rows );
 217+ reset( $mvd_rows );
218218 $mvd_row = current( $mvd_rows );
219219 if( isset($opt['use_mvd_time']) && $opt['use_mvd_time'] ){
220220 $row->start_time = $mvd_row->start_time;
@@ -239,7 +239,7 @@
240240 }
241241 global $wgContLang;
242242 $mvdNStxt = $wgContLang->getNsText(MV_NS_MVD);
243 -
 243+
244244 //grab categories if no bill or speech
245245 if( $this->params['display_cat'] || $mvd_out_html=='' ){
246246 $dbr = wfGetDB( DB_READ );
@@ -258,29 +258,29 @@
259259 $mvd_out_html.='</span><br />';
260260 }
261261 }
262 - }else{
 262+ }else{
263263 //we have not meta
264264 //if( isset($opt['remove_no_meta']) && $opt['remove_no_meta'])
265265 //return false;
266266 }
267 -
268 -
269 - // first make link and stream title:
 267+
 268+
 269+ // first make link and stream title:
270270 $mvStream = MV_Stream::newStreamByID( $row->stream_id );
271271 if( ! $mvStream->doesStreamExist() ){
272272 return false;
273273 }
274274 //limit our output range to < 20 min
275275 if( ($row->end_time - $row->start_time) > 20*60)
276 - $row->end_time = $row->start_time + 20*60;
277 -
 276+ $row->end_time = $row->start_time + 20*60;
 277+
278278 $nt = $mvStream->getStreamName() . '/' . seconds2npt( $row->start_time )
279279 . '/' . seconds2npt( $row->end_time );
280280 $mvTitle = new MV_Title( $nt, MV_NS_STREAM );
281 -
 281+
282282 $mvStreamTitle = Title :: MakeTitle( MV_NS_STREAM, $mvTitle->getNearStreamName( $extra_range = '0' ) );
283 -
284 -
 283+
 284+
285285 // output the image:
286286 $o .= $sk->makeKnownLinkObj( $mvStreamTitle,
287287 '<img alt="image for ' . $mvTitle->getStreamNameText() . ' ' .
@@ -304,8 +304,8 @@
305305 $sk->makeKnownLinkObj( $mvStreamTitle,
306306 $title_span,
307307 'tl=1' ) .
308 - '</span>';
309 - //add mvd_annotative output:
 308+ '</span>';
 309+ //add mvd_annotative output:
310310 $o.=$mvd_out_html;
311311 return $o;
312312 }
@@ -366,7 +366,7 @@
367367 $dbr->tableName( 'mv_query_key_lookup' ) . '.query_key ' .
368368 ' ) ';
369369 $conds = '`time` >= ' . $dbr->addQuotes( $this->getStartTime() );
370 -
 370+
371371 $options['GROUP BY'] = $dbr->tableName( 'mv_search_digest' ) . '.query_key';
372372 $options['ORDER BY'] = '`hit_count` DESC';
373373 $options['LIMIT'] = $this->params['num_results'];
Index: trunk/extensions/MetavidWiki/includes/MV_Settings.php
@@ -141,7 +141,7 @@
142142 //wars people of archive inacuracys (given its a wiki and the source is close caption feed)
143143 $mvEnableStreamNotice = false;
144144
145 -/*
 145+/**
146146 * All Available meta data layers
147147 * these type keys are used to allow multiple layers of metadata per stream.
148148 * These values key into template_names, msg_descriptions, and application logic )
@@ -150,7 +150,7 @@
151151 */
152152 $mvMVDTypeAllAvailable = array( 'ht_en', 'anno_en', 'thomas_en' );
153153
154 -/*
 154+/**
155155 * the default display set of layers (must be a subset of $mvMVDTypeAllAvaliable)
156156 * note: this is equivalent to ?mvd_tracks=ht_en,anno_en in the url for the stream page.
157157 * this also dictates the default search layers
Index: trunk/extensions/MetavidWiki/includes/MV_ImageGallery.php
@@ -1,5 +1,5 @@
22 <?php
3 -/*
 3+/**
44 * MV_ImageGallery.php Created on Oct 22, 2007
55 *
66 * All Metavid Wiki code is Released Under the GPL2
Index: trunk/extensions/MetavidWiki/includes/MV_Index.php
@@ -1,5 +1,5 @@
22 <?php
3 -/*
 3+/**
44 * MV_Index.php Created on May 16, 2007
55 *
66 * All Metavid Wiki code is Released under the GPL2
Index: trunk/extensions/MetavidWiki/includes/MV_OggHandler.php
@@ -1,9 +1,9 @@
22 <?php
3 -/*
 3+/**
44 * class to override oggHandler for compatibility/feature enhancement with metavid
5 - *
 5+ *
66 */
77
88 class mvOggHandler extends OggHandler{
9 -
 9+
1010 }
Index: trunk/extensions/MetavidWiki/includes/specials/MV_SpecialCRUDStream.php
@@ -1,5 +1,5 @@
22 <?php
3 -/*
 3+/**
44 * MV_SepcialAddStream.php Created on Apr 25, 2007
55 *
66 * All Metavid Wiki code is Released under the GPL2
Index: trunk/extensions/MetavidWiki/includes/specials/MV_SpecialListStreams.php
@@ -1,5 +1,5 @@
22 <?php
3 -/*
 3+/**
44 * MV_SpecialListStreams.php Created on Apr 24, 2007
55 *
66 * All Metavid Wiki code is Released Under the GPL2
@@ -26,7 +26,7 @@
2727 public function __construct( $name = 'Mv_List_Streams' ) {
2828 parent::__construct( $name );
2929 }
30 -
 30+
3131 function isExpensive() {
3232 return false;
3333 }
@@ -65,11 +65,11 @@
6666 return ' ORDER BY date_start_time DESC ';
6767 // ($this->sortDescending() ? 'DESC' : '');
6868 }
69 -
 69+
7070 function getOrderFields() {
7171 return array( 'date_start_time' );
7272 }
73 -
 73+
7474 function sortDescending() {
7575 return false;
7676 }
Index: trunk/extensions/MetavidWiki/includes/specials/MV_SpecialMVAdmin.php
@@ -2,7 +2,7 @@
33
44 if ( !defined( 'MEDIAWIKI' ) ) die();
55
6 -/*
 6+/**
77 * MV_SpecialMVAdmin.php Created on Apr 24, 2007
88 *
99 * All Metavid Wiki code is Released Under the GPL2
Index: trunk/extensions/MetavidWiki/includes/specials/MV_SpecialExport.php
@@ -1,5 +1,5 @@
22 <?php
3 -/*
 3+/**
44 * MV_SpecialExport.php Created on Oct 23, 2007
55 *
66 * All Metavid Wiki code is Released Under the GPL2
Index: trunk/extensions/MetavidWiki/includes/specials/MV_SpecialMediaSearch.php
@@ -1,5 +1,5 @@
22 <?php
3 -/*
 3+/**
44 * Created on Jul 26, 2007
55 *
66 * All Metavid Wiki code is Released Under the GPL2
@@ -41,7 +41,7 @@
4242 }
4343 }
4444 }
45 -/*
 45+/**
4646 * simple/quick implementation ...
4747 * @@todo future version should be better integrated with semantic wiki and or
4848 * an external scalable search engine ie sphinx or lucene
Index: trunk/extensions/MetavidWiki/includes/articlepages/MV_StreamPage.php
@@ -1,10 +1,10 @@
22 <?php
3 -/*
 3+/**
44 * MV_StreamPage.php Created on Apr 24, 2007
55 *
66 * All Metavid Wiki code is Released Under the GPL2
77 * for more info visit http://metavid.org/wiki/Code
8 - *
 8+ *
99 * @author Michael Dale
1010 * @email dale@ucsc.edu
1111 * @url http://metavid.org
@@ -12,26 +12,26 @@
1313 // make sure we have the mvStream class (which extends article):
1414 if ( !defined( 'MEDIAWIKI' ) ) die( 1 );
1515
16 -/*
 16+/**
1717 * process the Metavid page request and creates objects
18 - *
 18+ *
1919 * eventually will support users creating their own "views"
2020 * for now present the default view
2121 * handle request of the following types:
22 - *
23 - *
 22+ *
 23+ *
2424 * MvStream:stream_name -> pulls up first 20 min of stream_name
2525 * MvStream:stream_name/ss:ss:ss -> pulls up 5 min starting at ss:ss:ss
2626 * MvStream:stream_name/ss:ss:ss/ee:ee:ee pulls up requested segment
2727 * @@todo we should limit how much metadata for a given query
28 - *
 28+ *
2929 * future:
30 - *
 30+ *
3131 * MvStream:stream_name/live if the stream is currently being captured
3232 * show realtime broadcast
33 - *
 33+ *
3434 * sequences stored in the sequence namespace:
35 - * MvSequence:sequence_name
 35+ * MvSequence:sequence_name
3636 */
3737
3838 class MV_StreamPage extends Article {
@@ -46,10 +46,10 @@
4747 }
4848 public function view() {
4949 global $wgRequest, $wgUser, $wgOut;
50 - // @@TODO fix stream view() for old versions ... will likely have to replicate Article::view()
 50+ // @@TODO fix stream view() for old versions ... will likely have to replicate Article::view()
5151
52 - // include the metavid headers (for embedding video in the page)
53 -
 52+ // include the metavid headers (for embedding video in the page)
 53+
5454 // copied from CategoryPage ...
5555 $diff = $wgRequest->getVal( 'diff' );
5656 $diffOnly = $wgRequest->getBool( 'diffonly', $wgUser->getOption( 'diffonly' ) );
@@ -62,7 +62,7 @@
6363 function outputWikiText( $text, $cache = true ) {
6464 wfProfileIn( __METHOD__ );
6565 $MV_MetavidInterface = new MV_MetavidInterface( 'stream', $this );
66 - // will require the mv_embed script for video playback:
 66+ // will require the mv_embed script for video playback:
6767 //mvfAddHTMLHeader( 'stream_interface' );
6868 $MV_MetavidInterface->render_full();
6969 wfProfileOut( __METHOD__ );
@@ -72,8 +72,8 @@
7373 * of type Metavid:streamname
7474 */
7575 function isEditable() {
76 - // if full title contains no / and no :
77 - // && its an existing stream than its editable
 76+ // if full title contains no / and no :
 77+ // && its an existing stream than its editable
7878 if ( strpos( $this->mvTitle->getWikiTitle(), '/' ) !== false )return false;
7979 if ( strpos( $this->mvTitle->getWikiTitle(), ':' ) !== false )return false;
8080 // we should have already check if the stream exists
@@ -84,21 +84,21 @@
8585 // @@TODO figure out a way to be a special page but not be in the special namepsace.
8686 // namely hide the edit/discussion links and rarely cache
8787 $wgTitle->mNamespace = NS_SPECIAL;
88 -
 88+
8989 // do some aditional stream proccessing throw an error if we have a type
9090 if ( $this->mvTitle->getMvdTypeKey() != null ) {
9191 $page = 'Bad format for Metavid request';
9292 return mvOutputSpecialPage( 'bad format for Metavid request',
9393 $page );
9494 }
95 -
 95+
9696 $title = 'stream view';
97 -
 97+
9898 // $wgOut->setPageTitle( $title );
9999 // $wgOut->setHTMLTitle( $title );
100100 $wgOut->setArticleRelated( false );
101101 $wgOut->enableClientCache( true );
102 -
 102+
103103 $page = 'stream page';
104104 $wgOut->addHTML( $page );
105105 $wgOut->returnToMain( false );
Index: trunk/extensions/MetavidWiki/includes/articlepages/MV_CategoryPage.php
@@ -1,16 +1,16 @@
22 <?php
3 -/*
 3+/**
44 * MV_CategoryPage.php Created on Oct 17, 2007
5 - *
 5+ *
66 * All Metavid Wiki code is Released Under the GPL2
77 * for more info visit http://metavid.org/wiki/Code
8 - *
 8+ *
99 * @author Michael Dale
1010 * @email dale@ucsc.edu
1111 * @url http://metavid.org
1212 */
1313 // $wgHooks['CategoryPageView'][] = 'fnMyHook';
14 - // display all MVD category members as thumbnails...
 14+ // display all MVD category members as thumbnails...
1515 // display link to rss/playlist
1616
1717 if ( !defined( 'MEDIAWIKI' ) ) die( 1 );
@@ -21,7 +21,7 @@
2222 class MvCategoryViewer extends CategoryViewer {
2323 var $show_mv_links = false;
2424 private $already_named_resource = array();
25 -
 25+
2626 function getHTML() {
2727 $s = '';
2828 return $s . parent::getHTML();
@@ -71,7 +71,7 @@
7272 $title->getNamespace() == MV_NS_STREAM ||
7373 $title->getNamespace() == MV_NS_SEQUENCE ) {
7474 $this->show_mv_links = true;
75 -
 75+
7676 // make sure we don't do duplicate stream links:
7777 $mvTitle = new MV_Title( $title );
7878 if ( !isset( $this->already_named_resource[$mvTitle->getStreamName() . '/' . $mvTitle->getTimeRequest()] ) ) {
@@ -113,8 +113,8 @@
114114 if ( $this->showGallery && ! $this->gallery->isEmpty() ) {
115115 $title = SpecialPage::getTitleFor( 'MediaSearch' );
116116 $query = 'f[0][t]=' . urlencode( 'category' ) . '&f[0][v]=' . $wgTitle->getDBkey();
117 - // don't output the cat link for now:
118 - // $search_link = $sk->makeKnownLinkObj($title,wfMsg('mv_search_category').":".$wgTitle->getText(), $query);
 117+ // don't output the cat link for now:
 118+ // $search_link = $sk->makeKnownLinkObj($title,wfMsg('mv_search_category').":".$wgTitle->getText(), $query);
119119 // wfMsg('mv_cat_search_note', $search_link) .
120120 return "<div id=\"mw-category-media\">\n" .
121121 $s .
Index: trunk/extensions/MetavidWiki/includes/articlepages/MV_SequencePage.php
@@ -1,5 +1,5 @@
22 <?php
3 -/*
 3+/**
44 * MV_SequencePage.php Created on Oct 17, 2007
55 *
66 * All Metavid Wiki code is Released Under the GPL2
@@ -36,15 +36,15 @@
3737
3838 $parserOptions = ParserOptions::newFromUser( $wgUser );
3939 $parserOptions->addExtraKey( 'mv:seq-xml' ); //differentiate the articles xml from article
40 -
 40+
4141 if( $wgEnableParserCache ) {
4242 $mvParserCache = ParserCache::singleton();
4343 $parserOutput = $mvParserCache->get( $this, $parserOptions );
44 -
 44+
4545 if( $parserOutput != false )
4646 return $parserOutput->getText();
4747 }
48 -
 48+
4949 //get the high level sequence description:
5050 $this->getSequenceHLRD();
5151 $this->parseHLRD_DOM();
Index: trunk/extensions/MetavidWiki/includes/articlepages/MV_DataPage.php
@@ -1,16 +1,16 @@
22 <?php
3 -/*
 3+/**
44 * MV_DataPage.php Created on Apr 24, 2007
55 *
66 * All Metavid Wiki code is Released Under the GPL2
77 * for more info visit http://metavid.org/wiki/Code
8 - *
 8+ *
99 * @author Michael Dale
1010 * @email dale@ucsc.edu
1111 * @url http://metavid.org
1212 */
1313 if ( !defined( 'MEDIAWIKI' ) ) die( 1 );
14 -
 14+
1515 class MV_DataPage extends Article {
1616 function __construct( $title, & $mvTitle = false ) {
1717 if ( $mvTitle )$this->mvTitle = $mvTitle;
@@ -18,14 +18,14 @@
1919 }
2020 public function view() {
2121 global $wgRequest, $wgUser, $wgOut;
22 -
 22+
2323 // copied from CategoryPage ...
2424 $diff = $wgRequest->getVal( 'diff' );
2525 $diffOnly = $wgRequest->getBool( 'diffonly', $wgUser->getOption( 'diffonly' ) );
2626 if ( isset( $diff ) || $diffOnly ) {
2727 return Article::view();
2828 }
29 - // include the metavid headers (for embedding video in the page)
 29+ // include the metavid headers (for embedding video in the page)
3030 $wgOut->setPageTitle( $this->mvTitle->getTitleDesc() );
3131 $wgOut->addHTML( $this->mvArticleTop() );
3232 Article::view();
@@ -79,28 +79,28 @@
8080 $skin = $wgUser->getSkin();
8181 $wgOut->addHTML( '<strong>' . wfMsg( 'historywarning' ) . ' ' . $skin->historyLink() . '</strong>' );
8282 }
83 -
 83+
8484 return $this->confirmDelete( '', $reason );
8585 }
8686 /*
87 - * function article top
 87+ * function article top
8888 * @return MV dataPage top html
8989 */
9090 function mvArticleTop() {
9191 global $mvgIP, $wgUser;
9292 $sk = $wgUser->getSkin();
93 -
 93+
9494 $streamTitle = Title::makeTitle( MV_NS_STREAM, $this->mvTitle->getStreamNameText() );
9595 $streamLink = $sk->makeLinkObj( $streamTitle, htmlspecialchars( $this->mvTitle->getStreamNameText() ) );
96 -
 96+
9797 $typeTitle = Title::makeTitle( NS_MEDIAWIKI_TALK, $this->mvTitle->getMvdTypeKey() );
9898 $typeLink = $sk->makeLinkObj( $typeTitle, wfMsgHtml( $this->mvTitle->getMvdTypeKey() ) );
99 -
100 - // print_r($this->mvTitle);
 99+
 100+ // print_r($this->mvTitle);
101101 // do mvIndex query to get near stream count:
102102 // $MV_Index = new MvIndex($this->mvTitle);
103103
104 - // get the count of near by metadata (-1 as to not count the current)
 104+ // get the count of near by metadata (-1 as to not count the current)
105105 // $nearCount = ($MvIndex->getNearCount() - 1);
106106
107107 $nearTitle = Title::makeTitle( MV_NS_STREAM, $this->mvTitle->getStreamName()
@@ -108,33 +108,33 @@
109109 $nearLinkTxt = $this->mvTitle->getTimeDesc();
110110 // force a known link for time queries in the metavid namespace:
111111 $nearLink = $sk->makeKnownLinkObj( $nearTitle, htmlspecialchars( $nearLinkTxt ) );
112 -
 112+
113113 $html = wfMsg( 'mv_mvd_linkback', $streamLink, $nearLink, $typeLink );
114 -
115 - # two table layout for embed video
116 - # (@@todo use div class skin approach)
117 - // out embed code
 114+
 115+ # two table layout for embed video
 116+ # (@@todo use div class skin approach)
 117+ // out embed code
118118 // $html.=$this->mvTitle->getEmbedHTML();
119119
120 - // load stream files:
 120+ // load stream files:
121121 $html .= '<span style="float:left;margin:5px;">';
122122 $html .= $this->mvTitle->getEmbedVideoHtml();
123123 $html .= '</span>';
124124 return $html;
125125 }
126 -
 126+
127127 /*
128 - * function article_bottom
129 - * @return MV dataPage lower html
 128+ * function article_bottom
 129+ * @return MV dataPage lower html
130130 */
131131 function mvArticleBot() {
132132 return '</td></tr></table>';
133133 }
134134 }
135 -
 135+
136136 class MV_EditDataPage extends EditPage {
137137 function getPreviewText() {
138 - // enable embed video: (disabled)
 138+ // enable embed video: (disabled)
139139 //mvfAddHTMLHeader( 'embed' );
140140 $html = '';
141141 $html .= '<span style="float:left;margin:10px;">';
Index: trunk/extensions/MetavidWiki/includes/MV_EditSequencePage.php
@@ -1,10 +1,10 @@
22 <?php
3 -/*
 3+/**
44 * MV_EditSequencePage.php Created on Dec 5, 2008
5 - *
 5+ *
66 * All Metavid Wiki code is Released Under the GPL2
77 * for more info visit http://metavid.org/wiki/Code
8 - *
 8+ *
99 * @author Michael Dale
1010 * @email dale@ucsc.edu
1111 * @url http://metavid.org
@@ -13,25 +13,25 @@
1414 class MV_EditSequencePage extends EditPage {
1515 function edit() {
1616 global $wgOut, $wgUser, $wgHooks, $wgTitle;
17 -
18 - //add some user variables
19 - $seqPlayer = new MV_SequencePlayer( $wgTitle );
 17+
 18+ //add some user variables
 19+ $seqPlayer = new MV_SequencePlayer( $wgTitle );
2020 mvAddGlobalJSVariables( array( 'mvSeqExportUrl' => $seqPlayer->getExportUrl() ) );
21 - //add the "switch" link to the top of the page
 21+ //add the "switch" link to the top of the page
2222 $wgOut->addHTML('<span id="swich_seq_links">
2323 <a id="swich_seq_text" style="display:none"
2424 href="javascript:mv_do_sequence_edit_swap(\'text\')">'.
25 - wfMsg('mv_sequence_edit_text') .
26 - '</a>' .
27 - '<a id="switch_seq_wysiwyg"
 25+ wfMsg('mv_sequence_edit_text') .
 26+ '</a>' .
 27+ '<a id="switch_seq_wysiwyg"
2828 href="javascript:mv_do_sequence_edit_swap(\'seq_update\')">' .
2929 wfMsg('mv_sequence_edit_visual_editor') .
30 - '</a>' .
 30+ '</a>' .
3131 '</span>'.
3232 '<div id="seq_edit_container" style="display:none;position:relative;width:100%;height:580px;background:#AAA"></div>'
3333 );
3434 $wgOut->addHTML('<div id="mv_text_edit_container"> ');
35 - parent::edit();
 35+ parent::edit();
3636 $wgOut->addHTML('</div>');
3737 }
3838 }
Index: trunk/extensions/MetavidWiki/includes/MV_Title.php
@@ -1,5 +1,5 @@
22 <?php
3 -/*
 3+/**
44 * MV_Title.php Created on May 3, 2007
55 *
66 * All Metavid Wiki code is Released under the GPL2
Index: trunk/extensions/MetavidWiki/includes/MV_Image.php
@@ -1,17 +1,17 @@
22 <?php
3 -/*
 3+/**
44 * MV_Image.php Created on Oct 22, 2007
5 - *
 5+ *
66 * All Metavid Wiki code is Released Under the GPL2
77 * for more info visit http://metavid.org/wiki/Code
8 - *
 8+ *
99 * @author Michael Dale
1010 * @email dale@ucsc.edu
1111 * @url http://metavid.org
12 - *
 12+ *
1313 * extends image to deal give pointers to metavid media
1414 */
1515 if ( !defined( 'MEDIAWIKI' ) ) die( 1 );
1616 class MV_Image extends Image {
17 -
 17+
1818 }
Index: trunk/extensions/MetavidWiki/includes/MV_Hooks.php
@@ -1,5 +1,5 @@
22 <?php
3 -/*
 3+/**
44 * MV_Hooks.php Created on Apr 24, 2007
55 *
66 * All Metavid Wiki code is Released under the GPL2
@@ -70,7 +70,7 @@
7171 }
7272 return true;
7373 }
74 -/*
 74+/**
7575 * enables the rewriting of links to the Stream and Sequence namespace to support inline embeding.
7676 * see page: sample in-wiki-embed syntax
7777 * @@todo should probably be integrated to respective Stream and Sequence class.
@@ -345,7 +345,7 @@
346346 $MV_SequenceTools = new MV_SequenceTools();
347347 return $MV_SequenceTools->do_edit_submit();
348348 }
349 -/*
 349+/**
350350 * mv_edit_submit
351351 * @@todo this could be cleaned up by using the api .. lots of weridness otherwise
352352 */
Index: trunk/extensions/MetavidWiki/includes/MV_MetavidInterface/MV_SequenceTools.php
@@ -1,10 +1,10 @@
22 <?php
3 -/*
 3+/**
44 * MV_SequenceTools.php Created on Nov 2, 2007
5 - *
 5+ *
66 * All Metavid Wiki code is Released Under the GPL2
77 * for more info visit http://metavid.org/wiki/Code
8 - *
 8+ *
99 * @author Michael Dale
1010 * @email dale@ucsc.edu
1111 * @url http://metavid.org
@@ -19,7 +19,7 @@
2020 'transition',
2121 'clipedit',
2222 'cliplib',
23 - 'options'
 23+ 'options'
2424 );
2525 function getHTML() {
2626 global $wgOut;
@@ -32,9 +32,9 @@
3333 $wgOut->addHTML( '</div>' );
3434 }
3535 function get_tool_html( $tool_id, $ns = '', $title_str = '' ) {
36 - global $wgOut, $wgUser;
 36+ global $wgOut, $wgUser;
3737 //check if we are proccessing a set:
38 - $tool_set = explode('|', $tool_id);
 38+ $tool_set = explode('|', $tool_id);
3939 if(count($tool_set)>1){
4040 $tool_values = array();
4141 foreach($tool_set as $tool_id){
@@ -45,33 +45,33 @@
4646 return mvOutputJSON( $tool_values );
4747 }
4848 $wgOut->clearHTML();
49 - //else process a single tool:
 49+ //else process a single tool:
5050 switch( $tool_id ) {
5151 case 'sequence_page':
5252 global $mvgIP, $wgOut, $wgParser, $wgTitle;
53 - // put in header preview div:
 53+ // put in header preview div:
5454 $wgOut->addHTML( '<div id="mv_seq_edit_preview"></div>' );
55 -
 55+
5656 $article = & $this->mv_interface->article;
5757 $wgTitle = & $this->mv_interface->article->mTitle;
5858 $sk =& $wgUser->getSkin();
59 -
60 - // get the ajax edit
 59+
 60+ // get the ajax edit
6161 $editPageAjax = new MV_EditPageAjax( $article );
6262 $editPageAjax->mvd_id = 'seq';
63 -
64 - // fill wgOUt with edit form:
 63+
 64+ // fill wgOUt with edit form:
6565 $editPageAjax->edit();
6666 break;
6767 case 'add_clips_manual':
6868 $this->add_clips_manual();
69 - break;
 69+ break;
7070 case 'clipedit':
7171 //the default clip view provides a "welcome / help page"
7272 $wgOut->addHTML( wfMsg('mv_welcome_to_sequencer') );
7373 break;
7474 case 'cliplib':
75 - $this->add_embed_search();
 75+ $this->add_embed_search();
7676 break;
7777 case 'options':
7878 $this->add_editor_options();
@@ -79,39 +79,39 @@
8080 case 'transition':
8181 $this->add_transitions();
8282 break;
83 - default:
 83+ default:
8484 $wgOut->addHTML( wfMsg('mv_tool_missing', htmlspecialchars ($tool_id) ) );
8585 break;
8686 }
8787 return $wgOut->getHTML();
88 - }
 88+ }
8989 //handles copy / paste clip board data actions
9090 function do_clipboard( $action ){
9191 global $wgRequest, $wgUser;
92 - //validate the user-edit token (for both copy and paste)
 92+ //validate the user-edit token (for both copy and paste)
9393 $token = $wgRequest->getVal( 'clipboardEditToken');
94 -
 94+
9595 //store the clipboard
96 - if( $action == 'copy' ){
97 - return '1';
 96+ if( $action == 'copy' ){
 97+ return '1';
9898 }
9999 //get the clipboard
100100 if( $action == 'paste'){
101101 return '';
102 - }
103 - //error out:
 102+ }
 103+ //error out:
104104 return php2jsObj( array( 'status' => 'error',
105 - 'error_txt' => wfMsg('mv_unknown_clipboard_action')
106 - )
 105+ 'error_txt' => wfMsg('mv_unknown_clipboard_action')
 106+ )
107107 );
108108 }
109109 function add_embed_search() {
110110 global $wgOut;
111 - // grab a de-encapsulated search with prefix
 111+ // grab a de-encapsulated search with prefix
112112 $wgOut->addHTML( '<h3>'. wfMsg('mv_resource_locator') . '</h3>' );
113 - //add the input form
114 - /*$wgOut->addHTML(
115 - xml::input('mv_ams_search', 50,'', array( 'id' => 'mv_ams_search' , 'class' => 'searchField' )) .
 113+ //add the input form
 114+ /*$wgOut->addHTML(
 115+ xml::input('mv_ams_search', 50,'', array( 'id' => 'mv_ams_search' , 'class' => 'searchField' )) .
116116 xml::submitButton( wfMsg('mv_media_search'), array('id'=>'mv_ams_submit') ) .
117117 xml::element('div',array('id'=>'mv_ams_results'))
118118 );*/
@@ -120,23 +120,23 @@
121121 global $wgOut;
122122 $wgOut->addHTML( '<h3>' . wfMsg('mv_editor_options') . '</h3>'.
123123 wfMsg('mv_editor_mode') . '<br /> ' .
124 - '<blockquote><input type="radio" value="simple_editor" name="opt_editor">' .
 124+ '<blockquote><input type="radio" value="simple_editor" name="opt_editor">' .
125125 wfMsg('mv_simple_editor_desc') . ' </blockquote>' .
126126 '<blockquote><input type="radio" value="advanced_editor" name="opt_editor">' .
127127 wfMsg('mv_advanced_editor_desc') . ' </blockquote>'.
128 - wfMsg('mv_other_options') . '<br />' .
129 - '<blockquote><input type="checkbox" value="contextmenu_opt" name="contextmenu_opt">' .
130 - wfMsg('mv_contextmenu_opt') . ' </blockquote>'
131 - );
 128+ wfMsg('mv_other_options') . '<br />' .
 129+ '<blockquote><input type="checkbox" value="contextmenu_opt" name="contextmenu_opt">' .
 130+ wfMsg('mv_contextmenu_opt') . ' </blockquote>'
 131+ );
132132 }
133133 function add_transitions(){
134134 global $wgOut;
135 - $wgOut->addHTML('<h3>'. wfMsg('mv_transitions') .'</h3>');
 135+ $wgOut->addHTML('<h3>'. wfMsg('mv_transitions') .'</h3>');
136136 }
137137 function auto_complete_stream_name( $val ) {
138138 global $mvDefaultSearchVideoPlaybackRes;
139139 $dbr = wfGetDB( DB_SLAVE );
140 - // check against stream name list:
 140+ // check against stream name list:
141141 $result = $dbr->select( 'mv_streams', array( 'name', 'duration' ),
142142 array( '`name` LIKE \'%' . mysql_escape_string( $val ) . '%\'' ),
143143 __METHOD__,
@@ -146,14 +146,14 @@
147147 // $out='<ul>'."\n";
148148 $out = '';
149149 while ( $row = $dbr->fetchObject( $result ) ) {
150 - // make sure the person page exists:
 150+ // make sure the person page exists:
151151 $streamTitle = new MV_Title( 'Stream:' . $row->name . '/0:00:00/0:00:30' );
152152 // print "stream name:" . $streamTitle->getStreamName();
153 - // @@TODO fix this up.. this is getting ugly new line in embed video for example breaks things
 153+ // @@TODO fix this up.. this is getting ugly new line in embed video for example breaks things
154154 $out .= $row->name . '|' . $streamTitle->getStreamNameText() .
155155 '|' . $streamTitle->getStreamImageURL( 'icon' ) .
156156 '|' . $row->duration .
157 - '|' . $streamTitle->getEmbedVideoHtml( array('id'=>'vid_seq',
 157+ '|' . $streamTitle->getEmbedVideoHtml( array('id'=>'vid_seq',
158158 'size'=>$mvDefaultSearchVideoPlaybackRes)) . "\n";
159159 }
160160 // $out.='</ul>';
@@ -173,7 +173,7 @@
174174 'value="">' );
175175 $wgOut->addHTML( '<div id="mv_add_stream_name_choices" class="autocomplete"></div>' );
176176 $wgOut->addHTML( '<br class="mv_css_form">' );
177 - // get adjustment disp:
 177+ // get adjustment disp:
178178 $wgOut->addHTML( '<div id="mv_add_adj_cnt" style="display:none;">' .
179179 $MV_Overlay->get_adjust_disp( 'seq', 'seq' ) .
180180 '<input type="button" value="' . wfMsg( 'mv_seq_add_end' ) . '" onClick="mv_add_to_seq();" >' .
@@ -186,7 +186,7 @@
187187 // set up the title /article
188188 $title = Title::newFromText( $titleKey, MV_NS_SEQUENCE );
189189 $article = new MV_SequencePage( $title );
190 -
 190+
191191 // print "inline_seq:" . $_POST['inline_seq'] . " wpbox: " . $_REQUEST['wpTextbox1'] . "\n";
192192 $editPageAjax = new MV_EditPageAjax( $article );
193193 $editPageAjax->mvd_id = 'seq';
@@ -198,11 +198,11 @@
199199 if ( isset( $_POST['wpPreview'] ) ) {
200200 $sk =& $wgUser->getSkin();
201201 // $wgOut->addWikiText($_REQUEST['wpTextbox1']);
202 - // run via parser so we get categories:
 202+ // run via parser so we get categories:
203203 $parserOptions = ParserOptions::newFromUser( $wgUser );
204204 $parserOptions->setEditSection( false );
205205 $parserOptions->setTidy( true );
206 - // just parse the non-seq portion:
 206+ // just parse the non-seq portion:
207207 $parserOutput = $wgParser->parse( $_REQUEST['wpTextbox1'] , $title, $parserOptions );
208208 $wgOut->addCategoryLinks( $parserOutput->getCategories() );
209209 $wgOut->addHTML( $parserOutput->mText );
@@ -217,7 +217,7 @@
218218 if ( $editPageAjax->edit( $textbox1 ) == false ) {
219219 return php2jsObj( array( 'status' => 'ok' ) );
220220 } else {
221 - // error: retrun error msg and form:
 221+ // error: retrun error msg and form:
222222 return $wgOut->getHTML();
223223 }
224224 }
Index: trunk/extensions/MetavidWiki/includes/MV_MetavidInterface/MV_MetavidInterface.php
@@ -1,5 +1,5 @@
22 <?php
3 -/*
 3+/**
44 * Created on Jun 28, 2007
55 *
66 * All Metavid Wiki code is Released Under the GPL2
Index: trunk/extensions/MetavidWiki/includes/MV_MetavidInterface/MV_Navigator.php
@@ -1,5 +1,5 @@
22 <?php
3 -/*
 3+/**
44 * Created on Aug 15, 2008
55 *
66 * All Metavid Wiki code is Released Under the GPL2
Index: trunk/extensions/MetavidWiki/includes/MV_MetavidInterface/MV_Tools.php
@@ -1,11 +1,11 @@
22 <?php
3 -/*
 3+/**
44 * Created on Jun 28, 2007
55 *
66 * All Metavid Wiki code is Released Under the GPL2
77 * for more info visit http://metavid.org/wiki/Code
8 - *
9 - *
 8+ *
 9+ *
1010 */
1111 if ( !defined( 'MEDIAWIKI' ) ) die( 1 );
1212 // global $mvgIP;
@@ -34,20 +34,20 @@
3535 }
3636 function render_full() {
3737 global $wgOut;
38 - // "<div >" .
 38+ // "<div >" .
3939 /*$wgOut->addHTML("<fieldset ".$this->getStyleOverride()." id=\"".get_class($this)."\" >\n" .
4040 "<legend id=\"mv_leg_".get_class($this)."\">".$this->render_menu()."</legend>\n");
4141 */
42 - // do the implemented html
 42+ // do the implemented html
4343 $wgOut->addHTML( '<div id="MV_Tools">' );
4444 $this->getHTML();
4545 $wgOut->addHTML( '</div>' );
4646 /*$wgOut->addHTML("</fieldset>\n");*/
4747 }
4848 /*function getStreamPage(){
49 - return ;
 49+ return ;
5050 }*/
51 -
 51+
5252 /* @@todo cache this */
5353 function get_tool_html( $tool_id, $ns = '', $title_str = '' ) {
5454 global $wgUser;
@@ -56,11 +56,11 @@
5757 switch( $tool_id ) {
5858 case 'stream_page':
5959 global $wgOut, $wgParser;
60 - // render the wiki page for this stream
 60+ // render the wiki page for this stream
6161 $title = Title::newFromText( $title_str, $ns );
6262 $curRevision = Revision::newFromTitle( $title );
63 -
64 - // @@todo in the future a deleted Stream means
 63+
 64+ // @@todo in the future a deleted Stream means
6565 // remove stuff from stream table,mvd etc and return "missing Stream"
6666
6767 if ( $curRevision == null ) {
@@ -70,7 +70,7 @@
7171 $sk =& $wgUser->getSkin();
7272 // empty out the categories
7373 $wgOut->mCategoryLinks = array();
74 - // run via parser to add in Category info:
 74+ // run via parser to add in Category info:
7575 $parserOptions = ParserOptions::newFromUser( $wgUser );
7676 $parserOptions->setEditSection( false );
7777 $parserOptions->setTidy( true );
@@ -80,7 +80,7 @@
8181 $wgOut->addHTML( $sk->getCategories() );
8282 // empty out the categories
8383 $wgOut->mCategoryLinks = array();
84 -
 84+
8585 // $wgOut->addWikiTextWithTitle( $curRevision->getText(), $tile) ;
8686
8787 $this->innerHTML = $wgOut->getHTML();
@@ -136,9 +136,9 @@
137137 ) );
138138 }
139139
140 - /*
 140+ /*
141141 * outputs basic stream paging (this could be done client side)
142 - *
 142+ *
143143 */
144144 function stream_paging_links( $return_set = 'both' ) {
145145 global $wgUser, $mvDefaultStreamViewLength, $mvgScriptPath;
@@ -176,7 +176,7 @@
177177 }
178178 /*
179179 * list all the available "tool" functions
180 - * @@todo better integration with wiki
 180+ * @@todo better integration with wiki
181181 * (ie tool listing should be a page like navigationBar or in our case MvStreamTools
182182 */
183183 function getToolsListing() {
@@ -192,15 +192,15 @@
193193 $out .= '</ul>';
194194 return '<h3>' . $heading . '</h3>' . $out;
195195 }
196 - // returns layers overview text
 196+ // returns layers overview text
197197 function get_mang_layers_page( $stream_title ) {
198198 global $mvMVDTypeAllAvailable;
199199 $out = '<h3>' . wfMsg( 'mv_tool_mang_layers' ) . '</h3>';
200 - // grab the current track set:
 200+ // grab the current track set:
201201 $this->procMVDReqSet();
202202 foreach ( $mvMVDTypeAllAvailable as $type_key ) {
203203 $type_key = htmlspecialchars( $type_key );
204 - // @@todo use something better than "title" for type_key description
 204+ // @@todo use something better than "title" for type_key description
205205 $checked = ( in_array( $type_key, $this->mvd_tracks ) ) ? ' checked':'';
206206 $out .= '<input type="checkbox" name="option_' . $type_key . '" id="option_' . $type_key . '" value="' . $type_key . '" ' . $checked . '/> ' .
207207 '<a class="mv_mang_layers" id="a_' . $type_key . '" title="' . wfMsg( $type_key . '_desc' ) . '" href="#">' . wfMsg( $type_key ) . '</a><br />';
@@ -210,22 +210,22 @@
211211 }
212212 function get_nav_page( $stream_title ) {
213213 global $mvgIP;
214 - // output sliders for stream navigation:
 214+ // output sliders for stream navigation:
215215 $out = '<h3>' . wfMsg( 'mv_tool_navigate' ) . ' ' . htmlspecialchars( ucfirst( $stream_title ) ) . '</h3>';
216 - // normalize stream title:
 216+ // normalize stream title:
217217 $stream_title = str_replace( ' ', '_', strtolower( $stream_title ) );
218 -
219 - // get the total length of the stream:
 218+
 219+ // get the total length of the stream:
220220 $stream = new MV_Stream( array( 'name' => $stream_title ) );
221221 // $out.= "sn: ". $stream->name . '<br />';
222222 $duration = $stream->getDuration();
223 - // $out.=" duration: $duration";
 223+ // $out.=" duration: $duration";
224224 $MvOverlay = new MV_Overlay();
225 -
 225+
226226 $titleKey = 'mvd_type:' . ucfirst( $stream_title ) . '/' . $_REQUEST['time_range'];
227227 $out .= $MvOverlay->get_adjust_disp( $titleKey, 'nav' );
228228 $out .= '<input type="button" id="mv_go_nav" value="Go">';
229 - // set range:
 229+ // set range:
230230 $this->js_eval = 'var end_time = \'' . htmlspecialchars( $duration ) . '\';';
231231 return $out;
232232 }
@@ -237,7 +237,7 @@
238238 $out = '<h3>' . wfMsg( 'mv_tool_export_title' ) . '</h3>';
239239 $tr = $wgRequest->getVal( 'time_range' );
240240 // @@todo pull in metadata layer selector (populated by current selection set)
241 - // makeKnownLinkObj( $nt, $text = '', $query = '', $trail = '', $prefix = '' , $aprops = '', $style = '' )
 241+ // makeKnownLinkObj( $nt, $text = '', $query = '', $trail = '', $prefix = '' , $aprops = '', $style = '' )
242242 $sTitle = SpecialPage::getTitleFor( 'MvExportStream' );
243243 $out .= $sk->makeKnownLinkObj( $sTitle , wfMsg( 'mv_export_cmml' ), 'feed_format=cmml&stream_name=' . $stream_title . '&t=' . $tr );
244244 $out .= ' for ' . $mvTitle->getTitleDesc();
@@ -248,7 +248,7 @@
249249 @list( $width, $height ) = explode( 'x', $this->mv_interface->smwProperties['playback_resolution'] );
250250 if ( isset( $width ) && isset( $height ) ) {
251251 if ( is_numeric( $width ) && is_numeric( $height ) ) {
252 - // offset in refrence to mv_custom.css
 252+ // offset in refrence to mv_custom.css
253253 $width += 2;
254254 $height += 30;
255255 $top = $height + 30 + 12;
Index: trunk/extensions/MetavidWiki/includes/MV_MetavidInterface/MV_Overlay.php
@@ -1,5 +1,5 @@
22 <?php
3 -/*
 3+/**
44 * Created on Jun 28, 2007
55 *
66 * All Metavid Wiki code is Released Under the GPL2
Index: trunk/extensions/MetavidWiki/includes/MV_MetavidInterface/MV_Component.php
@@ -1,38 +1,38 @@
22 <?php
33 if ( !defined( 'MEDIAWIKI' ) ) die( 1 );
4 -/*
 4+/**
55 * Created on Jun 28, 2007
66 *
77 * All Metavid Wiki code is Released Under the GPL2
88 * for more info visit http://metavid.org/wiki/Code
9 - *
 9+ *
1010 * the base component class
1111 */
1212 class MV_Component {
1313 var $name = 'MV_Component';
1414 var $mv_interface = null;
15 - // default values:
 15+ // default values:
1616 var $status = 'ok';
1717 var $innerHTML = '';
1818 var $js_eval = false;
1919 var $req = '';
2020 var $mvd_tracks = array();
2121 var $view_mode = '';
22 -
 22+
2323 function __construct( $init = array() ) {
2424 foreach ( $init as $k => $v ) {
2525 $this->$k = $v;
2626 }
2727 }
28 - // process the request set (load from settings if not set in url
 28+ // process the request set (load from settings if not set in url
2929 // @@todo would be good to allow user-set preference in the future)
3030 function procMVDReqSet( $only_requested = false ) {
3131 global $wgRequest;
3232 global $mvMVDTypeDefaultDisp, $mvMVDTypeAllAvailable;
33 - // if already computed return:
 33+ // if already computed return:
3434 if ( count( $this->mvd_tracks ) != 0 )return $this->mvd_tracks;
35 -
36 -
 35+
 36+
3737 $user_tracks = $wgRequest->getVal( 'tracks' );
3838
3939 //set via overview request
@@ -40,7 +40,7 @@
4141 $this->view_mode = 'overview';
4242 $user_tracks = 'anno_en';
4343 }
44 -
 44+
4545 // print "USER TRACKS: " . $user_tracks;
4646 if ( $user_tracks != '' ) {
4747 $user_set = explode( ',', $user_tracks );
@@ -51,14 +51,14 @@
5252 }
5353 } else {
5454 if ( !$only_requested ) {
55 - // set the default tracks (if not restricted to requested tracks)
 55+ // set the default tracks (if not restricted to requested tracks)
5656 foreach ( $mvMVDTypeDefaultDisp as $tk ) {
5757 if ( !in_array( $tk, $mvMVDTypeAllAvailable ) ) {
5858 global $wgOut;
5959 $wgOut->errorPage( 'mvd_default_mismatch', 'mvd_default_mismatch_text' );
6060 }
6161 }
62 - // just set to global default:
 62+ // just set to global default:
6363 $this->mvd_tracks = $mvMVDTypeDefaultDisp;
6464 }
6565 }
@@ -75,7 +75,7 @@
7676 $and = '&';
7777 }
7878 }
79 - // save tool_disp:
 79+ // save tool_disp:
8080 if ( $wgRequest->getVal( 'tool_disp' ) != '' ) {
8181 $req .= $and . 'tool_disp=' . $wgRequest->getVal( 'tool_disp' );
8282 }
@@ -109,10 +109,10 @@
110110 }
111111 function render_full() {
112112 global $wgOut;
113 - // "<div >" .
 113+ // "<div >" .
114114 $wgOut->addHTML( "<fieldset " . $this->getStyleOverride() . " id=\"" . get_class( $this ) . "\" >\n" .
115115 "<legend id=\"mv_leg_" . get_class( $this ) . "\">" . $this->render_menu() . "</legend>\n" );
116 - // do the implemented html
 116+ // do the implemented html
117117 $this->getHTML();
118118 $wgOut->addHTML( "</fieldset>\n" );
119119 }
Index: trunk/extensions/MetavidWiki/includes/MV_MetavidInterface/MV_PageHistoryAjax.php
@@ -1,10 +1,10 @@
22 <?php
3 -/*
 3+/**
44 * MV_PageHistory.php Created on Oct 11, 2007
5 - *
 5+ *
66 * All Metavid Wiki code is Released Under the GPL2
77 * for more info visit http://metavid.org/wiki/Code
8 - *
 8+ *
99 * @author Michael Dale
1010 * @email dale@ucsc.edu
1111 * @url http://metavid.org
Index: trunk/extensions/MetavidWiki/includes/MV_MetavidInterface/MV_StreamMeta.php
@@ -1,10 +1,10 @@
22 <?php
3 -/*
 3+/**
44 * MV_StreamMeta.php Created on Sep 27, 2007
55 *
66 * All Metavid Wiki code is Released under the GPL2
77 * for more info visit http://metavid.org/wiki/Code
8 - *
 8+ *
99 * @author Michael Dale
1010 * @email dale@ucsc.edu
1111 * @url http://metavid.org
Index: trunk/extensions/MetavidWiki/includes/MV_MetavidInterface/MV_VideoPlayer.php
@@ -1,5 +1,5 @@
22 <?php
3 -/*
 3+/**
44 * Created on Jun 28, 2007
55 *
66 * All Metavid Wiki code is Released Under the GPL2
@@ -30,30 +30,30 @@
3131 $file_list = $mvTitle->mvStream->getFileList();
3232 $o .= '<div id="videoMeta">
3333 <p class="options">';
34 - // get file list:
 34+ // get file list:
3535 global $mvDefaultVideoQualityKey, $mvDefaultFlashQualityKey;
3636 if ( count( $file_list ) != 0 ) {
3737 $coma = '';
3838 /*$o.='<span class="download">Download Segment:';
3939 $ogg_stream_url = $mvTitle->getWebStreamURL($mvDefaultVideoQualityKey);
40 - if($ogg_stream_url!=''){
 40+ if($ogg_stream_url!=''){
4141 $o.=$coma.' <a href="'.htmlspecialchars($ogg_stream_url).'">
4242 Web Ogg
4343 </a>';
4444 $coma=', ';
4545 }
4646 $ogg_hq_url = $mvTitle->getWebStreamURL('mv_ogg_high_quality');
47 - if($ogg_hq_url!=''){
 47+ if($ogg_hq_url!=''){
4848 $o.=$coma.' <a href="'.htmlspecialchars($ogg_hq_url).'">
4949 High Quality Ogg
5050 </a>';
5151 $coma=', ';
5252 }
5353 $flash_stream_url = $mvTitle->getWebStreamURL($mvDefaultFlashQualityKey);
54 - if($flash_stream_url!=''){
 54+ if($flash_stream_url!=''){
5555 $o.=$coma.' <a href="'.htmlspecialchars($flash_stream_url).'">
5656 Flash Video
57 - </a>';
 57+ </a>';
5858 $coma=', ';
5959 }
6060 $o.='</span>';*/
@@ -61,7 +61,7 @@
6262 }
6363 $o .= '<span class="embed"><a href="javascript:$j(\'#' . htmlspecialchars( $this->embed_id ) . '\').get(0).showShare();">Embed Video</a></span>' .
6464 '</p>';
65 - // about file:
 65+ // about file:
6666 $talkPage = Title::newFromText( 'Anno_en:' . strtolower( $mvTitle->wiki_title ), MV_NS_MVD_TALK );
6767 $o .= '<p class="about_file">
6868 <span class="views">Views:' . htmlspecialchars( number_format( $mvTitle->getViewCount() ) ) . '</span>
@@ -76,12 +76,12 @@
7777 $out = '';
7878 // give the stream the request information:
7979 $mvTitle = & $this->mv_interface->article->mvTitle;
80 -
 80+
8181 $mvTitle->dispVideoPlayerTime = true;
8282 $vid_size = ( isset( $this->mv_interface->smwProperties['playback_resolution'] ) ) ?
8383 $this->mv_interface->smwProperties['playback_resolution']:$mvDefaultVideoPlaybackRes;
8484 list( $width, $height ) = explode( 'x', $vid_size );
85 - // wrap the video container to prevent moving html on the page:
 85+ // wrap the video container to prevent moving html on the page:
8686 return '<div style="display:block;width:' . $width . 'px;height:' . $height . 'px">' .
8787 $mvTitle->getEmbedVideoHtml( array( 'id'=>$this->embed_id, 'size'=>$vid_size ) ) .
8888 '</div>';
@@ -94,7 +94,7 @@
9595 @list( $width, $height ) = explode( 'x', $this->mv_interface->smwProperties['playback_resolution'] );
9696 if ( isset( $width ) && isset( $height ) ) {
9797 if ( is_numeric( $width ) && is_numeric( $height ) ) {
98 - // offset info should stored somewhere:
 98+ // offset info should stored somewhere:
9999 $width += 2;
100100 $height += 30;
101101 return "style=\"height:{$height}px;width:{$width}\"";
@@ -105,11 +105,11 @@
106106 }
107107 function render_full() {
108108 global $wgOut;
109 - // "<div >" .
 109+ // "<div >" .
110110 $wgOut->addHTML( "<div id=\"videoContent\">\n" );
111 - // do the implemented html
 111+ // do the implemented html
112112 $this->getHTML();
113113 $wgOut->addHTML( "</div>\n" );
114114 }
115 -
 115+
116116 }
Index: trunk/extensions/MetavidWiki/includes/MV_MetavidInterface/MV_SequencePlayer.php
@@ -1,10 +1,10 @@
22 <?php
3 -/*
 3+/**
44 * MV_SequencePlayer.php Created on Nov 2, 2007
5 - *
 5+ *
66 * All Metavid Wiki code is Released Under the GPL2
77 * for more info visit http://metavid.org/wiki/Code
8 - *
 8+ *
99 * @author Michael Dale
1010 * @email dale@ucsc.edu
1111 * @url http://metavid.org
@@ -15,18 +15,18 @@
1616 class MV_SequencePlayer{
1717 private $oldid='';
1818 function __construct( &$seqTitle ){
19 - $this->seqTitle = $seqTitle;
 19+ $this->seqTitle = $seqTitle;
2020 }
21 - function getEmbedSeqHtml( $options=array() ){
 21+ function getEmbedSeqHtml( $options=array() ){
2222 global $mvDefaultVideoPlaybackRes;
23 - if( isset( $options['oldid'] ) )
24 - $this->oldid = $options['oldid'];
25 -
26 - if ( isset( $options['size'] ) ){
 23+ if( isset( $options['oldid'] ) )
 24+ $this->oldid = $options['oldid'];
 25+
 26+ if ( isset( $options['size'] ) ){
2727 list($width, $height) = explode( 'x', $options['size'] );
28 - }else{
 28+ }else{
2929 list($width, $height) = explode( 'x', $mvDefaultVideoPlaybackRes);
30 - }
 30+ }
3131 return '<playlist width="' . htmlspecialchars($width) . '" height="'. htmlspecialchars($height) .'" '.
3232 'src="' . $this->getExportUrl() . '"></playlist>';
3333 }
Index: trunk/extensions/MetavidWiki/includes/MV_MetavidInterface/MV_EditPageAjax.php
@@ -1,5 +1,5 @@
22 <?php
3 -/*
 3+/**
44 * Created on Jun 28, 2007
55 *
66 * All Metavid Wiki code is Released Under the GPL2
Index: trunk/extensions/MetavidWiki/includes/MV_AutoCompleteCache.php
@@ -1,14 +1,14 @@
22 <?php
3 -/*
 3+/**
44 * MV_AutoCompleteCache.php Created on Mar 3, 2008
55 *
66 * All Metavid Wiki code is Released under the GPL2
77 * for more info visit http://metavid.org/wiki/Code
8 - *
 8+ *
99 * @author Michael Dale
1010 * @email dale@ucsc.edu
1111 * @url http://metavid.org
1212 */
1313 class MV_AutoCompleteCache {
14 -
 14+
1515 }
Index: trunk/extensions/MetavidWiki/languages/MV_Messages.php
@@ -1,5 +1,5 @@
22 <?php
3 -/*
 3+/**
44 * MV_Messages.php Created on Jan 8, 2008
55 *
66 * Internationalization file for MetaVidWiki extension
@@ -8592,7 +8592,7 @@
85938593 'mvvideofeed' => "Esportassion dl'alimentassion ëd filmà MetaVid",
85948594 'mvexportask' => "Esportassion d'un fil ëd filmà semàntich",
85958595 'video_feed_cat' => 'Alimentassion dël filmà për la categorìa:',
8596 - 'mv_cat_search_note' => "Nòta: Le categorìe a elenco mach le categorìe ëd prim livel.
 8596+ 'mv_cat_search_note' => "Nòta: Le categorìe a elenco mach le categorìe ëd prim livel.
85978597 Për tùit ij metadat ant l'ansema dle categorìe, ch'a serca $1",
85988598 'mv-category-media-count' => '$1 {{PLURAL:$1|segment|segment}} ëd mojen ant la categorìa',
85998599 'mv_mvd_linkback' => 'Part dël fluss $1 <br />
Index: trunk/extensions/MetavidWiki/languages/MV_Language.php
@@ -1,5 +1,5 @@
22 <?php
3 -/*
 3+/**
44 * MV_Language.php Created on Jan 8, 2008
55 *
66 * All Metavid Wiki code is Released under the GPL2
Index: trunk/extensions/MetavidWiki/skins/mv_embed/oggServer/OggChopRequestHanlder.php
@@ -1,5 +1,5 @@
22 <?php
3 -/*
 3+/**
44 * OggChopRequestHanlder.php is a simple ogg video server for mediawiki
55 * it uses the general oggChop class (which we should probably make part of
66 * PEAR oggServer or something like that )
@@ -42,4 +42,4 @@
4343 }
4444 return ( $hours * 3600 ) + ( $min * 60 ) + $sec;
4545 }
46 -?>
\ No newline at end of file
 46+?>
Index: trunk/extensions/MetavidWiki/skins/mv_embed/flvServer/mvFlvServer.php
@@ -1,5 +1,5 @@
22 <?php
3 -/*
 3+/**
44 * mv_flvServer.php
55 *
66 * @date Jul 25, 2008

Status & tagging log