From fe145e1e6c2418589b88bd0fe0b29bcc2a749a5c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Niklas=20Laxstr=C3=B6m?= Date: Wed, 2 Jul 2008 07:36:42 +0000 Subject: [PATCH] * Partial revert of r36692. Has been spewing fatal errors for few days already --- includes/EditPage.php | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/includes/EditPage.php b/includes/EditPage.php index c898b9a272..e861b4b6f3 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -62,7 +62,6 @@ class EditPage { var $autoSumm = ''; var $hookError = ''; var $mPreviewTemplates; - var $mBaseRevision = false; # Form values var $save = false, $preview = false, $diff = false; @@ -1723,7 +1722,8 @@ END $db = wfGetDB( DB_MASTER ); // This is the revision the editor started from - $baseRevision = $this->getBaseRevision(); + $baseRevision = Revision::loadFromTimestamp( + $db, $this->mTitle, $this->edittime ); if( is_null( $baseRevision ) ) { wfProfileOut( $fname ); return false; @@ -2321,15 +2321,4 @@ END return false; } } - - function getBaseRevision() { - if ($this->mBaseRevision == false) { - $db = wfGetDB( DB_MASTER ); - $baseRevision = Revision::loadFromTimestamp( - $db, $editor->mTitle, $editor->edittime ); - return $this->mBaseRevision = $baseRevision; - } else { - return $this->mBaseRevision; - } - } } -- 2.20.1