Index: trunk/phase3/includes/Export.php |
— | — | @@ -112,7 +112,7 @@ |
113 | 113 | */ |
114 | 114 | public function pagesByRange( $start, $end ) { |
115 | 115 | $condition = 'page_id >= ' . intval( $start ); |
116 | | - if( $end ) { |
| 116 | + if ( $end ) { |
117 | 117 | $condition .= ' AND page_id < ' . intval( $end ); |
118 | 118 | } |
119 | 119 | return $this->dumpFrom( $condition ); |
— | — | @@ -129,7 +129,7 @@ |
130 | 130 | |
131 | 131 | public function pageByName( $name ) { |
132 | 132 | $title = Title::newFromText( $name ); |
133 | | - if( is_null( $title ) ) { |
| 133 | + if ( is_null( $title ) ) { |
134 | 134 | throw new MWException( "Can't export invalid title" ); |
135 | 135 | } else { |
136 | 136 | return $this->pageByTitle( $title ); |
— | — | @@ -137,7 +137,7 @@ |
138 | 138 | } |
139 | 139 | |
140 | 140 | public function pagesByName( $names ) { |
141 | | - foreach( $names as $name ) { |
| 141 | + foreach ( $names as $name ) { |
142 | 142 | $this->pageByName( $name ); |
143 | 143 | } |
144 | 144 | } |
— | — | @@ -148,7 +148,7 @@ |
149 | 149 | |
150 | 150 | public function logsByRange( $start, $end ) { |
151 | 151 | $condition = 'log_id >= ' . intval( $start ); |
152 | | - if( $end ) { |
| 152 | + if ( $end ) { |
153 | 153 | $condition .= ' AND log_id < ' . intval( $end ); |
154 | 154 | } |
155 | 155 | return $this->dumpFrom( $condition ); |
— | — | @@ -160,10 +160,10 @@ |
161 | 161 | protected function do_list_authors( $page , $revision , $cond ) { |
162 | 162 | wfProfileIn( __METHOD__ ); |
163 | 163 | $this->author_list = "<contributors>"; |
164 | | - //rev_deleted |
165 | | - $nothidden = '('.$this->db->bitAnd('rev_deleted', Revision::DELETED_USER) . ') = 0'; |
| 164 | + // rev_deleted |
| 165 | + $nothidden = '(' . $this->db->bitAnd( 'rev_deleted', Revision::DELETED_USER ) . ') = 0'; |
166 | 166 | |
167 | | - $sql = "SELECT DISTINCT rev_user_text,rev_user FROM {$page},{$revision} |
| 167 | + $sql = "SELECT DISTINCT rev_user_text,rev_user FROM {$page},{$revision} |
168 | 168 | WHERE page_id=rev_page AND $nothidden AND " . $cond ; |
169 | 169 | $result = $this->db->query( $sql, __METHOD__ ); |
170 | 170 | $resultset = $this->db->resultObject( $result ); |
— | — | @@ -184,27 +184,27 @@ |
185 | 185 | protected function dumpFrom( $cond = '' ) { |
186 | 186 | wfProfileIn( __METHOD__ ); |
187 | 187 | # For logging dumps... |
188 | | - if( $this->history & self::LOGS ) { |
189 | | - if( $this->buffer == WikiExporter::STREAM ) { |
| 188 | + if ( $this->history & self::LOGS ) { |
| 189 | + if ( $this->buffer == WikiExporter::STREAM ) { |
190 | 190 | $prev = $this->db->bufferResults( false ); |
191 | 191 | } |
192 | 192 | $where = array( 'user_id = log_user' ); |
193 | 193 | # Hide private logs |
194 | 194 | $hideLogs = LogEventsList::getExcludeClause( $this->db ); |
195 | | - if( $hideLogs ) $where[] = $hideLogs; |
| 195 | + if ( $hideLogs ) $where[] = $hideLogs; |
196 | 196 | # Add on any caller specified conditions |
197 | | - if( $cond ) $where[] = $cond; |
| 197 | + if ( $cond ) $where[] = $cond; |
198 | 198 | # Get logging table name for logging.* clause |
199 | | - $logging = $this->db->tableName('logging'); |
200 | | - $result = $this->db->select( array('logging','user'), |
| 199 | + $logging = $this->db->tableName( 'logging' ); |
| 200 | + $result = $this->db->select( array( 'logging', 'user' ), |
201 | 201 | array( "{$logging}.*", 'user_name' ), // grab the user name |
202 | 202 | $where, |
203 | 203 | __METHOD__, |
204 | | - array( 'ORDER BY' => 'log_id', 'USE INDEX' => array('logging' => 'PRIMARY') ) |
| 204 | + array( 'ORDER BY' => 'log_id', 'USE INDEX' => array( 'logging' => 'PRIMARY' ) ) |
205 | 205 | ); |
206 | 206 | $wrapper = $this->db->resultObject( $result ); |
207 | 207 | $this->outputLogStream( $wrapper ); |
208 | | - if( $this->buffer == WikiExporter::STREAM ) { |
| 208 | + if ( $this->buffer == WikiExporter::STREAM ) { |
209 | 209 | $this->db->bufferResults( $prev ); |
210 | 210 | } |
211 | 211 | # For page dumps... |
— | — | @@ -213,11 +213,11 @@ |
214 | 214 | $opts = array( 'ORDER BY' => 'page_id ASC' ); |
215 | 215 | $opts['USE INDEX'] = array(); |
216 | 216 | $join = array(); |
217 | | - if( is_array( $this->history ) ) { |
| 217 | + if ( is_array( $this->history ) ) { |
218 | 218 | # Time offset/limit for all pages/history... |
219 | 219 | $revJoin = 'page_id=rev_page'; |
220 | 220 | # Set time order |
221 | | - if( $this->history['dir'] == 'asc' ) { |
| 221 | + if ( $this->history['dir'] == 'asc' ) { |
222 | 222 | $op = '>'; |
223 | 223 | $opts['ORDER BY'] = 'rev_timestamp ASC'; |
224 | 224 | } else { |
— | — | @@ -225,54 +225,54 @@ |
226 | 226 | $opts['ORDER BY'] = 'rev_timestamp DESC'; |
227 | 227 | } |
228 | 228 | # Set offset |
229 | | - if( !empty( $this->history['offset'] ) ) { |
| 229 | + if ( !empty( $this->history['offset'] ) ) { |
230 | 230 | $revJoin .= " AND rev_timestamp $op " . |
231 | 231 | $this->db->addQuotes( $this->db->timestamp( $this->history['offset'] ) ); |
232 | 232 | } |
233 | | - $join['revision'] = array('INNER JOIN',$revJoin); |
| 233 | + $join['revision'] = array( 'INNER JOIN', $revJoin ); |
234 | 234 | # Set query limit |
235 | | - if( !empty( $this->history['limit'] ) ) { |
| 235 | + if ( !empty( $this->history['limit'] ) ) { |
236 | 236 | $opts['LIMIT'] = intval( $this->history['limit'] ); |
237 | 237 | } |
238 | | - } elseif( $this->history & WikiExporter::FULL ) { |
| 238 | + } elseif ( $this->history & WikiExporter::FULL ) { |
239 | 239 | # Full history dumps... |
240 | | - $join['revision'] = array('INNER JOIN','page_id=rev_page'); |
241 | | - } elseif( $this->history & WikiExporter::CURRENT ) { |
| 240 | + $join['revision'] = array( 'INNER JOIN', 'page_id=rev_page' ); |
| 241 | + } elseif ( $this->history & WikiExporter::CURRENT ) { |
242 | 242 | # Latest revision dumps... |
243 | | - if( $this->list_authors && $cond != '' ) { // List authors, if so desired |
244 | | - list($page,$revision) = $this->db->tableNamesN('page','revision'); |
| 243 | + if ( $this->list_authors && $cond != '' ) { // List authors, if so desired |
| 244 | + list( $page, $revision ) = $this->db->tableNamesN( 'page', 'revision' ); |
245 | 245 | $this->do_list_authors( $page, $revision, $cond ); |
246 | 246 | } |
247 | | - $join['revision'] = array('INNER JOIN','page_id=rev_page AND page_latest=rev_id'); |
248 | | - } elseif( $this->history & WikiExporter::STABLE ) { |
| 247 | + $join['revision'] = array( 'INNER JOIN', 'page_id=rev_page AND page_latest=rev_id' ); |
| 248 | + } elseif ( $this->history & WikiExporter::STABLE ) { |
249 | 249 | # "Stable" revision dumps... |
250 | 250 | # Default JOIN, to be overridden... |
251 | | - $join['revision'] = array('INNER JOIN','page_id=rev_page AND page_latest=rev_id'); |
| 251 | + $join['revision'] = array( 'INNER JOIN', 'page_id=rev_page AND page_latest=rev_id' ); |
252 | 252 | # One, and only one hook should set this, and return false |
253 | | - if( wfRunHooks( 'WikiExporter::dumpStableQuery', array(&$tables,&$opts,&$join) ) ) { |
| 253 | + if ( wfRunHooks( 'WikiExporter::dumpStableQuery', array( &$tables, &$opts, &$join ) ) ) { |
254 | 254 | wfProfileOut( __METHOD__ ); |
255 | | - throw new MWException( __METHOD__." given invalid history dump type." ); |
| 255 | + throw new MWException( __METHOD__ . " given invalid history dump type." ); |
256 | 256 | } |
257 | 257 | } else { |
258 | 258 | # Uknown history specification parameter? |
259 | 259 | wfProfileOut( __METHOD__ ); |
260 | | - throw new MWException( __METHOD__." given invalid history dump type." ); |
| 260 | + throw new MWException( __METHOD__ . " given invalid history dump type." ); |
261 | 261 | } |
262 | 262 | # Query optimization hacks |
263 | | - if( $cond == '' ) { |
| 263 | + if ( $cond == '' ) { |
264 | 264 | $opts[] = 'STRAIGHT_JOIN'; |
265 | 265 | $opts['USE INDEX']['page'] = 'PRIMARY'; |
266 | 266 | } |
267 | 267 | # Build text join options |
268 | | - if( $this->text != WikiExporter::STUB ) { // 1-pass |
| 268 | + if ( $this->text != WikiExporter::STUB ) { // 1-pass |
269 | 269 | $tables[] = 'text'; |
270 | | - $join['text'] = array('INNER JOIN','rev_text_id=old_id'); |
| 270 | + $join['text'] = array( 'INNER JOIN', 'rev_text_id=old_id' ); |
271 | 271 | } |
272 | 272 | |
273 | | - if( $this->buffer == WikiExporter::STREAM ) { |
| 273 | + if ( $this->buffer == WikiExporter::STREAM ) { |
274 | 274 | $prev = $this->db->bufferResults( false ); |
275 | 275 | } |
276 | | - |
| 276 | + |
277 | 277 | wfRunHooks( 'ModifyExportQuery', |
278 | 278 | array( $this->db, &$tables, &$cond, &$opts, &$join ) ); |
279 | 279 | |
— | — | @@ -281,11 +281,11 @@ |
282 | 282 | $wrapper = $this->db->resultObject( $result ); |
283 | 283 | # Output dump results |
284 | 284 | $this->outputPageStream( $wrapper ); |
285 | | - if( $this->list_authors ) { |
| 285 | + if ( $this->list_authors ) { |
286 | 286 | $this->outputPageStream( $wrapper ); |
287 | 287 | } |
288 | 288 | |
289 | | - if( $this->buffer == WikiExporter::STREAM ) { |
| 289 | + if ( $this->buffer == WikiExporter::STREAM ) { |
290 | 290 | $this->db->bufferResults( $prev ); |
291 | 291 | } |
292 | 292 | } |
— | — | @@ -307,12 +307,12 @@ |
308 | 308 | protected function outputPageStream( $resultset ) { |
309 | 309 | $last = null; |
310 | 310 | foreach ( $resultset as $row ) { |
311 | | - if( is_null( $last ) || |
| 311 | + if ( is_null( $last ) || |
312 | 312 | $last->page_namespace != $row->page_namespace || |
313 | 313 | $last->page_title != $row->page_title ) { |
314 | | - if( isset( $last ) ) { |
| 314 | + if ( isset( $last ) ) { |
315 | 315 | $output = ''; |
316 | | - if( $this->dumpUploads ) { |
| 316 | + if ( $this->dumpUploads ) { |
317 | 317 | $output .= $this->writer->writeUploads( $last ); |
318 | 318 | } |
319 | 319 | $output .= $this->writer->closePage(); |
— | — | @@ -325,9 +325,9 @@ |
326 | 326 | $output = $this->writer->writeRevision( $row ); |
327 | 327 | $this->sink->writeRevision( $row, $output ); |
328 | 328 | } |
329 | | - if( isset( $last ) ) { |
| 329 | + if ( isset( $last ) ) { |
330 | 330 | $output = ''; |
331 | | - if( $this->dumpUploads ) { |
| 331 | + if ( $this->dumpUploads ) { |
332 | 332 | $output .= $this->writer->writeUploads( $last ); |
333 | 333 | } |
334 | 334 | $output .= $this->author_list; |
— | — | @@ -335,7 +335,7 @@ |
336 | 336 | $this->sink->writeClosePage( $output ); |
337 | 337 | } |
338 | 338 | } |
339 | | - |
| 339 | + |
340 | 340 | protected function outputLogStream( $resultset ) { |
341 | 341 | foreach ( $resultset as $row ) { |
342 | 342 | $output = $this->writer->writeLogItem( $row ); |
— | — | @@ -418,9 +418,9 @@ |
419 | 419 | function namespaces() { |
420 | 420 | global $wgContLang; |
421 | 421 | $spaces = "<namespaces>\n"; |
422 | | - foreach( $wgContLang->getFormattedNamespaces() as $ns => $title ) { |
423 | | - $spaces .= ' ' . |
424 | | - Xml::element( 'namespace', |
| 422 | + foreach ( $wgContLang->getFormattedNamespaces() as $ns => $title ) { |
| 423 | + $spaces .= ' ' . |
| 424 | + Xml::element( 'namespace', |
425 | 425 | array( 'key' => $ns, |
426 | 426 | 'case' => MWNamespace::isCapitalized( $ns ) ? 'first-letter' : 'case-sensitive', |
427 | 427 | ), $title ) . "\n"; |
— | — | @@ -451,16 +451,16 @@ |
452 | 452 | $title = Title::makeTitle( $row->page_namespace, $row->page_title ); |
453 | 453 | $out .= ' ' . Xml::elementClean( 'title', array(), $title->getPrefixedText() ) . "\n"; |
454 | 454 | $out .= ' ' . Xml::element( 'id', array(), strval( $row->page_id ) ) . "\n"; |
455 | | - if( $row->page_is_redirect ) { |
| 455 | + if ( $row->page_is_redirect ) { |
456 | 456 | $out .= ' ' . Xml::element( 'redirect', array() ) . "\n"; |
457 | 457 | } |
458 | | - if( $row->page_restrictions != '' ) { |
| 458 | + if ( $row->page_restrictions != '' ) { |
459 | 459 | $out .= ' ' . Xml::element( 'restrictions', array(), |
460 | 460 | strval( $row->page_restrictions ) ) . "\n"; |
461 | 461 | } |
462 | | - |
| 462 | + |
463 | 463 | wfRunHooks( 'XmlDumpWriterOpenPage', array( $this, &$out, $row, $title ) ); |
464 | | - |
| 464 | + |
465 | 465 | return $out; |
466 | 466 | } |
467 | 467 | |
— | — | @@ -489,25 +489,25 @@ |
490 | 490 | |
491 | 491 | $out .= $this->writeTimestamp( $row->rev_timestamp ); |
492 | 492 | |
493 | | - if( $row->rev_deleted & Revision::DELETED_USER ) { |
| 493 | + if ( $row->rev_deleted & Revision::DELETED_USER ) { |
494 | 494 | $out .= " " . Xml::element( 'contributor', array( 'deleted' => 'deleted' ) ) . "\n"; |
495 | 495 | } else { |
496 | 496 | $out .= $this->writeContributor( $row->rev_user, $row->rev_user_text ); |
497 | 497 | } |
498 | 498 | |
499 | | - if( $row->rev_minor_edit ) { |
| 499 | + if ( $row->rev_minor_edit ) { |
500 | 500 | $out .= " <minor/>\n"; |
501 | 501 | } |
502 | | - if( $row->rev_deleted & Revision::DELETED_COMMENT ) { |
| 502 | + if ( $row->rev_deleted & Revision::DELETED_COMMENT ) { |
503 | 503 | $out .= " " . Xml::element( 'comment', array( 'deleted' => 'deleted' ) ) . "\n"; |
504 | | - } elseif( $row->rev_comment != '' ) { |
| 504 | + } elseif ( $row->rev_comment != '' ) { |
505 | 505 | $out .= " " . Xml::elementClean( 'comment', null, strval( $row->rev_comment ) ) . "\n"; |
506 | 506 | } |
507 | 507 | |
508 | 508 | $text = ''; |
509 | | - if( $row->rev_deleted & Revision::DELETED_TEXT ) { |
| 509 | + if ( $row->rev_deleted & Revision::DELETED_TEXT ) { |
510 | 510 | $out .= " " . Xml::element( 'text', array( 'deleted' => 'deleted' ) ) . "\n"; |
511 | | - } elseif( isset( $row->old_text ) ) { |
| 511 | + } elseif ( isset( $row->old_text ) ) { |
512 | 512 | // Raw text from the database may have invalid chars |
513 | 513 | $text = strval( Revision::getRevisionText( $row ) ); |
514 | 514 | $out .= " " . Xml::elementClean( 'text', |
— | — | @@ -527,7 +527,7 @@ |
528 | 528 | wfProfileOut( __METHOD__ ); |
529 | 529 | return $out; |
530 | 530 | } |
531 | | - |
| 531 | + |
532 | 532 | /** |
533 | 533 | * Dumps a <logitem> section on the output stream, with |
534 | 534 | * data filled in from the given database row. |
— | — | @@ -544,22 +544,22 @@ |
545 | 545 | |
546 | 546 | $out .= $this->writeTimestamp( $row->log_timestamp ); |
547 | 547 | |
548 | | - if( $row->log_deleted & LogPage::DELETED_USER ) { |
| 548 | + if ( $row->log_deleted & LogPage::DELETED_USER ) { |
549 | 549 | $out .= " " . Xml::element( 'contributor', array( 'deleted' => 'deleted' ) ) . "\n"; |
550 | 550 | } else { |
551 | 551 | $out .= $this->writeContributor( $row->log_user, $row->user_name ); |
552 | 552 | } |
553 | 553 | |
554 | | - if( $row->log_deleted & LogPage::DELETED_COMMENT ) { |
| 554 | + if ( $row->log_deleted & LogPage::DELETED_COMMENT ) { |
555 | 555 | $out .= " " . Xml::element( 'comment', array( 'deleted' => 'deleted' ) ) . "\n"; |
556 | | - } elseif( $row->log_comment != '' ) { |
| 556 | + } elseif ( $row->log_comment != '' ) { |
557 | 557 | $out .= " " . Xml::elementClean( 'comment', null, strval( $row->log_comment ) ) . "\n"; |
558 | 558 | } |
559 | | - |
| 559 | + |
560 | 560 | $out .= " " . Xml::element( 'type', null, strval( $row->log_type ) ) . "\n"; |
561 | 561 | $out .= " " . Xml::element( 'action', null, strval( $row->log_action ) ) . "\n"; |
562 | 562 | |
563 | | - if( $row->log_deleted & LogPage::DELETED_ACTION ) { |
| 563 | + if ( $row->log_deleted & LogPage::DELETED_ACTION ) { |
564 | 564 | $out .= " " . Xml::element( 'text', array( 'deleted' => 'deleted' ) ) . "\n"; |
565 | 565 | } else { |
566 | 566 | $title = Title::makeTitle( $row->log_namespace, $row->log_title ); |
— | — | @@ -582,7 +582,7 @@ |
583 | 583 | |
584 | 584 | function writeContributor( $id, $text ) { |
585 | 585 | $out = " <contributor>\n"; |
586 | | - if( $id ) { |
| 586 | + if ( $id ) { |
587 | 587 | $out .= " " . Xml::elementClean( 'username', null, strval( $text ) ) . "\n"; |
588 | 588 | $out .= " " . Xml::element( 'id', null, strval( $id ) ) . "\n"; |
589 | 589 | } else { |
— | — | @@ -596,11 +596,11 @@ |
597 | 597 | * Warning! This data is potentially inconsistent. :( |
598 | 598 | */ |
599 | 599 | function writeUploads( $row ) { |
600 | | - if( $row->page_namespace == NS_IMAGE ) { |
| 600 | + if ( $row->page_namespace == NS_IMAGE ) { |
601 | 601 | $img = wfFindFile( $row->page_title ); |
602 | | - if( $img ) { |
| 602 | + if ( $img ) { |
603 | 603 | $out = ''; |
604 | | - foreach( array_reverse( $img->getHistory() ) as $ver ) { |
| 604 | + foreach ( array_reverse( $img->getHistory() ) as $ver ) { |
605 | 605 | $out .= $this->writeUpload( $ver ); |
606 | 606 | } |
607 | 607 | $out .= $this->writeUpload( $img ); |
— | — | @@ -648,7 +648,7 @@ |
649 | 649 | function writeRevision( $rev, $string ) { |
650 | 650 | $this->write( $string ); |
651 | 651 | } |
652 | | - |
| 652 | + |
653 | 653 | function writeLogItem( $rev, $string ) { |
654 | 654 | $this->write( $string ); |
655 | 655 | } |
— | — | @@ -686,7 +686,7 @@ |
687 | 687 | */ |
688 | 688 | class DumpPipeOutput extends DumpFileOutput { |
689 | 689 | function __construct( $command, $file = null ) { |
690 | | - if( !is_null( $file ) ) { |
| 690 | + if ( !is_null( $file ) ) { |
691 | 691 | $command .= " > " . wfEscapeShellArg( $file ); |
692 | 692 | } |
693 | 693 | $this->handle = popen( $command, "w" ); |
— | — | @@ -750,27 +750,27 @@ |
751 | 751 | |
752 | 752 | function writeOpenPage( $page, $string ) { |
753 | 753 | $this->sendingThisPage = $this->pass( $page, $string ); |
754 | | - if( $this->sendingThisPage ) { |
| 754 | + if ( $this->sendingThisPage ) { |
755 | 755 | $this->sink->writeOpenPage( $page, $string ); |
756 | 756 | } |
757 | 757 | } |
758 | 758 | |
759 | 759 | function writeClosePage( $string ) { |
760 | | - if( $this->sendingThisPage ) { |
| 760 | + if ( $this->sendingThisPage ) { |
761 | 761 | $this->sink->writeClosePage( $string ); |
762 | 762 | $this->sendingThisPage = false; |
763 | 763 | } |
764 | 764 | } |
765 | 765 | |
766 | 766 | function writeRevision( $rev, $string ) { |
767 | | - if( $this->sendingThisPage ) { |
| 767 | + if ( $this->sendingThisPage ) { |
768 | 768 | $this->sink->writeRevision( $rev, $string ); |
769 | 769 | } |
770 | 770 | } |
771 | | - |
| 771 | + |
772 | 772 | function writeLogItem( $rev, $string ) { |
773 | 773 | $this->sink->writeRevision( $rev, $string ); |
774 | | - } |
| 774 | + } |
775 | 775 | |
776 | 776 | /** |
777 | 777 | * Override for page-based filter types. |
— | — | @@ -822,17 +822,17 @@ |
823 | 823 | "NS_CATEGORY" => NS_CATEGORY, |
824 | 824 | "NS_CATEGORY_TALK" => NS_CATEGORY_TALK ); |
825 | 825 | |
826 | | - if( $param{0} == '!' ) { |
| 826 | + if ( $param { 0 } == '!' ) { |
827 | 827 | $this->invert = true; |
828 | 828 | $param = substr( $param, 1 ); |
829 | 829 | } |
830 | 830 | |
831 | | - foreach( explode( ',', $param ) as $key ) { |
| 831 | + foreach ( explode( ',', $param ) as $key ) { |
832 | 832 | $key = trim( $key ); |
833 | | - if( isset( $constants[$key] ) ) { |
| 833 | + if ( isset( $constants[$key] ) ) { |
834 | 834 | $ns = $constants[$key]; |
835 | 835 | $this->namespaces[$ns] = true; |
836 | | - } elseif( is_numeric( $key ) ) { |
| 836 | + } elseif ( is_numeric( $key ) ) { |
837 | 837 | $ns = intval( $key ); |
838 | 838 | $this->namespaces[$ns] = true; |
839 | 839 | } else { |
— | — | @@ -861,7 +861,7 @@ |
862 | 862 | } |
863 | 863 | |
864 | 864 | function writeClosePage( $string ) { |
865 | | - if( $this->rev ) { |
| 865 | + if ( $this->rev ) { |
866 | 866 | $this->sink->writeOpenPage( $this->page, $this->pageString ); |
867 | 867 | $this->sink->writeRevision( $this->rev, $this->revString ); |
868 | 868 | $this->sink->writeClosePage( $string ); |
— | — | @@ -873,7 +873,7 @@ |
874 | 874 | } |
875 | 875 | |
876 | 876 | function writeRevision( $rev, $string ) { |
877 | | - if( $rev->rev_id == $this->page->page_latest ) { |
| 877 | + if ( $rev->rev_id == $this->page->page_latest ) { |
878 | 878 | $this->rev = $rev; |
879 | 879 | $this->revString = $string; |
880 | 880 | } |
— | — | @@ -891,31 +891,31 @@ |
892 | 892 | } |
893 | 893 | |
894 | 894 | function writeOpenStream( $string ) { |
895 | | - for( $i = 0; $i < $this->count; $i++ ) { |
| 895 | + for ( $i = 0; $i < $this->count; $i++ ) { |
896 | 896 | $this->sinks[$i]->writeOpenStream( $string ); |
897 | 897 | } |
898 | 898 | } |
899 | 899 | |
900 | 900 | function writeCloseStream( $string ) { |
901 | | - for( $i = 0; $i < $this->count; $i++ ) { |
| 901 | + for ( $i = 0; $i < $this->count; $i++ ) { |
902 | 902 | $this->sinks[$i]->writeCloseStream( $string ); |
903 | 903 | } |
904 | 904 | } |
905 | 905 | |
906 | 906 | function writeOpenPage( $page, $string ) { |
907 | | - for( $i = 0; $i < $this->count; $i++ ) { |
| 907 | + for ( $i = 0; $i < $this->count; $i++ ) { |
908 | 908 | $this->sinks[$i]->writeOpenPage( $page, $string ); |
909 | 909 | } |
910 | 910 | } |
911 | 911 | |
912 | 912 | function writeClosePage( $string ) { |
913 | | - for( $i = 0; $i < $this->count; $i++ ) { |
| 913 | + for ( $i = 0; $i < $this->count; $i++ ) { |
914 | 914 | $this->sinks[$i]->writeClosePage( $string ); |
915 | 915 | } |
916 | 916 | } |
917 | 917 | |
918 | 918 | function writeRevision( $rev, $string ) { |
919 | | - for( $i = 0; $i < $this->count; $i++ ) { |
| 919 | + for ( $i = 0; $i < $this->count; $i++ ) { |
920 | 920 | $this->sinks[$i]->writeRevision( $rev, $string ); |
921 | 921 | } |
922 | 922 | } |