r65490 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r65489‎ | r65490 | r65491 >
Date:20:37, 23 April 2010
Author:jeroendedauw
Status:deferred
Tags:
Comment:
* Another link fix by siebrand
* Fixed small validation issue with storysubmission tags
Modified paths:
  • /trunk/extensions/Storyboard/Storyboard.i18n.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/Storyboard.i18n.php
@@ -71,7 +71,7 @@
7272 'storyboard-needtoagree' => 'You need to agree to the publication of your story to submit it.',
7373 'storyboard-createdsucessfully' => 'Thank you for sharing your story with us!
7474 We will review it shortly.
75 -Published stories are visible at $1.',
 75+Published stories are visible [$1 here].',
7676 );
7777
7878 /** Afrikaans (Afrikaans)
Index: trunk/extensions/Storyboard/tags/Storysubmission/Storysubmission_body.php
@@ -52,6 +52,9 @@
5353 global $wgUser, $wgStyleVersion, $wgJsMimeType, $wgScriptPath, $wgStylePath;
5454 global $egStoryboardScriptPath, $egStorysubmissionWidth, $egStoryboardMaxStoryLen, $egStoryboardMinStoryLen;
5555
 56+ $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;
 58+
5659 // Loading a seperate JS file would be overkill for just these 3 lines, and be bad for performance.
5760 $parser->getOutput()->addHeadItem(
5861 <<<EOT
@@ -62,6 +65,7 @@
6366 <script type="$wgJsMimeType"> /*<![CDATA[*/
6467 addOnloadHook( function() {
6568 document.getElementById( 'storysubmission-button' ).disabled = true;
 69+ stbValidateStory( document.getElementById('storytext'), $minLen, $maxLen, 'storysubmission-charlimitinfo', 'storysubmission-button' )
6670 } );
6771 jQuery(document).ready(function() {
6872 jQuery("#storyform").validate({
@@ -79,8 +83,6 @@
8084 $fieldSize = 50;
8185
8286 $width = StoryboardUtils::getDimension( $args, 'width', $egStorysubmissionWidth );
83 - $maxLen = array_key_exists( 'maxlength', $args ) && is_int( $args['maxlength'] ) ? $args['maxlength'] : $egStoryboardMaxStoryLen;
84 - $minLen = array_key_exists( 'minlength', $args ) && is_int( $args['minlength'] ) ? $args['minlength'] : $egStoryboardMinStoryLen;
8587
8688 $formBody = "<table width='$width'>";
8789
Index: trunk/extensions/Storyboard/specials/StorySubmission/StorySubmission_body.php
@@ -63,13 +63,13 @@
6464 }
6565
6666 private function displayResult() {
67 - global $wgOut;
 67+ global $wgOut, $wgTitle;
6868
6969 $wgOut->setPageTitle( wfMsg( 'storyboard-submissioncomplete' ) );
7070
71 - $storyboardLink = ''; // TODO: create html link to the page containing stories.
 71+ $storyboardLink = $wgTitle->getFullURL(); // TODO: magically get location of the page containing stories
7272
73 - $wgOut->addWikiText( wfMsgExt( 'storyboard-createdsucessfully', 'parsemag', $storyboardLink ) );
 73+ $wgOut->addWikiMsg( 'storyboard-createdsucessfully', $storyboardLink );
7474 }
7575
7676 }
\ No newline at end of file

Status & tagging log