Index: trunk/phase3/includes/ProtectionForm.php |
— | — | @@ -606,7 +606,7 @@ |
607 | 607 | function showLogExtract( &$out ) { |
608 | 608 | # Show relevant lines from the protection log: |
609 | 609 | $out->addHTML( Xml::element( 'h2', null, LogPage::logName( 'protect' ) ) ); |
610 | | - LogEventsList::showLogExtract( $out, 'protect', $this->mTitle->getPrefixedText() ); |
| 610 | + LogEventsList::showLogExtract( $out, 'protect', $this->mTitle ); |
611 | 611 | # Let extensions add other relevant log extracts |
612 | 612 | wfRunHooks( 'ProtectionForm::showLogExtract', array($this->mArticle,$out) ); |
613 | 613 | } |
Index: trunk/phase3/includes/EditPage.php |
— | — | @@ -807,7 +807,7 @@ |
808 | 808 | LogEventsList::showLogExtract( |
809 | 809 | $wgOut, |
810 | 810 | 'block', |
811 | | - $user->getUserPage()->getPrefixedText(), |
| 811 | + $user->getUserPage(), |
812 | 812 | '', |
813 | 813 | array( |
814 | 814 | 'lim' => 1, |
— | — | @@ -830,7 +830,7 @@ |
831 | 831 | } |
832 | 832 | # Give a notice if the user is editing a deleted/moved page... |
833 | 833 | if ( !$this->mTitle->exists() ) { |
834 | | - LogEventsList::showLogExtract( $wgOut, array( 'delete', 'move' ), $this->mTitle->getPrefixedText(), |
| 834 | + LogEventsList::showLogExtract( $wgOut, array( 'delete', 'move' ), $this->mTitle, |
835 | 835 | '', array( 'lim' => 10, |
836 | 836 | 'conds' => array( "log_action != 'revision'" ), |
837 | 837 | 'showIfEmpty' => false, |
— | — | @@ -1649,7 +1649,7 @@ |
1650 | 1650 | # Then it must be protected based on static groups (regular) |
1651 | 1651 | $noticeMsg = 'protectedpagewarning'; |
1652 | 1652 | } |
1653 | | - LogEventsList::showLogExtract( $wgOut, 'protect', $this->mTitle->getPrefixedText(), '', |
| 1653 | + LogEventsList::showLogExtract( $wgOut, 'protect', $this->mTitle, '', |
1654 | 1654 | array( 'lim' => 1, 'msgKey' => array( $noticeMsg ) ) ); |
1655 | 1655 | } |
1656 | 1656 | if ( $this->mTitle->isCascadeProtected() ) { |
— | — | @@ -1667,7 +1667,7 @@ |
1668 | 1668 | $wgOut->wrapWikiMsg( $notice, array( 'cascadeprotectedwarning', $cascadeSourcesCount ) ); |
1669 | 1669 | } |
1670 | 1670 | if ( !$this->mTitle->exists() && $this->mTitle->getRestrictions( 'create' ) ) { |
1671 | | - LogEventsList::showLogExtract( $wgOut, 'protect', $this->mTitle->getPrefixedText(), '', |
| 1671 | + LogEventsList::showLogExtract( $wgOut, 'protect', $this->mTitle, '', |
1672 | 1672 | array( 'lim' => 1, |
1673 | 1673 | 'showIfEmpty' => false, |
1674 | 1674 | 'msgKey' => array( 'titleprotectedwarning' ), |
Index: trunk/phase3/includes/HistoryPage.php |
— | — | @@ -117,7 +117,7 @@ |
118 | 118 | LogEventsList::showLogExtract( |
119 | 119 | $wgOut, |
120 | 120 | array( 'delete', 'move' ), |
121 | | - $this->title->getPrefixedText(), |
| 121 | + $this->title, |
122 | 122 | '', |
123 | 123 | array( 'lim' => 10, |
124 | 124 | 'conds' => array( "log_action != 'revision'" ), |
Index: trunk/phase3/includes/LogEventsList.php |
— | — | @@ -789,7 +789,7 @@ |
790 | 790 | * @param $list LogEventsList |
791 | 791 | * @param $types String or Array: log types to show |
792 | 792 | * @param $performer String: the user who made the log entries |
793 | | - * @param $title String: the page title the log entries are for |
| 793 | + * @param $title String or Title: the page title the log entries are for |
794 | 794 | * @param $pattern String: do a prefix search rather than an exact title match |
795 | 795 | * @param $conds Array: extra conditions for the query |
796 | 796 | * @param $year Integer: the year to start from |
— | — | @@ -909,15 +909,19 @@ |
910 | 910 | * Set the log reader to return only entries affecting the given page. |
911 | 911 | * (For the block and rights logs, this is a user page.) |
912 | 912 | * |
913 | | - * @param $page String: Title name as text |
| 913 | + * @param $page String or Title object: Title name |
914 | 914 | * @param $pattern String |
915 | 915 | */ |
916 | 916 | private function limitTitle( $page, $pattern ) { |
917 | 917 | global $wgMiserMode; |
918 | 918 | |
919 | | - $title = Title::newFromText( $page ); |
920 | | - if( strlen( $page ) == 0 || !$title instanceof Title ) { |
921 | | - return false; |
| 919 | + if ( $page instanceof Title ) { |
| 920 | + $title = $page; |
| 921 | + } else { |
| 922 | + $title = Title::newFromText( $page ); |
| 923 | + if( strlen( $page ) == 0 || !$title instanceof Title ) { |
| 924 | + return false; |
| 925 | + } |
922 | 926 | } |
923 | 927 | |
924 | 928 | $this->title = $title->getPrefixedText(); |
Index: trunk/phase3/includes/FileDeleteForm.php |
— | — | @@ -236,7 +236,7 @@ |
237 | 237 | private function showLogEntries() { |
238 | 238 | global $wgOut; |
239 | 239 | $wgOut->addHTML( '<h2>' . htmlspecialchars( LogPage::logName( 'delete' ) ) . "</h2>\n" ); |
240 | | - LogEventsList::showLogExtract( $wgOut, 'delete', $this->title->getPrefixedText() ); |
| 240 | + LogEventsList::showLogExtract( $wgOut, 'delete', $this->title ); |
241 | 241 | } |
242 | 242 | |
243 | 243 | /** |
Index: trunk/phase3/includes/specials/SpecialUserrights.php |
— | — | @@ -606,6 +606,6 @@ |
607 | 607 | */ |
608 | 608 | protected function showLogFragment( $user, $output ) { |
609 | 609 | $output->addHTML( Xml::element( 'h2', null, LogPage::logName( 'rights' ) . "\n" ) ); |
610 | | - LogEventsList::showLogExtract( $output, 'rights', $user->getUserPage()->getPrefixedText() ); |
| 610 | + LogEventsList::showLogExtract( $output, 'rights', $user->getUserPage() ); |
611 | 611 | } |
612 | 612 | } |
Index: trunk/phase3/includes/specials/SpecialUndelete.php |
— | — | @@ -1076,11 +1076,11 @@ |
1077 | 1077 | |
1078 | 1078 | # Show relevant lines from the deletion log: |
1079 | 1079 | $out->addHTML( Xml::element( 'h2', null, LogPage::logName( 'delete' ) ) . "\n" ); |
1080 | | - LogEventsList::showLogExtract( $out, 'delete', $this->mTargetObj->getPrefixedText() ); |
| 1080 | + LogEventsList::showLogExtract( $out, 'delete', $this->mTargetObj ); |
1081 | 1081 | # Show relevant lines from the suppression log: |
1082 | 1082 | if( $this->getUser()->isAllowed( 'suppressionlog' ) ) { |
1083 | 1083 | $out->addHTML( Xml::element( 'h2', null, LogPage::logName( 'suppress' ) ) . "\n" ); |
1084 | | - LogEventsList::showLogExtract( $out, 'suppress', $this->mTargetObj->getPrefixedText() ); |
| 1084 | + LogEventsList::showLogExtract( $out, 'suppress', $this->mTargetObj ); |
1085 | 1085 | } |
1086 | 1086 | |
1087 | 1087 | if( $this->mAllowed && ( $haveRevisions || $haveFiles ) ) { |
Index: trunk/phase3/includes/specials/SpecialRevisiondelete.php |
— | — | @@ -208,12 +208,12 @@ |
209 | 209 | # Show relevant lines from the deletion log |
210 | 210 | $output->addHTML( "<h2>" . htmlspecialchars( LogPage::logName( 'delete' ) ) . "</h2>\n" ); |
211 | 211 | LogEventsList::showLogExtract( $output, 'delete', |
212 | | - $this->targetObj->getPrefixedText(), '', array( 'lim' => 25, 'conds' => $qc ) ); |
| 212 | + $this->targetObj, '', array( 'lim' => 25, 'conds' => $qc ) ); |
213 | 213 | # Show relevant lines from the suppression log |
214 | 214 | if( $user->isAllowed( 'suppressionlog' ) ) { |
215 | 215 | $output->addHTML( "<h2>" . htmlspecialchars( LogPage::logName( 'suppress' ) ) . "</h2>\n" ); |
216 | 216 | LogEventsList::showLogExtract( $output, 'suppress', |
217 | | - $this->targetObj->getPrefixedText(), '', array( 'lim' => 25, 'conds' => $qc ) ); |
| 217 | + $this->targetObj, '', array( 'lim' => 25, 'conds' => $qc ) ); |
218 | 218 | } |
219 | 219 | } |
220 | 220 | |
Index: trunk/phase3/includes/specials/SpecialContributions.php |
— | — | @@ -228,7 +228,7 @@ |
229 | 229 | LogEventsList::showLogExtract( |
230 | 230 | $out, |
231 | 231 | 'block', |
232 | | - $nt->getPrefixedText(), |
| 232 | + $nt, |
233 | 233 | '', |
234 | 234 | array( |
235 | 235 | 'lim' => 1, |
Index: trunk/phase3/includes/specials/SpecialUpload.php |
— | — | @@ -266,7 +266,7 @@ |
267 | 267 | $delNotice = ''; // empty by default |
268 | 268 | if ( $desiredTitleObj instanceof Title && !$desiredTitleObj->exists() ) { |
269 | 269 | LogEventsList::showLogExtract( $delNotice, array( 'delete', 'move' ), |
270 | | - $desiredTitleObj->getPrefixedText(), |
| 270 | + $desiredTitleObj, |
271 | 271 | '', array( 'lim' => 10, |
272 | 272 | 'conds' => array( "log_action != 'revision'" ), |
273 | 273 | 'showIfEmpty' => false, |
Index: trunk/phase3/includes/specials/SpecialDeletedContributions.php |
— | — | @@ -422,7 +422,7 @@ |
423 | 423 | LogEventsList::showLogExtract( |
424 | 424 | $out, |
425 | 425 | 'block', |
426 | | - $nt->getPrefixedText(), |
| 426 | + $nt, |
427 | 427 | '', |
428 | 428 | array( |
429 | 429 | 'lim' => 1, |
Index: trunk/phase3/includes/specials/SpecialBlock.php |
— | — | @@ -404,7 +404,7 @@ |
405 | 405 | LogEventsList::showLogExtract( |
406 | 406 | $out, |
407 | 407 | 'block', |
408 | | - $userpage->getPrefixedText(), |
| 408 | + $userpage, |
409 | 409 | '', |
410 | 410 | array( |
411 | 411 | 'lim' => 10, |
— | — | @@ -419,7 +419,7 @@ |
420 | 420 | LogEventsList::showLogExtract( |
421 | 421 | $out, |
422 | 422 | 'suppress', |
423 | | - $userpage->getPrefixedText(), |
| 423 | + $userpage, |
424 | 424 | '', |
425 | 425 | array( |
426 | 426 | 'lim' => 10, |
Index: trunk/phase3/includes/specials/SpecialMovepage.php |
— | — | @@ -216,7 +216,7 @@ |
217 | 217 | } |
218 | 218 | $out->addHTML( "<div class='mw-warning-with-logexcerpt'>\n" ); |
219 | 219 | $out->addWikiMsg( $noticeMsg ); |
220 | | - LogEventsList::showLogExtract( $out, 'protect', $this->oldTitle->getPrefixedText(), '', array( 'lim' => 1 ) ); |
| 220 | + LogEventsList::showLogExtract( $out, 'protect', $this->oldTitle, '', array( 'lim' => 1 ) ); |
221 | 221 | $out->addHTML( "</div>\n" ); |
222 | 222 | } |
223 | 223 | |
— | — | @@ -580,7 +580,7 @@ |
581 | 581 | function showLogFragment( $title ) { |
582 | 582 | $out = $this->getOutput(); |
583 | 583 | $out->addHTML( Xml::element( 'h2', null, LogPage::logName( 'move' ) ) ); |
584 | | - LogEventsList::showLogExtract( $out, 'move', $title->getPrefixedText() ); |
| 584 | + LogEventsList::showLogExtract( $out, 'move', $title ); |
585 | 585 | } |
586 | 586 | |
587 | 587 | function showSubpages( $title ) { |
Index: trunk/phase3/includes/specials/SpecialMergeHistory.php |
— | — | @@ -236,7 +236,7 @@ |
237 | 237 | |
238 | 238 | # Show relevant lines from the deletion log: |
239 | 239 | $out->addHTML( '<h2>' . htmlspecialchars( LogPage::logName( 'merge' ) ) . "</h2>\n" ); |
240 | | - LogEventsList::showLogExtract( $out, 'merge', $this->mTargetObj->getPrefixedText() ); |
| 240 | + LogEventsList::showLogExtract( $out, 'merge', $this->mTargetObj ); |
241 | 241 | |
242 | 242 | # When we submit, go by page ID to avoid some nasty but unlikely collisions. |
243 | 243 | # Such would happen if a page was renamed after the form loaded, but before submit |