r64795 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r64794‎ | r64795 | r64796 >
Date:12:48, 9 April 2010
Author:jeroendedauw
Status:deferred
Tags:
Comment:
Changed contact to email field as per Eriks request
Modified paths:
  • /trunk/extensions/Storyboard/Storyboard.i18n.php (modified) (history)
  • /trunk/extensions/Storyboard/specials/Story/Story_body.php (modified) (history)
  • /trunk/extensions/Storyboard/specials/StorySubmission/StorySubmission_body.php (modified) (history)
  • /trunk/extensions/Storyboard/storyboard.sql (modified) (history)
  • /trunk/extensions/Storyboard/tags/Storysubmission/Storysubmission_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Storyboard/storyboard.sql
@@ -8,7 +8,7 @@
99 story_author_location VARCHAR(255) NOT NULL,
1010 story_author_occupation VARCHAR(255) NOT NULL,
1111 story_author_image VARCHAR(255) NULL, -- TODO: find out if this is an acceptible way to refer to an image
12 - story_author_contact VARCHAR(255) NOT NULL, -- TODO: confirm with erik this is a mandatory field
 12+ story_author_email VARCHAR(255) NOT NULL,
1313 story_hit_count INT(8) unsigned NOT NULL default '0',
1414 story_title VARCHAR(255) NOT NULL,
1515 story_text MEDIUMBLOB NOT NULL,
Index: trunk/extensions/Storyboard/Storyboard.i18n.php
@@ -35,7 +35,7 @@
3636 'storyboard-authorname' => 'Author name',
3737 'storyboard-authorlocation' => 'Author location',
3838 'storyboard-authoroccupation' => 'Author occupation',
39 - 'storyboard-authorcontact' => 'Author contact information',
 39+ 'storyboard-authoremail' => 'Author email address',
4040 'storyboard-thestory' => 'The story',
4141
4242 // Special:StorySubmission
@@ -56,7 +56,7 @@
5757 'storyboard-occupation' => 'Your occupation',
5858 'storyboard-story' => 'Your story',
5959 'storyboard-photo' => 'Have a photo of yourself? Why not share it?',
60 - 'storyboard-contact' => 'Your E-mail address or telephone number',
 60+ 'storyboard-email' => 'Your E-mail address',
6161 'storyboard-storytitle' => 'A short, descriptive title',
6262 'storyboard-agreement' => 'I agree with the publication and use of this story under the terms of the [http://creativecommons.org/licenses/by-sa/3.0/ Creative Commons Attribution/Share-Alike License].',
6363 'storyboard-charsleft' => '($1 {{PLURAL:$1|character|characters}} left)',
Index: trunk/extensions/Storyboard/tags/Storysubmission/Storysubmission_body.php
@@ -75,9 +75,13 @@
7676 $formBody = "<table width='$width'>";
7777
7878 $defaultName = '';
 79+ $defaultEmail = '';
 80+
7981 if ( $wgUser->isLoggedIn() ) {
8082 $defaultName = $wgUser->getRealName() !== '' ? $wgUser->getRealName() : $wgUser->getName();
 83+ $defaultEmail = $wgUser->getEmail();
8184 }
 85+
8286 $formBody .= '<tr>' .
8387 Html::element( 'td', array( 'width' => '100%' ), wfMsg( 'storyboard-yourname' ) ) .
8488 '<td>' .
@@ -95,8 +99,8 @@
96100 ) . '</td></tr>';
97101
98102 $formBody .= '<tr>' .
99 - Html::element( 'td', array( 'width' => '100%' ), wfMsg( 'storyboard-contact' ) ) .
100 - '<td>' . Html::input( 'contact', '', 'text', array( 'size' => $fieldSize )
 103+ Html::element( 'td', array( 'width' => '100%' ), wfMsg( 'storyboard-email' ) ) .
 104+ '<td>' . Html::input( 'email', $defaultEmail, 'text', array( 'size' => $fieldSize )
101105 ) . '</td></tr>';
102106
103107 $formBody .= '<tr>' .
Index: trunk/extensions/Storyboard/specials/Story/Story_body.php
@@ -85,7 +85,7 @@
8686 'story_author_name',
8787 'story_author_location',
8888 'story_author_occupation',
89 - 'story_author_contact',
 89+ 'story_author_email',
9090 'story_author_image',
9191 'story_image_hidden',
9292 'story_title',
@@ -254,9 +254,9 @@
255255 ) . '</td></tr>';
256256
257257 $formBody .= '<tr>' .
258 - Html::element( 'td', array( 'width' => '100%' ), wfMsg( 'storyboard-authorcontact' ) ) .
 258+ Html::element( 'td', array( 'width' => '100%' ), wfMsg( 'storyboard-authoremail' ) ) .
259259 '<td>' . Html::input(
260 - 'contact',
 260+ 'email',
261261 $story->story_author_contact,
262262 'text',
263263 array(
@@ -388,7 +388,7 @@
389389 'story_author_name' => $wgRequest->getText( 'name' ),
390390 'story_author_location' => $wgRequest->getText( 'location' ),
391391 'story_author_occupation' => $wgRequest->getText( 'occupation' ),
392 - 'story_author_contact' => $wgRequest->getText( 'contact' ),
 392+ 'story_author_email' => $wgRequest->getText( 'email' ),
393393 'story_title' => $wgRequest->getText( 'storytitle' ),
394394 'story_text' => $wgRequest->getText( 'storytext' ),
395395 'story_modified' => $dbw->timestamp( time() ),
Index: trunk/extensions/Storyboard/specials/StorySubmission/StorySubmission_body.php
@@ -45,7 +45,7 @@
4646 'story_author_name' => $wgRequest->getText( 'name' ),
4747 'story_author_location' => $wgRequest->getText( 'location' ),
4848 'story_author_occupation' => $wgRequest->getText( 'occupation' ),
49 - 'story_author_contact' => $wgRequest->getText( 'contact' ),
 49+ 'story_author_email' => $wgRequest->getText( 'email' ),
5050 'story_title' => $title,
5151 'story_text' => $wgRequest->getText( 'storytext' ),
5252 'story_created' => $dbw->timestamp( time() ),

Follow-up revisions

RevisionCommit summaryAuthorDate
r64807Follow up to r64795jeroendedauw17:04, 9 April 2010

Status & tagging log