Index: trunk/extensions/SignDocument/SpecialSignDocument.php |
— | — | @@ -10,9 +10,6 @@ |
11 | 11 | */ |
12 | 12 | private $mDocumentId; |
13 | 13 | |
14 | | - private $mArticle; |
15 | | - private $mTitle; |
16 | | - |
17 | 14 | private $mCurrentSig; |
18 | 15 | private $mForm; |
19 | 16 | |
— | — | @@ -254,11 +251,6 @@ |
255 | 252 | return $out; |
256 | 253 | } |
257 | 254 | |
258 | | - function loadDocument() { |
259 | | - $this->mTitle = Title::newFromId( 1 ); |
260 | | - $this->mArticle = new Article( $this->mTitle ); |
261 | | - } |
262 | | - |
263 | 255 | function dealWithPost() { |
264 | 256 | $this->doSigning(); |
265 | 257 | } |
Index: trunk/extensions/SignDocument/SignDocumentHelpers.php |
— | — | @@ -96,13 +96,13 @@ |
97 | 97 | throw new MWException( 'Something went horribly wrong. ' . |
98 | 98 | 'mTitle is null or not an object.' ); |
99 | 99 | |
| 100 | + $this->mArticle = new Article( $this->mTitle ); |
| 101 | + $this->mArticle->loadPageData(); |
| 102 | + |
100 | 103 | if ( !$this->mTitle->exists() ) |
101 | 104 | return false; |
102 | 105 | |
103 | | - $this->mArticle = new Article( $this->mTitle ); |
104 | | - $this->mArticle->loadPageData(); |
105 | | - |
106 | | - $this->mOldid = $this->mArticle->mLatest; |
| 106 | + $this->mOldid = $this->mTitle->getLatestRevID(); |
107 | 107 | $this->mPageId = $this->mTitle->getArticleID(); |
108 | 108 | |
109 | 109 | return true; |