This will ensure they work even if the objects were fetched in a way that didn't initialize $this->mTitle... unless they aren't fully saved in the DB, in which case they'll still fail with a fatal error.
* @return Revision
*/
public function getPrevious() {
- $prev = $this->mTitle->getPreviousRevisionID( $this->mId );
+ $prev = $this->getTitle()->getPreviousRevisionID( $this->mId );
if( $prev ) {
return Revision::newFromTitle( $this->mTitle, $prev );
} else {
* @return Revision
*/
public function getNext() {
- $next = $this->mTitle->getNextRevisionID( $this->mId );
+ $next = $this->getTitle()->getNextRevisionID( $this->mId );
if ( $next ) {
return Revision::newFromTitle( $this->mTitle, $next );
} else {