Index: branches/wmf/1.19wmf1/extensions/CategoryTree/CategoryTree.php |
— | — | @@ -170,7 +170,7 @@ |
171 | 171 | * Hook it up |
172 | 172 | */ |
173 | 173 | function efCategoryTree() { |
174 | | - global $wgUseAjax, $wgHooks, $wgOut; |
| 174 | + global $wgUseAjax, $wgHooks, $wgOut, $wgRequest; |
175 | 175 | global $wgCategoryTreeDefaultOptions, $wgCategoryTreeDefaultMode, $wgCategoryTreeOmitNamespace; |
176 | 176 | global $wgCategoryTreeCategoryPageOptions, $wgCategoryTreeCategoryPageMode, $wgCategoryTreeAllowTag; |
177 | 177 | global $wgCategoryTreeSidebarRoot, $wgCategoryTreeForceHeaders, $wgCategoryTreeHijackPageCategories; |
— | — | @@ -204,8 +204,8 @@ |
205 | 205 | $wgCategoryTreeDefaultOptions['hideprefix'] = $wgCategoryTreeOmitNamespace; |
206 | 206 | } |
207 | 207 | |
208 | | - if ( !isset( $wgCategoryTreeCategoryPageOptions['mode'] ) || is_null( $wgCategoryTreeCategoryPageOptions['mode'] ) ) { |
209 | | - $wgCategoryTreeCategoryPageOptions['mode'] = $wgCategoryTreeCategoryPageMode; |
| 208 | + if ( !isset( $wgCategoryTreeCategoryPageOptions['mode'] ) || is_null( $wgCategoryTreeCategoryPageOptions['mode'] ) ) { |
| 209 | + $wgCategoryTreeCategoryPageOptions['mode'] = ( $mode = $wgRequest->getVal( 'mode' ) ) ? CategoryTree::decodeMode( $mode ) : $wgCategoryTreeCategoryPageMode; |
210 | 210 | } |
211 | 211 | |
212 | 212 | if ( $wgCategoryTreeForceHeaders ) { |
— | — | @@ -214,7 +214,7 @@ |
215 | 215 | $wgHooks['OutputPageParserOutput'][] = 'efCategoryTreeParserOutput'; |
216 | 216 | } |
217 | 217 | |
218 | | - $wgHooks['ResourceLoaderGetConfigVars'][] = 'efCategoryTreeGetConfigVars'; |
| 218 | + $wgHooks['MakeGlobalVariablesScript'][] = 'efCategoryTreeGetConfigVars'; |
219 | 219 | } |
220 | 220 | |
221 | 221 | function efCategoryTreeSetHooks( $parser ) { |
Property changes on: branches/wmf/1.19wmf1/extensions |
___________________________________________________________________ |
Added: svn:mergeinfo |
222 | 222 | Merged /branches/REL1_17/phase3/extensions:r81445,81448 |
223 | 223 | Merged /trunk/extensions:r111218 |
224 | 224 | Merged /branches/sqlite/extensions:r58211-58321 |
225 | 225 | Merged /trunk/phase3/extensions:r111002,111029,111034,111062,111067,111076,111085,111128,111144,111251 |
226 | 226 | Merged /branches/new-installer/phase3/extensions:r43664-66004 |
227 | 227 | Merged /branches/JSTesting/extensions:r100352-107913 |
228 | 228 | Merged /branches/REL1_15/phase3/extensions:r51646 |
229 | 229 | Merged /branches/wmf/1.18wmf1/extensions:r97508 |
Index: branches/wmf/1.19wmf1/includes/actions/HistoryAction.php |
— | — | @@ -385,8 +385,13 @@ |
386 | 386 | $this->mResult->seek( 0 ); |
387 | 387 | $batch = new LinkBatch(); |
388 | 388 | foreach ( $this->mResult as $row ) { |
389 | | - $batch->addObj( Title::makeTitleSafe( NS_USER, $row->user_name ) ); |
390 | | - $batch->addObj( Title::makeTitleSafe( NS_USER_TALK, $row->user_name ) ); |
| 389 | + if( !is_null( $row->user_name ) ) { |
| 390 | + $batch->add( NS_USER, $row->user_name ); |
| 391 | + $batch->add( NS_USER_TALK, $row->user_name ); |
| 392 | + } else { # for anons or usernames of imported revisions |
| 393 | + $batch->add( NS_USER, $row->rev_user_text ); |
| 394 | + $batch->add( NS_USER_TALK, $row->rev_user_text ); |
| 395 | + } |
391 | 396 | } |
392 | 397 | $batch->execute(); |
393 | 398 | $this->mResult->seek( 0 ); |
— | — | @@ -568,13 +573,10 @@ |
569 | 574 | $s .= ' ' . ChangesList::flag( 'minor' ); |
570 | 575 | } |
571 | 576 | |
572 | | - if ( $prevRev |
573 | | - && !$prevRev->isDeleted( Revision::DELETED_TEXT ) |
574 | | - && !$rev->isDeleted( Revision::DELETED_TEXT ) ) |
575 | | - { |
576 | | - $sDiff = ChangesList::showCharacterDifference( $prevRev->getSize(), $rev->getSize() ); |
577 | | - $s .= ' . . ' . $sDiff . ' . . '; |
578 | | - } |
| 577 | + # Size is always public data |
| 578 | + $prevSize = $prevRev ? $prevRev->getSize() : 0; |
| 579 | + $sDiff = ChangesList::showCharacterDifference( $prevSize, $rev->getSize() ); |
| 580 | + $s .= ' . . ' . $sDiff . ' . . '; |
579 | 581 | |
580 | 582 | $s .= Linker::revComment( $rev, false, true ); |
581 | 583 | |
Property changes on: branches/wmf/1.19wmf1/includes/actions/HistoryAction.php |
___________________________________________________________________ |
Modified: svn:mergeinfo |
582 | 584 | Merged /trunk/phase3/includes/actions/HistoryAction.php:r111251 |
Index: branches/wmf/1.19wmf1/includes/specials/SpecialContributions.php |
— | — | @@ -511,9 +511,9 @@ |
512 | 512 | $filterSelection . |
513 | 513 | Xml::closeElement( 'tr' ) . |
514 | 514 | Xml::openElement( 'tr' ) . |
515 | | - $extraOptions . |
516 | | - Xml::closeElement( 'tr' ) . |
517 | | - Xml::openElement( 'tr' ) . |
| 515 | + $extraOptions . |
| 516 | + Xml::closeElement( 'tr' ) . |
| 517 | + Xml::openElement( 'tr' ) . |
518 | 518 | $dateSelectionAndSubmit . |
519 | 519 | Xml::closeElement( 'tr' ) . |
520 | 520 | Xml::closeElement( 'table' ); |
— | — | @@ -677,23 +677,26 @@ |
678 | 678 | $this->mResult->rewind(); |
679 | 679 | $revIds = array(); |
680 | 680 | foreach ( $this->mResult as $row ) { |
681 | | - $revIds[] = $row->rev_parent_id; |
| 681 | + if( $row->rev_parent_id ) { |
| 682 | + $revIds[] = $row->rev_parent_id; |
| 683 | + } |
682 | 684 | } |
683 | 685 | $this->mParentLens = $this->getParentLengths( $revIds ); |
684 | 686 | $this->mResult->rewind(); // reset |
685 | 687 | |
686 | | - if ( $this->contribs === 'newbie' ) { // multiple users |
687 | | - # Do a link batch query |
688 | | - $this->mResult->seek( 0 ); |
689 | | - $batch = new LinkBatch(); |
690 | | - # Give some pointers to make (last) links |
691 | | - foreach ( $this->mResult as $row ) { |
692 | | - $batch->addObj( Title::makeTitleSafe( NS_USER, $row->user_name ) ); |
693 | | - $batch->addObj( Title::makeTitleSafe( NS_USER_TALK, $row->user_name ) ); |
| 688 | + # Do a link batch query |
| 689 | + $this->mResult->seek( 0 ); |
| 690 | + $batch = new LinkBatch(); |
| 691 | + # Give some pointers to make (last) links |
| 692 | + foreach ( $this->mResult as $row ) { |
| 693 | + if ( $this->contribs === 'newbie' ) { // multiple users |
| 694 | + $batch->add( NS_USER, $row->user_name ); |
| 695 | + $batch->add( NS_USER_TALK, $row->user_name ); |
694 | 696 | } |
695 | | - $batch->execute(); |
696 | | - $this->mResult->seek( 0 ); |
| 697 | + $batch->add( $row->page_namespace, $row->page_title ); |
697 | 698 | } |
| 699 | + $batch->execute(); |
| 700 | + $this->mResult->seek( 0 ); |
698 | 701 | } |
699 | 702 | |
700 | 703 | /** |
— | — | @@ -787,12 +790,9 @@ |
788 | 791 | array( 'action' => 'history' ) |
789 | 792 | ); |
790 | 793 | |
791 | | - if ( isset( $this->mParentLens[$row->rev_parent_id] ) ) { |
792 | | - $chardiff = ' . . ' . ChangesList::showCharacterDifference( |
793 | | - $this->mParentLens[$row->rev_parent_id], $row->rev_len ) . ' . . '; |
794 | | - } else { |
795 | | - $chardiff = ' '; |
796 | | - } |
| 794 | + $parentLen = isset( $this->mParentLens[$row->rev_parent_id] ) ? $this->mParentLens[$row->rev_parent_id] : 0; |
| 795 | + $chardiff = ' . . ' . ChangesList::showCharacterDifference( |
| 796 | + $parentLen, $row->rev_len ) . ' . . '; |
797 | 797 | |
798 | 798 | $lang = $this->getLanguage(); |
799 | 799 | $comment = $lang->getDirMark() . Linker::revComment( $rev, false, true ); |
Property changes on: branches/wmf/1.19wmf1/includes/specials |
___________________________________________________________________ |
Modified: svn:mergeinfo |
800 | 800 | Merged /trunk/phase3/includes/specials:r111251 |
Property changes on: branches/wmf/1.19wmf1/includes |
___________________________________________________________________ |
Modified: svn:mergeinfo |
801 | 801 | Merged /trunk/phase3/includes:r111251 |
Property changes on: branches/wmf/1.19wmf1 |
___________________________________________________________________ |
Modified: svn:mergeinfo |
802 | 802 | Merged /trunk/phase3:r111251 |
Index: branches/REL1_19/extensions/CategoryTree/CategoryTree.php |
— | — | @@ -170,7 +170,7 @@ |
171 | 171 | * Hook it up |
172 | 172 | */ |
173 | 173 | function efCategoryTree() { |
174 | | - global $wgUseAjax, $wgHooks, $wgOut; |
| 174 | + global $wgUseAjax, $wgHooks, $wgOut, $wgRequest; |
175 | 175 | global $wgCategoryTreeDefaultOptions, $wgCategoryTreeDefaultMode, $wgCategoryTreeOmitNamespace; |
176 | 176 | global $wgCategoryTreeCategoryPageOptions, $wgCategoryTreeCategoryPageMode, $wgCategoryTreeAllowTag; |
177 | 177 | global $wgCategoryTreeSidebarRoot, $wgCategoryTreeForceHeaders, $wgCategoryTreeHijackPageCategories; |
— | — | @@ -204,8 +204,8 @@ |
205 | 205 | $wgCategoryTreeDefaultOptions['hideprefix'] = $wgCategoryTreeOmitNamespace; |
206 | 206 | } |
207 | 207 | |
208 | | - if ( !isset( $wgCategoryTreeCategoryPageOptions['mode'] ) || is_null( $wgCategoryTreeCategoryPageOptions['mode'] ) ) { |
209 | | - $wgCategoryTreeCategoryPageOptions['mode'] = $wgCategoryTreeCategoryPageMode; |
| 208 | + if ( !isset( $wgCategoryTreeCategoryPageOptions['mode'] ) || is_null( $wgCategoryTreeCategoryPageOptions['mode'] ) ) { |
| 209 | + $wgCategoryTreeCategoryPageOptions['mode'] = ( $mode = $wgRequest->getVal( 'mode' ) ) ? CategoryTree::decodeMode( $mode ) : $wgCategoryTreeCategoryPageMode; |
210 | 210 | } |
211 | 211 | |
212 | 212 | if ( $wgCategoryTreeForceHeaders ) { |
— | — | @@ -214,7 +214,7 @@ |
215 | 215 | $wgHooks['OutputPageParserOutput'][] = 'efCategoryTreeParserOutput'; |
216 | 216 | } |
217 | 217 | |
218 | | - $wgHooks['ResourceLoaderGetConfigVars'][] = 'efCategoryTreeGetConfigVars'; |
| 218 | + $wgHooks['MakeGlobalVariablesScript'][] = 'efCategoryTreeGetConfigVars'; |
219 | 219 | } |
220 | 220 | |
221 | 221 | function efCategoryTreeSetHooks( $parser ) { |
Property changes on: branches/REL1_19/extensions |
___________________________________________________________________ |
Added: svn:mergeinfo |
222 | 222 | Merged /trunk/extensions:r111218 |
Index: branches/REL1_19/phase3/includes/actions/HistoryAction.php |
— | — | @@ -385,8 +385,13 @@ |
386 | 386 | $this->mResult->seek( 0 ); |
387 | 387 | $batch = new LinkBatch(); |
388 | 388 | foreach ( $this->mResult as $row ) { |
389 | | - $batch->addObj( Title::makeTitleSafe( NS_USER, $row->user_name ) ); |
390 | | - $batch->addObj( Title::makeTitleSafe( NS_USER_TALK, $row->user_name ) ); |
| 389 | + if( !is_null( $row->user_name ) ) { |
| 390 | + $batch->add( NS_USER, $row->user_name ); |
| 391 | + $batch->add( NS_USER_TALK, $row->user_name ); |
| 392 | + } else { # for anons or usernames of imported revisions |
| 393 | + $batch->add( NS_USER, $row->rev_user_text ); |
| 394 | + $batch->add( NS_USER_TALK, $row->rev_user_text ); |
| 395 | + } |
391 | 396 | } |
392 | 397 | $batch->execute(); |
393 | 398 | $this->mResult->seek( 0 ); |
— | — | @@ -568,13 +573,10 @@ |
569 | 574 | $s .= ' ' . ChangesList::flag( 'minor' ); |
570 | 575 | } |
571 | 576 | |
572 | | - if ( $prevRev |
573 | | - && !$prevRev->isDeleted( Revision::DELETED_TEXT ) |
574 | | - && !$rev->isDeleted( Revision::DELETED_TEXT ) ) |
575 | | - { |
576 | | - $sDiff = ChangesList::showCharacterDifference( $prevRev->getSize(), $rev->getSize() ); |
577 | | - $s .= ' . . ' . $sDiff . ' . . '; |
578 | | - } |
| 577 | + # Size is always public data |
| 578 | + $prevSize = $prevRev ? $prevRev->getSize() : 0; |
| 579 | + $sDiff = ChangesList::showCharacterDifference( $prevSize, $rev->getSize() ); |
| 580 | + $s .= ' . . ' . $sDiff . ' . . '; |
579 | 581 | |
580 | 582 | $s .= Linker::revComment( $rev, false, true ); |
581 | 583 | |
Property changes on: branches/REL1_19/phase3/includes/actions/HistoryAction.php |
___________________________________________________________________ |
Modified: svn:mergeinfo |
582 | 584 | Merged /trunk/phase3/includes/actions/HistoryAction.php:r111251 |
Index: branches/REL1_19/phase3/includes/specials/SpecialContributions.php |
— | — | @@ -511,9 +511,9 @@ |
512 | 512 | $filterSelection . |
513 | 513 | Xml::closeElement( 'tr' ) . |
514 | 514 | Xml::openElement( 'tr' ) . |
515 | | - $extraOptions . |
516 | | - Xml::closeElement( 'tr' ) . |
517 | | - Xml::openElement( 'tr' ) . |
| 515 | + $extraOptions . |
| 516 | + Xml::closeElement( 'tr' ) . |
| 517 | + Xml::openElement( 'tr' ) . |
518 | 518 | $dateSelectionAndSubmit . |
519 | 519 | Xml::closeElement( 'tr' ) . |
520 | 520 | Xml::closeElement( 'table' ); |
— | — | @@ -677,23 +677,26 @@ |
678 | 678 | $this->mResult->rewind(); |
679 | 679 | $revIds = array(); |
680 | 680 | foreach ( $this->mResult as $row ) { |
681 | | - $revIds[] = $row->rev_parent_id; |
| 681 | + if( $row->rev_parent_id ) { |
| 682 | + $revIds[] = $row->rev_parent_id; |
| 683 | + } |
682 | 684 | } |
683 | 685 | $this->mParentLens = $this->getParentLengths( $revIds ); |
684 | 686 | $this->mResult->rewind(); // reset |
685 | 687 | |
686 | | - if ( $this->contribs === 'newbie' ) { // multiple users |
687 | | - # Do a link batch query |
688 | | - $this->mResult->seek( 0 ); |
689 | | - $batch = new LinkBatch(); |
690 | | - # Give some pointers to make (last) links |
691 | | - foreach ( $this->mResult as $row ) { |
692 | | - $batch->addObj( Title::makeTitleSafe( NS_USER, $row->user_name ) ); |
693 | | - $batch->addObj( Title::makeTitleSafe( NS_USER_TALK, $row->user_name ) ); |
| 688 | + # Do a link batch query |
| 689 | + $this->mResult->seek( 0 ); |
| 690 | + $batch = new LinkBatch(); |
| 691 | + # Give some pointers to make (last) links |
| 692 | + foreach ( $this->mResult as $row ) { |
| 693 | + if ( $this->contribs === 'newbie' ) { // multiple users |
| 694 | + $batch->add( NS_USER, $row->user_name ); |
| 695 | + $batch->add( NS_USER_TALK, $row->user_name ); |
694 | 696 | } |
695 | | - $batch->execute(); |
696 | | - $this->mResult->seek( 0 ); |
| 697 | + $batch->add( $row->page_namespace, $row->page_title ); |
697 | 698 | } |
| 699 | + $batch->execute(); |
| 700 | + $this->mResult->seek( 0 ); |
698 | 701 | } |
699 | 702 | |
700 | 703 | /** |
— | — | @@ -787,12 +790,9 @@ |
788 | 791 | array( 'action' => 'history' ) |
789 | 792 | ); |
790 | 793 | |
791 | | - if ( isset( $this->mParentLens[$row->rev_parent_id] ) ) { |
792 | | - $chardiff = ' . . ' . ChangesList::showCharacterDifference( |
793 | | - $this->mParentLens[$row->rev_parent_id], $row->rev_len ) . ' . . '; |
794 | | - } else { |
795 | | - $chardiff = ' '; |
796 | | - } |
| 794 | + $parentLen = isset( $this->mParentLens[$row->rev_parent_id] ) ? $this->mParentLens[$row->rev_parent_id] : 0; |
| 795 | + $chardiff = ' . . ' . ChangesList::showCharacterDifference( |
| 796 | + $parentLen, $row->rev_len ) . ' . . '; |
797 | 797 | |
798 | 798 | $lang = $this->getLanguage(); |
799 | 799 | $comment = $lang->getDirMark() . Linker::revComment( $rev, false, true ); |
Property changes on: branches/REL1_19/phase3/includes/specials |
___________________________________________________________________ |
Modified: svn:mergeinfo |
800 | 800 | Merged /trunk/phase3/includes/specials:r111251 |
Property changes on: branches/REL1_19/phase3/includes |
___________________________________________________________________ |
Modified: svn:mergeinfo |
801 | 801 | Merged /trunk/phase3/includes:r111251 |
Property changes on: branches/REL1_19/phase3 |
___________________________________________________________________ |
Modified: svn:mergeinfo |
802 | 802 | Merged /trunk/phase3:r111251 |