Index: trunk/extensions/MetavidWiki/maintenance/metavid2mvWiki.inc.php |
— | — | @@ -215,8 +215,8 @@ |
216 | 216 | //get wiki stream id: |
217 | 217 | $wikiStream = new MV_Stream(array('name'=>$stream->name)); |
218 | 218 | //first remove all bot edited pages: |
219 | | - $mvd_res = MV_Index::getMVDInRange($wikiStream->getStreamId(),null,null,'Anno_en'); |
220 | | - while($row = $dbr->fetchObject($mvd_res)){ |
| 219 | + $mvd_rows = MV_Index::getMVDInRange($wikiStream->getStreamId(),null,null,'Anno_en'); |
| 220 | + foreach($mvd_rows as $row){ |
221 | 221 | $title = Title::newFromText($row->wiki_title, MV_NS_MVD); |
222 | 222 | $current = Revision::newFromTitle( $title ); |
223 | 223 | if($current->getUserText()==$botUserName){ |
Index: trunk/extensions/MetavidWiki/maintenance/scrape_and_insert.inc.php |
— | — | @@ -510,12 +510,12 @@ |
511 | 511 | } |
512 | 512 | function get_aligned_time_title(&$pData, $preFix='Anno_en', $stream){ |
513 | 513 | $dbr =& wfGetDB(DB_SLAVE); |
514 | | - $mvd_anno_res = MV_Index::getMVDInRange($stream->getStreamId(), |
| 514 | + $mvd_rows = MV_Index::getMVDInRange($stream->getStreamId(), |
515 | 515 | $pData['wiki_start_time']-120,$pData['wiki_end_time']+120, |
516 | 516 | $mvd_type='Anno_en',$getText=false,$smw_properties='Speech_by'); |
517 | 517 | |
518 | 518 | $doSpeechInsert=true; |
519 | | - while($row = $dbr->fetchObject($mvd_anno_res)){ |
| 519 | + foreach($mvd_rows as $row){ |
520 | 520 | if($row->Speech_by){ |
521 | 521 | if($row->Speech_by == $pData['Spoken_by']){ |
522 | 522 | print "match update existing: $row->Speech_by == ". $pData['Spoken_by']. "\n"; |
Index: trunk/extensions/MetavidWiki/includes/MV_GlobalFunctions.php |
— | — | @@ -105,6 +105,7 @@ |
106 | 106 | $wgAutoloadClasses['MV_SequenceTimeline'] = dirname(__FILE__) .'/MV_MetavidInterface/MV_SequenceTimeline.php'; |
107 | 107 | $wgAutoloadClasses['MV_VideoPlayer'] = dirname(__FILE__) .'/MV_MetavidInterface/MV_VideoPlayer.php'; |
108 | 108 | $wgAutoloadClasses['MV_Tools'] = dirname(__FILE__) .'/MV_MetavidInterface/MV_Tools.php'; |
| 109 | + $wgAutoloadClasses['MV_Navigator'] = dirname(__FILE__) .'/MV_MetavidInterface/MV_Navigator.php'; |
109 | 110 | $wgAutoloadClasses['MV_EditPageAjax'] = dirname(__FILE__) .'/MV_MetavidInterface/MV_EditPageAjax.php'; |
110 | 111 | |
111 | 112 | $wgAutoloadClasses['MV_CategoryPage'] = dirname(__FILE__) .'/articlepages/MV_CategoryPage.php'; |
Index: trunk/extensions/MetavidWiki/includes/MV_Stream.php |
— | — | @@ -218,14 +218,12 @@ |
219 | 219 | if($removeMVDs){ |
220 | 220 | //delete metadata pages: |
221 | 221 | //@@todo figure out a way to do this quickly/group sql queries. |
222 | | - $res = MV_Index::getMVDInRange($this->getStreamId()); |
223 | | - if($dbr->numRows($res) != 0){ |
224 | | - while($row = $dbr->fetchObject($res)){ |
| 222 | + $mvd_rows = MV_Index::getMVDInRange($this->getStreamId()); |
| 223 | + foreach($mvd_rows as $row){ |
225 | 224 | $title = Title::newFromText($row->wiki_title, MV_NS_MVD); |
226 | 225 | $article = new Article($title); |
227 | 226 | $article->doDelete('parent stream removed'); |
228 | | - } |
229 | | - } |
| 227 | + } |
230 | 228 | } |
231 | 229 | return true; |
232 | 230 | } |
Index: trunk/extensions/MetavidWiki/includes/MV_MagicWords.php |
— | — | @@ -150,17 +150,17 @@ |
151 | 151 | '</span>'; |
152 | 152 | //try to get metadata from anno_en first. |
153 | 153 | //@@todo maybe the following metadata grabbing could be abstracted to a single function in mv_index |
154 | | - $mvd_result = MV_Index::getMVDInRange( |
| 154 | + $mvd_rows = MV_Index::getMVDInRange( |
155 | 155 | $row->stream_id, |
156 | 156 | $row->start_time, |
157 | 157 | $row->end_time, |
158 | 158 | $mvd_type='anno_en', |
159 | 159 | $getText=true, |
160 | 160 | $smw_properties=array('Speech_by', 'Bill'), |
161 | | - $limit='1' |
| 161 | + $options=array('limit'=>1) |
162 | 162 | ); |
163 | | - if($dbr->numRows($mvd_result)!=0){ |
164 | | - $mvd_row = $dbr->fetchObject($mvd_result); |
| 163 | + if(count($mvd_rows)!=0){ |
| 164 | + $mvd_row = current($mvd_rows); |
165 | 165 | if($mvd_row->Speech_by){ |
166 | 166 | $ptitle = Title::MakeTitle(NS_MAIN, $mvd_row->Speech_by); |
167 | 167 | $o.='<span class="keywords">'. |
Index: trunk/extensions/MetavidWiki/includes/MV_Index.php |
— | — | @@ -98,12 +98,13 @@ |
99 | 99 | * getMVDInRange returns the mvd titles that are in the given range |
100 | 100 | * param list got kind of crazy long... @@todo re-factor int a request object or something cleaner |
101 | 101 | */ |
102 | | - function getMVDInRange($stream_id, $start_time=null, $end_time=null, $mvd_type='all',$getText=false,$smw_properties='', $limit='200'){ |
| 102 | + function getMVDInRange($stream_id, $start_time=null, $end_time=null, $mvd_type='all',$getText=false,$smw_properties='', $options=array()){ |
103 | 103 | global $mvIndexTableName, $mvDefaultClipLength; |
104 | 104 | $dbr =& wfGetDB(DB_SLAVE); |
105 | 105 | //set up select vars: |
106 | | - $conds=$options=$vars=array(); |
| 106 | + $conds=$vars=array(); |
107 | 107 | $from_tables =''; |
| 108 | + $do_cat_lookup=false; |
108 | 109 | // |
109 | 110 | //set mvd_type if empty: |
110 | 111 | if($mvd_type==null)$mvd_type='all'; |
— | — | @@ -112,19 +113,27 @@ |
113 | 114 | $vars= array('mv_page_id as id', 'mvd_type', 'wiki_title', 'stream_id', 'start_time', 'end_time'); |
114 | 115 | //add in base from: |
115 | 116 | $from_tables.= $dbr->tableName('mv_mvd_index'); |
| 117 | + //print_r($smw_properties); |
116 | 118 | if($smw_properties!=''){ |
117 | | - if(!isset($options['STRAIGHT_JOIN'])) |
118 | | - $options['STRAIGHT_JOIN']=''; |
119 | 119 | if(!is_array($smw_properties)) |
120 | | - $smw_properties = explode(',',$smw_properties); |
121 | | - foreach($smw_properties as $prop_name){ |
122 | | - $vars[] = mysql_real_escape_string($prop_name).'.object_title as '.mysql_real_escape_string($prop_name); |
123 | | - $from_tables.=' LEFT JOIN '. $dbr->tableName('smw_relations') . |
124 | | - ' as ' . mysql_real_escape_string($prop_name) . |
125 | | - ' ON (' . $dbr->tableName('mv_mvd_index') . '.mv_page_id'. |
126 | | - ' = ' . mysql_real_escape_string($prop_name) . '.subject_id'. |
127 | | - ' AND '. mysql_real_escape_string($prop_name).'.relation_title'. |
128 | | - ' = ' . $dbr->addQuotes($prop_name) . ')'; |
| 120 | + $smw_properties = explode(',',$smw_properties); |
| 121 | + foreach($smw_properties as $prop_name){ |
| 122 | + if($prop_name=='category'){ |
| 123 | + $do_cat_lookup=true; |
| 124 | + }else{ |
| 125 | + //if(SMW_VERSION >=1.2){ |
| 126 | + // $getSMWTags=true; |
| 127 | + //}else{ |
| 128 | + $vars[] = mysql_real_escape_string($prop_name).'.object_title as '.mysql_real_escape_string($prop_name); |
| 129 | + $from_tables.=' ' . |
| 130 | + ' LEFT JOIN '. $dbr->tableName('smw_relations') . |
| 131 | + ' as ' . mysql_real_escape_string($prop_name) . |
| 132 | + ' ON (' . $dbr->tableName('mv_mvd_index') . '.mv_page_id'. |
| 133 | + ' = ' . mysql_real_escape_string($prop_name) . '.subject_id'. |
| 134 | + ' AND '. mysql_real_escape_string($prop_name).'.relation_title'. |
| 135 | + ' = ' . $dbr->addQuotes($prop_name) . ')'; |
| 136 | + //} |
| 137 | + } |
129 | 138 | } |
130 | 139 | } |
131 | 140 | $conds = array('stream_id'=>$stream_id); |
— | — | @@ -143,15 +152,21 @@ |
144 | 153 | } |
145 | 154 | |
146 | 155 | } |
147 | | - if($end_time) |
| 156 | + //print "Start time: $start_time END TIME: $end_time\n"; |
| 157 | + if($end_time!=null) |
148 | 158 | $conds[]='start_time <= '. $dbr->addQuotes($end_time); |
149 | | - if($start_time) |
150 | | - $conds[]='end_time >= '. $dbr->addQuotes($start_time); |
151 | | - |
| 159 | + |
| 160 | + if($start_time!=null) |
| 161 | + $conds[]='end_time >= '. $dbr->addQuotes($start_time); |
| 162 | + |
152 | 163 | //add in ordering |
153 | | - $options['ORDER BY']= 'start_time ASC'; |
| 164 | + if(!isset($options['ORDER BY'])) |
| 165 | + $options['ORDER BY']= 'start_time ASC'; |
| 166 | + |
154 | 167 | //add in limit |
155 | | - $options['LIMIT'] = $limit; |
| 168 | + if(!isset($options['LIMIT'])) |
| 169 | + $options['LIMIT'] = 200; |
| 170 | + |
156 | 171 | //run query: |
157 | 172 | $result = $dbr->select( $from_tables, |
158 | 173 | $vars, |
— | — | @@ -159,10 +174,64 @@ |
160 | 175 | __METHOD__, |
161 | 176 | $options); |
162 | 177 | //print $dbr->lastQuery(); |
| 178 | + |
| 179 | + $ret_ary=array(); |
| 180 | + $from_tables=$vars=$options=array(); |
| 181 | + $conds=''; |
| 182 | + $or=''; |
| 183 | + while($row=$dbr->fetchObject($result)){ |
| 184 | + $ret_ary[$row->id]=$row; |
| 185 | + if($do_cat_lookup){ |
| 186 | + if($do_cat_lookup){ |
| 187 | + $conds.=$or . ' cl_from ='.$dbr->addQuotes($row->id); |
| 188 | + $or=' OR '; |
| 189 | + } |
| 190 | + } |
| 191 | + } |
| 192 | + |
| 193 | + //not very fast: |
| 194 | + /*if($getSMWTags){ |
| 195 | + foreach($ret_ary as $row){ |
| 196 | + $smwStore =& smwfGetStore(); |
| 197 | + $rowTitle = Title::newFromText($row->wiki_title, MV_NS_MVD); |
| 198 | + //print "Title: ".$title->getDBKey() . "\n"; |
| 199 | + $smwProps = $smwStore->getSemanticData($rowTitle); |
| 200 | + foreach($smwProps as $smwProp){ |
| 201 | + print "val: " . $smwProp->getValue(); |
| 202 | + } |
| 203 | + } |
| 204 | + }*/ |
| 205 | + |
| 206 | + if($do_cat_lookup){ |
| 207 | + $from_tables = $dbr->tableName('categorylinks'); |
| 208 | + $from_tables.=' LEFT JOIN '.$dbr->tableName('mv_mvd_index'). |
| 209 | + ' ON ( ' . |
| 210 | + $dbr->tableName('categorylinks') . '.cl_from = ' . |
| 211 | + $dbr->tableName('mv_mvd_index'). '.mv_page_id'. |
| 212 | + ' ) '; |
| 213 | + |
| 214 | + $vars=array('cl_from','cl_to'); |
| 215 | + |
| 216 | + $options['LIMIT'] = 2000; //max avarage 5 categories per page |
| 217 | + |
| 218 | + $result_cat = $dbr->select( $from_tables, |
| 219 | + $vars, |
| 220 | + $conds, |
| 221 | + __METHOD__, |
| 222 | + $options); |
| 223 | + //print $dbr->lastQuery($result_cat); |
| 224 | + //die(); |
| 225 | + while($cat_row=$dbr->fetchObject($result_cat)){ |
| 226 | + if(!isset($ret_ary[$cat_row->cl_from]->category)) |
| 227 | + $ret_ary[$cat_row->cl_from]->category=array(); |
| 228 | + $ret_ary[$cat_row->cl_from]->category[]=$cat_row->cl_to; |
| 229 | + } |
| 230 | + } |
| 231 | + //print $dbr->lastQuery(); |
163 | 232 | //die; |
164 | 233 | //echo $sql; |
165 | 234 | //$result =& $dbr->query( $sql, 'MV_Index:time_index_query'); |
166 | | - return $result; |
| 235 | + return $ret_ary; |
167 | 236 | } |
168 | 237 | /*@@todo figure another way to get at this data...this is not a very fast query: */ |
169 | 238 | function getMVDTypeInRange($stream_id, $start_time=null, $end_time=null){ |
Index: trunk/extensions/MetavidWiki/includes/specials/MV_SpecialExport.php |
— | — | @@ -276,7 +276,7 @@ |
277 | 277 | $streamTitle = new MV_Title($this->stream_name.'/'.$this->req_time); |
278 | 278 | $wgTitle = Title::newFromText($this->stream_name.'/'.$this->req_time, MV_NS_STREAM); |
279 | 279 | //do mvd_index query: |
280 | | - $mvd_res = MV_Index::getMVDInRange($streamTitle->getStreamId(), |
| 280 | + $mvd_rows = MV_Index::getMVDInRange($streamTitle->getStreamId(), |
281 | 281 | $streamTitle->getStartTimeSeconds(), |
282 | 282 | $streamTitle->getEndTimeSeconds(), $tracks); |
283 | 283 | //get the stream stream req |
— | — | @@ -285,11 +285,10 @@ |
286 | 286 | if(!$inline)print '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>'."\n"; |
287 | 287 | //if(!$inline)print '<!DOCTYPE cmml SYSTEM "http://svn.annodex.net/standards/cmml_2_0.dtd">'."\n"; |
288 | 288 | $tracks=array(); |
289 | | - if(count($dbr->numRows($mvd_res))!=0){ |
| 289 | + if(count($mvd_rows)!=0){ |
290 | 290 | global $wgOut; |
291 | 291 | $MV_Overlay = new MV_Overlay(); |
292 | | - while($mvd = $dbr->fetchObject($mvd_res)){ |
293 | | - |
| 292 | + foreach($mvd_rows as $mvd){ |
294 | 293 | if(!isset($tracks[$mvd->mvd_type]))$tracks[$mvd->mvd_type]=''; |
295 | 294 | $tracks[$mvd->mvd_type].=' |
296 | 295 | <'.$ns.'clip id="mvd_'.htmlentities($mvd->id).'" start="npt:'.htmlentities(seconds2ntp($mvd->start_time)).'" end="npt:'.htmlentities(seconds2ntp($mvd->end_time)).'"> |
Index: trunk/extensions/MetavidWiki/includes/articlepages/MV_SequencePage.php |
— | — | @@ -93,13 +93,14 @@ |
94 | 94 | //for now just lookup all ... @@todo future expose diffrent language tracks |
95 | 95 | if($clip['desc']==''){ |
96 | 96 | $dbr =& wfGetDB(DB_SLAVE); |
97 | | - $mvd_res = MV_Index::getMVDInRange($streamTitle->getStreamId(), |
| 97 | + $mvd_rows = MV_Index::getMVDInRange($streamTitle->getStreamId(), |
98 | 98 | $streamTitle->getStartTimeSeconds(), |
99 | 99 | $streamTitle->getEndTimeSeconds()); |
100 | | - if(count($dbr->numRows($mvd_res))!=0){ |
| 100 | + |
| 101 | + if(count($mvd_rows)!=0){ |
101 | 102 | $MV_Overlay = new MV_Overlay(); |
102 | 103 | $wgOut->clearHTML(); |
103 | | - while($mvd = $dbr->fetchObject($mvd_res)){ |
| 104 | + foreach($mvd_rows as $mvd){ |
104 | 105 | //output a link /line break |
105 | 106 | $MV_Overlay->outputMVD($mvd); |
106 | 107 | $wgOut->addHTML('<br>'); |
Index: trunk/extensions/MetavidWiki/includes/MV_Title.php |
— | — | @@ -111,9 +111,7 @@ |
112 | 112 | function getStartTime(){ return $this->start_time;} |
113 | 113 | function getTimeRequest(){ return $this->start_time.'/'.$this->end_time;} |
114 | 114 | function getEndTime(){ return $this->end_time;} |
115 | | - function getMwTitle(){return Title::MakeTitle(MV_NS_MVD, $this->wiki_title);} |
116 | | - |
117 | | - |
| 115 | + function getMwTitle(){return Title::MakeTitle(MV_NS_MVD, $this->wiki_title);} |
118 | 116 | function setStartEndIfEmpty(){ |
119 | 117 | global $mvDefaultStreamViewLength; |
120 | 118 | if($this->start_time==null){ |
— | — | @@ -336,7 +334,7 @@ |
337 | 335 | htmlspecialchars( $this->getEndTime() ) . |
338 | 336 | '</span>'; |
339 | 337 | } |
340 | | - $o.='<'.htmlspecialchars($tag); |
| 338 | + $o.='<'.htmlspecialchars($tag).' '; |
341 | 339 | $o.=($vid_id=='')?'':' id="'.htmlspecialchars($vid_id).'" '; |
342 | 340 | $o.='thumbnail="'.$this->getStreamImageURL($size, null, $force_server).'" '. |
343 | 341 | 'roe="'.$roe_url.'" '. |
— | — | @@ -356,7 +354,7 @@ |
357 | 355 | htmlspecialchars(MV_StreamFile::getTypeForQK($mvDefaultFlashQualityKey)) . |
358 | 356 | '" src="'.$flash_stream_url .'"></source>'; |
359 | 357 | |
360 | | - $o.='</video>'; |
| 358 | + $o.='</'.htmlspecialchars($tag).'>'; |
361 | 359 | return $o; |
362 | 360 | }else{ |
363 | 361 | return wfMsg('mv_error_stream_missing'); |
Index: trunk/extensions/MetavidWiki/includes/MV_MetavidInterface/MV_MetavidInterface.php |
— | — | @@ -72,7 +72,7 @@ |
73 | 73 | $this->grabSemanticProp(); |
74 | 74 | |
75 | 75 | //set up the interface objects: |
76 | | - foreach(array('MV_VideoPlayer', 'MV_Overlay','MV_Tools') as $cp_name){ |
| 76 | + foreach(array('MV_VideoPlayer', 'MV_Navigator','MV_Overlay','MV_Tools') as $cp_name){ |
77 | 77 | $this->components[$cp_name] = new $cp_name( |
78 | 78 | array('mv_interface'=>&$this) |
79 | 79 | ); |
Index: trunk/extensions/MetavidWiki/includes/MV_MetavidInterface/MV_Navigator.php |
— | — | @@ -7,12 +7,71 @@ |
8 | 8 | */ |
9 | 9 | class MV_Navigator extends MV_Component{ |
10 | 10 | function getHTML(){ |
| 11 | + global $wgUser; |
| 12 | + $o=''; |
| 13 | + $sk = $wgUser->getSkin(); |
| 14 | + $dbr =& wfGetDB(DB_SLAVE); |
11 | 15 | //get all annotative layers |
12 | | - return wfMsg() |
| 16 | + $stream_id = $this->mv_interface->article->mvTitle->getStreamId(); |
| 17 | + $stream_name = $this->mv_interface->article->mvTitle->getStreamName(); |
| 18 | + $stream_time_req = $this->mv_interface->article->mvTitle->getTimeRequest(); |
| 19 | + $start_sec = $this->mv_interface->article->mvTitle->getStartTimeSeconds(); |
| 20 | + $duration_sec = $this->mv_interface->article->mvTitle->getDuration(); |
| 21 | + $end_sec = $this->mv_interface->article->mvTitle->getEndTimeSeconds(); |
| 22 | + //print "start $start_sec end:$end_sec \n "; |
| 23 | + $prev_end =''; |
| 24 | + foreach(array('prev','next') as $pntype){ |
| 25 | + if($o!='')$o.=' '; |
| 26 | + if($pntype=='prev'){ |
| 27 | + if($start_sec==0) |
| 28 | + continue; |
| 29 | + $qstart = 0; |
| 30 | + $qend = $start_sec; |
| 31 | + $orderby = 'end_time ASC'; |
| 32 | + }else if($pntype=='next'){ |
| 33 | + if($prev_end!=''){ |
| 34 | + $qstart = $prev_end+1; |
| 35 | + }else{ |
| 36 | + $qstart = $end_sec+1; |
| 37 | + } |
| 38 | + $qend = $duration_sec; |
| 39 | + $orderby = 'start_time ASC'; |
| 40 | + } |
| 41 | + //print "Qstart: $qstart Qend:$qend \n"; |
| 42 | + $mvd_rows = MV_Index::getMVDInRange( |
| 43 | + $stream_id, |
| 44 | + $qstart, |
| 45 | + $qend, |
| 46 | + $mvd_type='anno_en', |
| 47 | + $getText=false, |
| 48 | + $smw_properties=array('speech_by','bill','category'), |
| 49 | + $options=array('LIMIT'=>1, 'ORDER BY'=>$orderby) |
| 50 | + ); |
| 51 | + //print "SHOULD GET $pntype for $stream_time_req"; |
| 52 | + //print_r($mvd_rows); |
| 53 | + //die; |
| 54 | + if(count($mvd_rows)!=0){ |
| 55 | + $row = current($mvd_rows); |
| 56 | + $prev_end = $row->end_time; |
| 57 | + $stime_req = seconds2ntp($row->start_time) . '/' . seconds2ntp($row->end_time); |
| 58 | + $streamTitle = Title::newFromText($stream_name .'/'. $stime_req, MV_NS_STREAM); |
| 59 | + if(trim($row->speech_by)!=''){ |
| 60 | + $o.=wfMsg('mv_'.$pntype.'_speech', $sk->makeKnownLinkObj($streamTitle, $row->speech_by)); |
| 61 | + }else if(trim($row->bill)!=''){ |
| 62 | + $o.=wfMsg('mv_'.$pntype.'_bill', $sk->makeKnownLinkObj($streamTitle, $row->bill)); |
| 63 | + }else if(count($row->category)!=0){ |
| 64 | + $first_cat = current($row->category); |
| 65 | + $o.=wfMsg('mv_'.$pntype.'_cat', $sk->makeKnownLinkObj($streamTitle, $first_cat)); |
| 66 | + } |
| 67 | + } |
| 68 | + } |
| 69 | + |
| 70 | + return $o; |
13 | 71 | } |
14 | 72 | function render_full(){ |
| 73 | + global $wgOut; |
15 | 74 | $wgOut->addHTML('<div id="MV_Navigator">'); |
16 | | - $this->getHTML(); |
| 75 | + $wgOut->addHTML($this->getHTML()); |
17 | 76 | $wgOut->addHTML('</div>'); |
18 | 77 | } |
19 | 78 | } |
Index: trunk/extensions/MetavidWiki/includes/MV_MetavidInterface/MV_Overlay.php |
— | — | @@ -102,16 +102,12 @@ |
103 | 103 | //global $mvgIP; |
104 | 104 | //require_once($mvgIP . '/includes/MV_Index.php'); |
105 | 105 | $dbr =& wfGetDB(DB_SLAVE); |
106 | | - $result = & MV_Index::getMVDInRange($this->mv_interface->article->mvTitle->getStreamId(), |
| 106 | + $mvd_rows = & MV_Index::getMVDInRange($this->mv_interface->article->mvTitle->getStreamId(), |
107 | 107 | $this->mv_interface->article->mvTitle->getStartTimeSeconds(), |
108 | 108 | $this->mv_interface->article->mvTitle->getEndTimeSeconds(), |
109 | 109 | $this->mvd_tracks); |
110 | | - if($dbr->numRows($result) == 0){ |
111 | | - $this->mvd_pages=array(); |
112 | | - }else{ |
113 | | - while($row = $dbr->fetchObject($result)){ |
114 | | - $this->mvd_pages[$row->id]=$row; |
115 | | - } |
| 110 | + foreach($mvd_rows as $row){ |
| 111 | + $this->mvd_pages[$row->id]=$row; |
116 | 112 | } |
117 | 113 | } |
118 | 114 | /*functions for transcript pages |
Index: trunk/extensions/MetavidWiki/languages/MV_Messages.php |
— | — | @@ -254,8 +254,12 @@ |
255 | 255 | 'mv_bad_tool_request' => 'bad tool line should be form: tool_name|tool_display_name', |
256 | 256 | 'mv_update_layers' => 'update layers view', |
257 | 257 | |
258 | | - 'mv_prev_speech' => 'Previous speech:', |
259 | | - 'mv_next_speech' => 'Next speech:', |
| 258 | + 'mv_prev_speech' => 'Previous speech: $1', |
| 259 | + 'mv_next_speech' => 'Next speech: $1', |
| 260 | + 'mv_prev_bill' => 'Previous Bill: $1', |
| 261 | + 'mv_next_bill' => 'Next Bill: $1', |
| 262 | + 'mv_prev_cat' => 'Previous Category: $1', |
| 263 | + 'mv_next_cat' => 'Next Category: $1', |
260 | 264 | 'mv_navigate_stream' => 'Navigate stream', |
261 | 265 | |
262 | 266 | #msg for overlay interface: |