Index: trunk/extensions/OAI/OAIRepo_body.php |
— | — | @@ -571,7 +571,7 @@ |
572 | 572 | |
573 | 573 | function fetchRecord( $pageid ) { |
574 | 574 | $db = $this->_db; |
575 | | - |
| 575 | + |
576 | 576 | $tables = array( 'updates', 'page', 'revision', 'text' ); |
577 | 577 | $fields = array( 'page_namespace', 'page_title', 'old_text', 'old_flags', |
578 | 578 | 'rev_id', 'rev_deleted', 'rev_comment', 'rev_user', |
— | — | @@ -584,11 +584,11 @@ |
585 | 585 | $join_conds = array( 'page' => array( 'LEFT JOIN', 'page_id=up_page' ), |
586 | 586 | 'revision' => array( 'LEFT JOIN', 'page_latest=rev_id' ), |
587 | 587 | 'text' => array( 'LEFT JOIN', 'rev_text_id=old_id' ) ); |
588 | | - |
| 588 | + |
589 | 589 | $conds['up_page'] = $pageid; |
590 | | - |
| 590 | + |
591 | 591 | $options['LIMIT'] = 1; |
592 | | - |
| 592 | + |
593 | 593 | wfRunHooks( 'OAIFetchRecordQuery', array( &$tables, &$fields, &$conds, |
594 | 594 | &$options, &$join_conds ) ); |
595 | 595 | |
— | — | @@ -597,9 +597,9 @@ |
598 | 598 | } |
599 | 599 | |
600 | 600 | function fetchRows( $from, $until, $chunk, $token = null ) { |
601 | | - |
| 601 | + |
602 | 602 | $db = $this->_db; |
603 | | - |
| 603 | + |
604 | 604 | $tables = array( 'updates', 'page', 'revision', 'text' ); |
605 | 605 | $fields = array( 'page_namespace', 'page_title', 'old_text', 'old_flags', |
606 | 606 | 'rev_id', 'rev_deleted', 'rev_comment', 'rev_user', |
— | — | @@ -612,7 +612,7 @@ |
613 | 613 | $join_conds = array( 'page' => array( 'LEFT JOIN', 'page_id=up_page' ), |
614 | 614 | 'revision' => array( 'LEFT JOIN', 'page_latest=rev_id' ), |
615 | 615 | 'text' => array( 'LEFT JOIN', 'rev_text_id=old_id' ) ); |
616 | | - |
| 616 | + |
617 | 617 | if( $token ) { |
618 | 618 | $conds[] = 'up_sequence>=' . $db->addQuotes( $token ); |
619 | 619 | $options['ORDER BY'] = 'up_sequence'; |
— | — | @@ -625,9 +625,9 @@ |
626 | 626 | if( $until ) { |
627 | 627 | $conds[] = 'up_timestamp<=' .$db->addQuotes( $db->timestamp( $until ) ); |
628 | 628 | } |
629 | | - |
| 629 | + |
630 | 630 | $options['LIMIT'] = $chunk; |
631 | | - |
| 631 | + |
632 | 632 | wfRunHooks( 'OAIFetchRowsQuery', array( &$tables, &$fields, &$conds, |
633 | 633 | &$options, &$join_conds ) ); |
634 | 634 | |
Index: trunk/extensions/OpenID/SpecialOpenIDServer.body.php |
— | — | @@ -166,6 +166,9 @@ |
167 | 167 | |
168 | 168 | # Returns an Auth_OpenID_Server from the libraries. Utility. |
169 | 169 | |
| 170 | + /** |
| 171 | + * @return Auth_OpenID_Server |
| 172 | + */ |
170 | 173 | function getServer() { |
171 | 174 | global $wgOpenIDServerStorePath, |
172 | 175 | $wgOpenIDServerStoreType; |
Index: trunk/extensions/InterwikiList/InterwikiList_body.php |
— | — | @@ -6,9 +6,9 @@ |
7 | 7 | if ( !defined('MEDIAWIKI') ) { |
8 | 8 | die( '' ); |
9 | 9 | } |
10 | | - |
| 10 | + |
11 | 11 | class InterwikiList extends SpecialPage { |
12 | | - |
| 12 | + |
13 | 13 | // Privates |
14 | 14 | private $mTitle; // The title for this specialpage |
15 | 15 | |
— | — | @@ -17,9 +17,9 @@ |
18 | 18 | */ |
19 | 19 | public function InterwikiList() { |
20 | 20 | parent::__construct("InterwikiList"); |
21 | | - |
| 21 | + |
22 | 22 | } |
23 | | - |
| 23 | + |
24 | 24 | /** |
25 | 25 | * Execute |
26 | 26 | */ |
— | — | @@ -30,8 +30,8 @@ |
31 | 31 | $prefix = $wgRequest->getText( 'iwsearch', $par ); |
32 | 32 | $wgOut->addHTML( $this->getInterwikis( $prefix ) ); |
33 | 33 | } |
34 | | - |
35 | | - /** |
| 34 | + |
| 35 | + /** |
36 | 36 | * Get all Interwiki Links - the heart of the function |
37 | 37 | * @param $prefix string Prefix to search for in list |
38 | 38 | * @return string HTML |
— | — | @@ -55,14 +55,14 @@ |
56 | 56 | $text = Xml::fieldSet( wfMsg('interwikilist-filter'), $form ); |
57 | 57 | |
58 | 58 | $interwikiList = array(); |
59 | | - while( $row = $dbr->fetchObject( $results ) ) { |
| 59 | + foreach( $results as $row ) { |
60 | 60 | $interwikiList[ "mw-iwlist-" . $row->iw_prefix ] = array( $row->iw_prefix, $row->iw_url ); |
61 | 61 | } |
62 | 62 | $dbr->freeResult( $results ); |
63 | 63 | |
64 | | - $text .= Xml::buildTable( $interwikiList, |
| 64 | + $text .= Xml::buildTable( $interwikiList, |
65 | 65 | array( 'id' => 'sv-software' ), |
66 | | - array( wfMsg( 'interwikilist-linkname'), |
| 66 | + array( wfMsg( 'interwikilist-linkname'), |
67 | 67 | wfMsg( 'interwikilist-target' ) ) ); |
68 | 68 | return $text; |
69 | 69 | } |