not set to 'mediawiki', allowing multiple mediawiki instances per user.
* (bug 11151) Add descriptive <title> to revision history page
* (bug 5412) Add feed links for the site to all pages
+* (bug 11353) Add ability to retrieve raw section content via action=raw
=== Bug fixes in 1.12 ===
*/
class RawPage {
var $mArticle, $mTitle, $mRequest;
- var $mOldId, $mGen, $mCharset;
+ var $mOldId, $mGen, $mCharset, $mSection;
var $mSmaxage, $mMaxage;
var $mContentType, $mExpandTemplates;
$this->mExpandTemplates = $this->mRequest->getVal( 'templates' ) === 'expand';
$this->mUseMessageCache = $this->mRequest->getBool( 'usemsgcache' );
+ $this->mSection = $this->mRequest->getIntOrNull( 'section' );
+
$oldid = $this->mRequest->getInt( 'oldid' );
+
switch ( $wgRequest->getText( 'direction' ) ) {
case 'next':
# output next revision, or nothing if there isn't one
if ( $rev ) {
$lastmod = wfTimestamp( TS_RFC2822, $rev->getTimestamp() );
header( "Last-modified: $lastmod" );
- $text = $rev->getText();
+
+ if ( !is_null($this->mSection) && $this->mSection != '' ) {
+ global $wgParser;
+ return $wgParser->getSection ( $rev->getText(), $this->mSection );
+ } else
+ $text = $rev->getText();
$found = true;
}
}