r65656 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r65655‎ | r65656 | r65657 >
Date:16:49, 29 April 2010
Author:jeroendedauw
Status:deferred
Tags:
Comment:
Removed whitespace
Modified paths:
  • /trunk/extensions/Storyboard/api/ApiStoryExists.php (modified) (history)
  • /trunk/extensions/Storyboard/specials/Story/Story_body.php (modified) (history)
  • /trunk/extensions/Storyboard/specials/StoryReview/StoryReview_body.php (modified) (history)
  • /trunk/extensions/Storyboard/specials/StorySubmission/StorySubmission_body.php (modified) (history)
  • /trunk/extensions/Storyboard/tags/Storysubmission/Storysubmission_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Storyboard/tags/Storysubmission/Storysubmission_body.php
@@ -53,7 +53,7 @@
5454 global $egStoryboardScriptPath, $egStorysubmissionWidth, $egStoryboardMaxStoryLen, $egStoryboardMinStoryLen;
5555
5656 $maxLen = array_key_exists( 'maxlength', $args ) && is_int( $args['maxlength'] ) ? $args['maxlength'] : $egStoryboardMaxStoryLen;
57 - $minLen = array_key_exists( 'minlength', $args ) && is_int( $args['minlength'] ) ? $args['minlength'] : $egStoryboardMinStoryLen;
 57+ $minLen = array_key_exists( 'minlength', $args ) && is_int( $args['minlength'] ) ? $args['minlength'] : $egStoryboardMinStoryLen;
5858
5959 // Loading a seperate JS file would be overkill for just these 3 lines, and be bad for performance.
6060 $parser->getOutput()->addHeadItem(
@@ -165,7 +165,7 @@
166166 'maxlength' => 255,
167167 'minlength' => 2,
168168 'remote' => "$wgScriptPath/api.php?format=json&action=storyexists"
169 - )
 169+ )
170170 ) . '</td></tr>';
171171
172172 $formBody .= '<tr><td colspan="2">' .
Index: trunk/extensions/Storyboard/specials/Story/Story_body.php
@@ -118,7 +118,7 @@
119119
120120 if ( $wgUser->isAllowed( 'storyreview' ) ) {
121121 global $wgTitle;
122 - $wgOut->addWikiMsg(
 122+ $wgOut->addWikiMsg(
123123 'storyboard-canedit',
124124 $wgTitle->getFullURL( array( 'action' => 'edit' ) )
125125 );
Index: trunk/extensions/Storyboard/specials/StoryReview/StoryReview_body.php
@@ -56,7 +56,7 @@
5757
5858 $unpublished = htmlspecialchars( wfMsg( 'storyboard-unpublished' ) );
5959 $published = htmlspecialchars( wfMsg( 'storyboard-published' ) );
60 - $hidden = htmlspecialchars( wfMsg( 'storyboard-hidden' ) );
 60+ $hidden = htmlspecialchars( wfMsg( 'storyboard-hidden' ) );
6161
6262 $html = $this->getTabHtml( $dbr, Storyboard_STORY_UNPUBLISHED, $unpublished );
6363 $html .= $this->getTabHtml( $dbr, Storyboard_STORY_PUBLISHED, $published );
@@ -156,11 +156,11 @@
157157
158158 if ( $storyState != Storyboard_STORY_UNPUBLISHED ) {
159159 $buttons[] = $this->getStateActionButton( $story->story_id, 'unpublish', 'storyboard-unpublish' );
160 - }
 160+ }
161161
162162 if ( $storyState != Storyboard_STORY_HIDDEN ) {
163163 $buttons[] = $this->getStateActionButton( $story->story_id, 'hide', 'storyboard-hide' );
164 - }
 164+ }
165165
166166 $buttons[] = <<<EOT
167167 <button type="button" onclick="window.location='$editUrl'">$editMsg</button>
Index: trunk/extensions/Storyboard/specials/StorySubmission/StorySubmission_body.php
@@ -22,10 +22,10 @@
2323 public function execute( $title ) {
2424 global $wgOut, $wgRequest, $wgUser;
2525
26 - if ( $wgRequest->wasPosted() &&
 26+ if ( $wgRequest->wasPosted() &&
2727 ( $wgUser->matchEditToken( $wgRequest->getVal( 'wpStoryEditToken' ) ) || !$wgUser->isLoggedIn() )
2828 ) {
29 - $title = $wgRequest->getText( 'storytitle' );
 29+ $title = $wgRequest->getText( 'storytitle' );
3030
3131 // This might happen when the user has javascript disabled, or something in the client side validation breaks down.
3232 $exists = ApiStoryExists::StoryExists( array( 'storytitle' => $title ) );
@@ -64,11 +64,11 @@
6565 // If the user is logged in, also store his user id.
6666 if ( $wgUser->isLoggedIn() ) {
6767 $story[ 'story_author_id' ] = $wgUser->getId();
68 - }
 68+ }
6969
7070 // TODO: email confirmation would be nice
7171
72 - $dbw->insert( 'storyboard', $story );
 72+ $dbw->insert( 'storyboard', $story );
7373 }
7474
7575 private function displayResult( $wasSaved, $title ) {
@@ -78,7 +78,7 @@
7979 $wgOut->setPageTitle( wfMsg( 'storyboard-submissioncomplete' ) );
8080
8181 // TODO: magically get location of the page containing stories
82 - $wgOut->addWikiMsg( 'storyboard-createdsucessfully', $wgTitle->getFullURL() );
 82+ $wgOut->addWikiMsg( 'storyboard-createdsucessfully', $wgTitle->getFullURL() );
8383 } else {
8484 $wgOut->setPageTitle( wfMsg( 'storyboard-submissionincomplete' ) );
8585
@@ -86,7 +86,7 @@
8787
8888 // Let's not give a null link to people with no JS.
8989 // TODO: change this to the last page somehow
90 - $fallBackUrl = Title::newMainPage()->getFullURL();
 90+ $fallBackUrl = Title::newMainPage()->getFullURL();
9191 $wgOut->addHtml( "<a href='$fallBackUrl' onclick='history.go(-1); return false;'>" . wfMsg( 'storyboard-changetitle' ) . '</a>' );
9292 }
9393 }
Index: trunk/extensions/Storyboard/api/ApiStoryExists.php
@@ -56,8 +56,8 @@
5757 // If there is a way of doing this via the API, this should oviously be changed.
5858 die( $exists ? 'false' : 'true' );
5959
60 - //$this->getResult()->setIndexedTagName( $result, 'story' );
61 - //$this->getResult()->addValue( null, $this->getModuleName(), $result );
 60+ // $this->getResult()->setIndexedTagName( $result, 'story' );
 61+ // $this->getResult()->addValue( null, $this->getModuleName(), $result );
6262 }
6363
6464 public static function StoryExists( array $params ) {
@@ -87,7 +87,7 @@
8888 ),
8989 'currentid' => array(
9090 ApiBase :: PARAM_TYPE => 'integer',
91 - ),
 91+ ),
9292 );
9393 }
9494

Status & tagging log