Index: trunk/phase3/includes/AutoLoader.php |
— | — | @@ -203,6 +203,7 @@ |
204 | 204 | 'SpecialMycontributions' => 'includes/SpecialPage.php', |
205 | 205 | 'SpecialMypage' => 'includes/SpecialPage.php', |
206 | 206 | 'SpecialMytalk' => 'includes/SpecialPage.php', |
| 207 | + 'SpecialMyuploads' => 'includes/SpecialPage.php', |
207 | 208 | 'SpecialPage' => 'includes/SpecialPage.php', |
208 | 209 | 'SpecialPageFactory' => 'includes/SpecialPageFactory.php', |
209 | 210 | 'SpecialRedirectToSpecial' => 'includes/SpecialPage.php', |
Index: trunk/phase3/includes/SpecialPage.php |
— | — | @@ -321,7 +321,10 @@ |
322 | 322 | * @param $file String: file which is included by execute(). It is also constructed from $name by default |
323 | 323 | * @param $includable Bool: whether the page can be included in normal pages |
324 | 324 | */ |
325 | | - public function __construct( $name = '', $restriction = '', $listed = true, $function = false, $file = 'default', $includable = false ) { |
| 325 | + public function __construct( |
| 326 | + $name = '', $restriction = '', $listed = true, |
| 327 | + $function = false, $file = 'default', $includable = false |
| 328 | + ) { |
326 | 329 | $this->init( $name, $restriction, $listed, $function, $file, $includable ); |
327 | 330 | } |
328 | 331 | |
— | — | @@ -569,7 +572,8 @@ |
570 | 573 | $msg = $summaryMessageKey; |
571 | 574 | } |
572 | 575 | if ( !wfMessage( $msg )->isBlank() and ! $this->including() ) { |
573 | | - $this->getOutput()->wrapWikiMsg( "<div class='mw-specialpage-summary'>\n$1\n</div>", $msg ); |
| 576 | + $this->getOutput()->wrapWikiMsg( |
| 577 | + "<div class='mw-specialpage-summary'>\n$1\n</div>", $msg ); |
574 | 578 | } |
575 | 579 | |
576 | 580 | } |
— | — | @@ -691,7 +695,8 @@ |
692 | 696 | * @see wfMessage |
693 | 697 | */ |
694 | 698 | public function msg( /* $args */ ) { |
695 | | - return call_user_func_array( 'wfMessage', func_get_args() )->title( $this->getFullTitle() ); |
| 699 | + return call_user_func_array( 'wfMessage', |
| 700 | + func_get_args() )->title( $this->getFullTitle() ); |
696 | 701 | } |
697 | 702 | |
698 | 703 | /** |
— | — | @@ -751,10 +756,12 @@ |
752 | 757 | $form = new HTMLForm( $this->fields, $this->getContext() ); |
753 | 758 | $form->setSubmitCallback( array( $this, 'onSubmit' ) ); |
754 | 759 | $form->setWrapperLegend( wfMessage( strtolower( $this->getName() ) . '-legend' ) ); |
755 | | - $form->addHeaderText( wfMessage( strtolower( $this->getName() ) . '-text' )->parseAsBlock() ); |
| 760 | + $form->addHeaderText( |
| 761 | + wfMessage( strtolower( $this->getName() ) . '-text' )->parseAsBlock() ); |
756 | 762 | |
757 | 763 | // Retain query parameters (uselang etc) |
758 | | - $params = array_diff_key( $this->getRequest()->getQueryValues(), array( 'title' => null ) ); |
| 764 | + $params = array_diff_key( |
| 765 | + $this->getRequest()->getQueryValues(), array( 'title' => null ) ); |
759 | 766 | $form->addHiddenField( 'redirectparams', wfArrayToCGI( $params ) ); |
760 | 767 | |
761 | 768 | $form->addPreText( $this->preText() ); |
— | — | @@ -868,7 +875,9 @@ |
869 | 876 | */ |
870 | 877 | class IncludableSpecialPage extends SpecialPage |
871 | 878 | { |
872 | | - function __construct( $name, $restriction = '', $listed = true, $function = false, $file = 'default' ) { |
| 879 | + function __construct( |
| 880 | + $name, $restriction = '', $listed = true, $function = false, $file = 'default' |
| 881 | + ) { |
873 | 882 | parent::__construct( $name, $restriction, $listed, $function, $file, true ); |
874 | 883 | } |
875 | 884 | |
— | — | @@ -946,10 +955,12 @@ |
947 | 956 | } |
948 | 957 | |
949 | 958 | abstract class SpecialRedirectToSpecial extends RedirectSpecialPage { |
950 | | - |
951 | 959 | var $redirName, $redirSubpage; |
952 | 960 | |
953 | | - function __construct( $name, $redirName, $redirSubpage = false, $allowedRedirectParams = array(), $addedRedirectParams = array() ) { |
| 961 | + function __construct( |
| 962 | + $name, $redirName, $redirSubpage = false, |
| 963 | + $allowedRedirectParams = array(), $addedRedirectParams = array() |
| 964 | + ) { |
954 | 965 | parent::__construct( $name ); |
955 | 966 | $this->redirName = $redirName; |
956 | 967 | $this->redirSubpage = $redirSubpage; |
— | — | @@ -1013,11 +1024,10 @@ |
1014 | 1025 | } |
1015 | 1026 | |
1016 | 1027 | function getRedirect( $subpage ) { |
1017 | | - global $wgUser; |
1018 | 1028 | if ( strval( $subpage ) !== '' ) { |
1019 | | - return Title::makeTitle( NS_USER, $wgUser->getName() . '/' . $subpage ); |
| 1029 | + return Title::makeTitle( NS_USER, $this->getUser()->getName() . '/' . $subpage ); |
1020 | 1030 | } else { |
1021 | | - return Title::makeTitle( NS_USER, $wgUser->getName() ); |
| 1031 | + return Title::makeTitle( NS_USER, $this->getUser()->getName() ); |
1022 | 1032 | } |
1023 | 1033 | } |
1024 | 1034 | } |
— | — | @@ -1034,11 +1044,10 @@ |
1035 | 1045 | } |
1036 | 1046 | |
1037 | 1047 | function getRedirect( $subpage ) { |
1038 | | - global $wgUser; |
1039 | 1048 | if ( strval( $subpage ) !== '' ) { |
1040 | | - return Title::makeTitle( NS_USER_TALK, $wgUser->getName() . '/' . $subpage ); |
| 1049 | + return Title::makeTitle( NS_USER_TALK, $this->getUser()->getName() . '/' . $subpage ); |
1041 | 1050 | } else { |
1042 | | - return Title::makeTitle( NS_USER_TALK, $wgUser->getName() ); |
| 1051 | + return Title::makeTitle( NS_USER_TALK, $this->getUser()->getName() ); |
1043 | 1052 | } |
1044 | 1053 | } |
1045 | 1054 | } |
— | — | @@ -1055,8 +1064,7 @@ |
1056 | 1065 | } |
1057 | 1066 | |
1058 | 1067 | function getRedirect( $subpage ) { |
1059 | | - global $wgUser; |
1060 | | - return SpecialPage::getTitleFor( 'Contributions', $wgUser->getName() ); |
| 1068 | + return SpecialPage::getTitleFor( 'Contributions', $this->getUser()->getName() ); |
1061 | 1069 | } |
1062 | 1070 | } |
1063 | 1071 | |
— | — | @@ -1070,8 +1078,7 @@ |
1071 | 1079 | } |
1072 | 1080 | |
1073 | 1081 | function getRedirect( $subpage ) { |
1074 | | - global $wgUser; |
1075 | | - return SpecialPage::getTitleFor( 'Listfiles', $wgUser->getName() ); |
| 1082 | + return SpecialPage::getTitleFor( 'Listfiles', $this->getUser()->getName() ); |
1076 | 1083 | } |
1077 | 1084 | } |
1078 | 1085 | |