Index: trunk/phase3/includes/specials/SpecialContributions.php |
— | — | @@ -115,6 +115,41 @@ |
116 | 116 | $this->opts['month'] = $wgRequest->getIntOrNull( 'month' ); |
117 | 117 | } |
118 | 118 | |
| 119 | + $feedType = $wgRequest->getVal( 'feed' ); |
| 120 | + if( $feedType ) { |
| 121 | + $apiParams = array( |
| 122 | + 'action' => 'feedcontributions', |
| 123 | + 'feedformat' => $feedType, |
| 124 | + 'user' => $target, |
| 125 | + ); |
| 126 | + if ( $this->opts['topOnly'] ) { |
| 127 | + $apiParams['toponly'] = true; |
| 128 | + } |
| 129 | + if ( $this->opts['showSizeDiff'] ) { |
| 130 | + $apiParams['showsizediff'] = true; |
| 131 | + } |
| 132 | + if ( $this->opts['deletedonly'] ) { |
| 133 | + $apiParams['deletedonly'] = true; |
| 134 | + } |
| 135 | + if ( $this->opts['tagFilter'] !== '' ) { |
| 136 | + $apiParams['tagfilter'] = $this->opts['tagFilter']; |
| 137 | + } |
| 138 | + if ( $this->opts['namespace'] !== '' ) { |
| 139 | + $apiParams['namespace'] = $this->opts['namespace']; |
| 140 | + } |
| 141 | + if ( $this->opts['year'] !== null ) { |
| 142 | + $apiParams['year'] = $this->opts['year']; |
| 143 | + } |
| 144 | + if ( $this->opts['month'] !== null ) { |
| 145 | + $apiParams['month'] = $this->opts['month']; |
| 146 | + } |
| 147 | + |
| 148 | + $url = wfScript( 'api' ) . '?' . wfArrayToCGI( $apiParams ); |
| 149 | + |
| 150 | + $wgOut->redirect( $url, '301' ); |
| 151 | + return; |
| 152 | + } |
| 153 | + |
119 | 154 | // Add RSS/atom links |
120 | 155 | $this->addFeedLinks( array( 'action' => 'feedcontributions', 'user' => $wgUser->getName() ) ); |
121 | 156 | |