Index: trunk/phase3/includes/EditPage.php |
— | — | @@ -62,7 +62,6 @@ |
63 | 63 | var $autoSumm = ''; |
64 | 64 | var $hookError = ''; |
65 | 65 | var $mPreviewTemplates; |
66 | | - var $mBaseRevision = false; |
67 | 66 | |
68 | 67 | # Form values |
69 | 68 | var $save = false, $preview = false, $diff = false; |
— | — | @@ -1723,7 +1722,8 @@ |
1724 | 1723 | $db = wfGetDB( DB_MASTER ); |
1725 | 1724 | |
1726 | 1725 | // This is the revision the editor started from |
1727 | | - $baseRevision = $this->getBaseRevision(); |
| 1726 | + $baseRevision = Revision::loadFromTimestamp( |
| 1727 | + $db, $this->mTitle, $this->edittime ); |
1728 | 1728 | if( is_null( $baseRevision ) ) { |
1729 | 1729 | wfProfileOut( $fname ); |
1730 | 1730 | return false; |
— | — | @@ -2321,15 +2321,4 @@ |
2322 | 2322 | return false; |
2323 | 2323 | } |
2324 | 2324 | } |
2325 | | - |
2326 | | - function getBaseRevision() { |
2327 | | - if ($this->mBaseRevision == false) { |
2328 | | - $db = wfGetDB( DB_MASTER ); |
2329 | | - $baseRevision = Revision::loadFromTimestamp( |
2330 | | - $db, $editor->mTitle, $editor->edittime ); |
2331 | | - return $this->mBaseRevision = $baseRevision; |
2332 | | - } else { |
2333 | | - return $this->mBaseRevision; |
2334 | | - } |
2335 | | - } |
2336 | 2325 | } |