r63934 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r63933‎ | r63934 | r63935 >
Date:21:59, 18 March 2010
Author:jeroendedauw
Status:deferred
Tags:
Comment:
Small change to Special:Story, will make follow up commit soon
Modified paths:
  • /trunk/extensions/Storyboard/specials/Story/Story_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Storyboard/specials/Story/Story_body.php
@@ -25,8 +25,11 @@
2626 global $wgOut, $wgRequest, $wgUser;
2727
2828 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' ) ) {
3134 $this->queryAndShowStory( $title );
3235 } else {
3336 $wgOut->addWikiMsg( 'storyboard-nostorytitle' );
@@ -206,7 +209,7 @@
207210 'id' => 'storyform',
208211 'name' => 'storyform',
209212 'method' => 'post',
210 - 'action' => $this->getTitle()->getLocalURL(),
 213+ 'action' => $this->getTitle()->getLocalURL() . "/$story->story_title", // TODO: can probably beter
211214 ),
212215 $formBody
213216 );
@@ -215,11 +218,9 @@
216219 }
217220
218221 /**
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.
222223 */
223 - private function saveStoryAndShowResult() {
 224+ private function saveStory() {
224225 global $wgOut, $wgRequest, $wgUser;
225226
226227 $dbw = wfGetDB( DB_MASTER );
@@ -239,7 +240,5 @@
240241 'story_id' => $wgRequest->getText( 'storyId' ),
241242 )
242243 );
243 -
244 - $wgOut->addHTML( '' ); // TODO: add output
245244 }
246245 }
\ No newline at end of file

Status & tagging log