From: Niklas Laxström Date: Wed, 2 Jul 2008 07:36:42 +0000 (+0000) Subject: * Partial revert of r36692. Has been spewing fatal errors for few days already X-Git-Tag: 1.31.0-rc.0~46812 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/journal.php?a=commitdiff_plain;h=fe145e1e6c2418589b88bd0fe0b29bcc2a749a5c;p=lhc%2Fweb%2Fwiklou.git * Partial revert of r36692. Has been spewing fatal errors for few days already --- 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; - } - } }