Index: trunk/extensions/Storyboard/specials/Story/Story_body.php |
— | — | @@ -25,8 +25,11 @@ |
26 | 26 | global $wgOut, $wgRequest, $wgUser; |
27 | 27 | |
28 | 28 | if ( $wgRequest->wasPosted() && $wgUser->matchEditToken( $wgRequest->getVal( 'wpEditToken' ) ) ) { |
29 | | - $this->saveStoryAndShowResult(); |
30 | | - } else if ( trim( $title ) != '' || $wgRequest->getIntOrNull( 'id' ) ) { |
| 29 | + // TODO: add permission check |
| 30 | + $this->saveStory(); |
| 31 | + } |
| 32 | + |
| 33 | + if ( trim( $title ) != '' || $wgRequest->getIntOrNull( 'id' ) ) { |
31 | 34 | $this->queryAndShowStory( $title ); |
32 | 35 | } else { |
33 | 36 | $wgOut->addWikiMsg( 'storyboard-nostorytitle' ); |
— | — | @@ -206,7 +209,7 @@ |
207 | 210 | 'id' => 'storyform', |
208 | 211 | 'name' => 'storyform', |
209 | 212 | 'method' => 'post', |
210 | | - 'action' => $this->getTitle()->getLocalURL(), |
| 213 | + 'action' => $this->getTitle()->getLocalURL() . "/$story->story_title", // TODO: can probably beter |
211 | 214 | ), |
212 | 215 | $formBody |
213 | 216 | ); |
— | — | @@ -215,11 +218,9 @@ |
216 | 219 | } |
217 | 220 | |
218 | 221 | /** |
219 | | - * Saves the story after a story edit form has been submitted and shows a result. |
220 | | - * |
221 | | - * TODO: add permission check |
| 222 | + * Saves the story after a story edit form has been submitted. |
222 | 223 | */ |
223 | | - private function saveStoryAndShowResult() { |
| 224 | + private function saveStory() { |
224 | 225 | global $wgOut, $wgRequest, $wgUser; |
225 | 226 | |
226 | 227 | $dbw = wfGetDB( DB_MASTER ); |
— | — | @@ -239,7 +240,5 @@ |
240 | 241 | 'story_id' => $wgRequest->getText( 'storyId' ), |
241 | 242 | ) |
242 | 243 | ); |
243 | | - |
244 | | - $wgOut->addHTML( '' ); // TODO: add output |
245 | 244 | } |
246 | 245 | } |
\ No newline at end of file |