Index: trunk/phase3/includes/RawPage.php |
— | — | @@ -15,7 +15,7 @@ |
16 | 16 | */ |
17 | 17 | class RawPage { |
18 | 18 | var $mArticle, $mTitle, $mRequest; |
19 | | - var $mOldId, $mGen, $mCharset; |
| 19 | + var $mOldId, $mGen, $mCharset, $mSection; |
20 | 20 | var $mSmaxage, $mMaxage; |
21 | 21 | var $mContentType, $mExpandTemplates; |
22 | 22 | |
— | — | @@ -38,7 +38,10 @@ |
39 | 39 | $this->mExpandTemplates = $this->mRequest->getVal( 'templates' ) === 'expand'; |
40 | 40 | $this->mUseMessageCache = $this->mRequest->getBool( 'usemsgcache' ); |
41 | 41 | |
| 42 | + $this->mSection = $this->mRequest->getIntOrNull( 'section' ); |
| 43 | + |
42 | 44 | $oldid = $this->mRequest->getInt( 'oldid' ); |
| 45 | + |
43 | 46 | switch ( $wgRequest->getText( 'direction' ) ) { |
44 | 47 | case 'next': |
45 | 48 | # output next revision, or nothing if there isn't one |
— | — | @@ -177,7 +180,12 @@ |
178 | 181 | if ( $rev ) { |
179 | 182 | $lastmod = wfTimestamp( TS_RFC2822, $rev->getTimestamp() ); |
180 | 183 | header( "Last-modified: $lastmod" ); |
181 | | - $text = $rev->getText(); |
| 184 | + |
| 185 | + if ( !is_null($this->mSection) && $this->mSection != '' ) { |
| 186 | + global $wgParser; |
| 187 | + return $wgParser->getSection ( $rev->getText(), $this->mSection ); |
| 188 | + } else |
| 189 | + $text = $rev->getText(); |
182 | 190 | $found = true; |
183 | 191 | } |
184 | 192 | } |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -28,6 +28,7 @@ |
29 | 29 | not set to 'mediawiki', allowing multiple mediawiki instances per user. |
30 | 30 | * (bug 11151) Add descriptive <title> to revision history page |
31 | 31 | * (bug 5412) Add feed links for the site to all pages |
| 32 | +* (bug 11353) Add ability to retrieve raw section content via action=raw |
32 | 33 | |
33 | 34 | === Bug fixes in 1.12 === |
34 | 35 | |