Index: RawPage.php =================================================================== RCS file: /cvsroot/wikipedia/phase3/includes/RawPage.php,v retrieving revision 1.36 diff -u -r1.36 RawPage.php --- RawPage.php 13 Jan 2006 00:07:55 -0000 1.36 +++ RawPage.php 2 Feb 2006 14:31:28 -0000 @@ -40,7 +40,19 @@ $smaxage = $this->mRequest->getInt( 'smaxage', $wgSquidMaxage ); $maxage = $this->mRequest->getInt( 'maxage', $wgSquidMaxage ); $this->mExpandTemplates = $this->mRequest->getText( 'templates' ) === 'expand'; - $this->mOldId = $this->mRequest->getInt( 'oldid' ); + + $oldid = $this->mRequest->getInt( 'oldid' ); + $direction = $wgRequest->getVal( 'direction' ); + switch ( $direction ) { + case 'next': + $oldid = $this->mTitle->getNextRevisionId( $oldid ); break; + case 'prev': + $oldid = $this->mTitle->getPreviousRevisionId( $oldid ); break; + case 'cur': + $oldid = 0; break; + } + $this->mOldId = $oldid; + # special case for 'generated' raw things: user css/js $gen = $this->mRequest->getText( 'gen' );