r77122 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r77121‎ | r77122 | r77123 >
Date:23:55, 22 November 2010
Author:krinkle
Status:ok
Tags:
Comment:
whitespace commit (removing trailing space)
Modified paths:
  • /trunk/phase3/config/Installer.php (modified) (history)
  • /trunk/phase3/includes/installer/WebInstaller.php (modified) (history)
  • /trunk/phase3/resources/Resources.php (modified) (history)
  • /trunk/phase3/resources/jquery/jquery.placeholder.js (modified) (history)
  • /trunk/phase3/resources/mediawiki.language/mediawiki.language.js (modified) (history)
  • /trunk/phase3/resources/mediawiki.util/mediawiki.util.js (modified) (history)
  • /trunk/phase3/resources/startup.js (modified) (history)
  • /trunk/phase3/skins/common/config.css (modified) (history)

Diff [purge]

Index: trunk/phase3/skins/common/config.css
@@ -9,7 +9,7 @@
1010 .config-block {
1111 margin-top: 2em;
1212 display: block;
13 -
 13+
1414 }
1515 .config-block-label {
1616 display: block;
@@ -142,7 +142,7 @@
143143 .config-cc-wrapper {
144144 clear: left;
145145 /* If you change this height, also change it in WebInstaller_Options::submitCC() */
146 - height: 54em;
 146+ height: 54em;
147147 }
148148
149149 .config-plainlink a {
Index: trunk/phase3/includes/installer/WebInstaller.php
@@ -118,7 +118,7 @@
119119 $this->exportVars();
120120 $this->setupLanguage();
121121
122 - if( ( $this->getVar( '_InstallDone' ) || $this->getVar( '_UpgradeDone' ) )
 122+ if( ( $this->getVar( '_InstallDone' ) || $this->getVar( '_UpgradeDone' ) )
123123 && $this->request->getVal( 'localsettings' ) )
124124 {
125125 $this->request->response()->header( 'Content-type: text/plain' );
@@ -620,7 +620,7 @@
621621 " title=\"" . $html . "\"\n" .
622622 " original-title=\"" . $html . "\"></span>\n";
623623 }
624 -
 624+
625625 /**
626626 * Output a help box.
627627 */
@@ -687,7 +687,7 @@
688688 " </div>\n" .
689689 "</div>\n";
690690 }
691 -
 691+
692692 /**
693693 * Get a labelled text box to configure a variable.
694694 *
@@ -732,7 +732,7 @@
733733 $params['help']
734734 );
735735 }
736 -
 736+
737737 /**
738738 * Get a labelled password box to configure a variable.
739739 *
Index: trunk/phase3/config/Installer.php
@@ -1685,14 +1685,14 @@
16861686 </div>
16871687 </fieldset>
16881688
1689 -
 1689+
16901690 <?php database_switcher($ourdb, 'mssql' ); ?>
16911691 <div class="config-desc">
16921692 <p>No MS SQL Server specific options at this time.</p>
16931693 </div>
16941694 </fieldset>
1695 -
1696 -
 1695+
 1696+
16971697 <?php database_switcher($ourdb, 'ibm_db2'); ?>
16981698 <div class="config-input"><?php
16991699 aField( $conf, "DBport_db2", "Database port:" );
Index: trunk/phase3/resources/jquery/jquery.placeholder.js
@@ -1,8 +1,8 @@
22 /**
33 * HTML5 placeholder emulation for jQuery plugin
4 - *
 4+ *
55 * This will automatically use the HTML5 placeholder attribute if supported, or emulate this behavior if not.
6 - *
 6+ *
77 * @author Trevor Parscal <tparscal@wikimedia.org>
88 * @author Krinkle <krinklemail@gmail.com>
99 * @version 0.2.0
Index: trunk/phase3/resources/mediawiki.util/mediawiki.util.js
@@ -27,17 +27,17 @@
2828 // Chrome on any platform
2929 } else if ( profile.name == 'chrome' ) {
3030 // Chrome on Mac or Chrome on other platform ?
31 - mw.util.tooltipAccessKeyPrefix = ( profile.platform == 'mac'
 31+ mw.util.tooltipAccessKeyPrefix = ( profile.platform == 'mac'
3232 ? 'ctrl-option-' : 'alt-' );
3333
3434 // Non-Windows Safari with webkit_version > 526
35 - } else if ( profile.platform !== 'win'
36 - && profile.name == 'safari'
37 - && profile.layoutVersion > 526 )
 35+ } else if ( profile.platform !== 'win'
 36+ && profile.name == 'safari'
 37+ && profile.layoutVersion > 526 )
3838 {
3939 mw.util.tooltipAccessKeyPrefix = 'ctrl-alt-';
4040
41 - // Safari/Konqueror on any platform, or any browser on Mac
 41+ // Safari/Konqueror on any platform, or any browser on Mac
4242 // (but not Safari on Windows)
4343 } else if ( !( profile.platform == 'win' && profile.name == 'safari' )
4444 && ( profile.name == 'safari'
@@ -128,16 +128,16 @@
129129 },
130130
131131 /**
132 - * Check is a variable is empty. Supports strings, booleans, arrays and
133 - * objects. The string "0" is considered empty. A string containing only
 132+ * Check is a variable is empty. Supports strings, booleans, arrays and
 133+ * objects. The string "0" is considered empty. A string containing only
134134 * whitespace (ie. " ") is considered not empty.
135135 *
136136 * @param v The variable to check for emptyness
137137 */
138138 'isEmpty' : function( v ) {
139139 var key;
140 - if ( v === "" || v === 0 || v === "0" || v === null
141 - || v === false || typeof v === 'undefined' )
 140+ if ( v === "" || v === 0 || v === "0" || v === null
 141+ || v === false || typeof v === 'undefined' )
142142 {
143143 return true;
144144 }
@@ -164,7 +164,7 @@
165165 'getParamValue' : function( param, url ) {
166166 url = url ? url : document.location.href;
167167 // Get last match, stop at hash
168 - var re = new RegExp( '[^#]*[&?]' + $.escapeRE( param ) + '=([^&#]*)' );
 168+ var re = new RegExp( '[^#]*[&?]' + $.escapeRE( param ) + '=([^&#]*)' );
169169 var m = re.exec( url );
170170 if ( m && m.length > 1 ) {
171171 return decodeURIComponent( m[1] );
@@ -173,7 +173,7 @@
174174 },
175175
176176 // Access key prefix.
177 - // Will be re-defined based on browser/operating system detection in
 177+ // Will be re-defined based on browser/operating system detection in
178178 // mw.util.init().
179179 'tooltipAccessKeyPrefix' : 'alt-',
180180
@@ -195,9 +195,9 @@
196196 } else if ( nodeList ) {
197197 $nodes = $(nodeList);
198198 } else {
199 - // Rather than scanning all links, just the elements that
 199+ // Rather than scanning all links, just the elements that
200200 // contain the relevant links
201 - this.updateTooltipAccessKeys(
 201+ this.updateTooltipAccessKeys(
202202 $('#column-one a, #mw-head a, #mw-panel a, #p-logo a') );
203203
204204 // these are rare enough that no such optimization is needed
@@ -209,7 +209,7 @@
210210 $nodes.each( function ( i ) {
211211 var tip = $(this).attr( 'title' );
212212 if ( !!tip && mw.util.tooltipAccessKeyRegexp.exec( tip ) ) {
213 - tip = tip.replace( mw.util.tooltipAccessKeyRegexp,
 213+ tip = tip.replace( mw.util.tooltipAccessKeyRegexp,
214214 '[' + mw.util.tooltipAccessKeyPrefix + "$5]" );
215215 $(this).attr( 'title', tip );
216216 }
@@ -223,37 +223,37 @@
224224 /**
225225 * Add a link to a portlet menu on the page, such as:
226226 *
227 - * p-cactions (Content actions), p-personal (Personal tools),
 227+ * p-cactions (Content actions), p-personal (Personal tools),
228228 * p-navigation (Navigation), p-tb (Toolbox)
229229 *
230230 * The first three paramters are required, others are optionals. Though
231231 * providing an id and tooltip is recommended.
232232 *
233 - * By default the new link will be added to the end of the list. To
234 - * add the link before a given existing item, pass the DOM node
235 - * (document.getElementById('foobar')) or the jQuery-selector
 233+ * By default the new link will be added to the end of the list. To
 234+ * add the link before a given existing item, pass the DOM node
 235+ * (document.getElementById('foobar')) or the jQuery-selector
236236 * ('#foobar') of that item.
237237 *
238238 * @example mw.util.addPortletLink(
239 - * 'p-tb', 'http://mediawiki.org/',
 239+ * 'p-tb', 'http://mediawiki.org/',
240240 * 'MediaWiki.org', 't-mworg', 'Go to MediaWiki.org ', 'm', '#t-print'
241241 * )
242242 *
243243 * @param portlet ID of the target portlet ('p-cactions' or 'p-personal' etc.)
244244 * @param href Link URL
245 - * @param text Link text (will be automatically converted to lower
 245+ * @param text Link text (will be automatically converted to lower
246246 * case by CSS for p-cactions in Monobook)
247 - * @param id ID of the new item, should be unique and preferably have
 247+ * @param id ID of the new item, should be unique and preferably have
248248 * the appropriate prefix ('ca-', 'pt-', 'n-' or 't-')
249249 * @param tooltip Text to show when hovering over the link, without accesskey suffix
250 - * @param accesskey Access key to activate this link (one character, try
251 - * to avoid conflicts. Use $('[accesskey=x').get() in the console to
 250+ * @param accesskey Access key to activate this link (one character, try
 251+ * to avoid conflicts. Use $('[accesskey=x').get() in the console to
252252 * see if 'x' is already used.
253 - * @param nextnode DOM node or jQuery-selector of the item that the new
254 - * item should be added before, should be another item in the same
 253+ * @param nextnode DOM node or jQuery-selector of the item that the new
 254+ * item should be added before, should be another item in the same
255255 * list will be ignored if not the so
256256 *
257 - * @return The DOM node of the new item (a LI element, or A element for
 257+ * @return The DOM node of the new item (a LI element, or A element for
258258 * older skins) or null.
259259 */
260260 'addPortletLink' : function( portlet, href, text, id, tooltip, accesskey, nextnode ) {
@@ -291,7 +291,7 @@
292292 if ($portlet.find( 'div' ).length === 0) {
293293 $portlet.append( '<ul/>' );
294294 } else {
295 - // otherwise if there's a div (such as div.body or div.pBody)
 295+ // otherwise if there's a div (such as div.body or div.pBody)
296296 // append the <ul> to last (most likely only) div
297297 $portlet.find( 'div' ).eq( -1 ).append( '<ul/>' );
298298 }
@@ -329,7 +329,7 @@
330330 if ( nextnode && nextnode.parentNode == $ul.get( 0 ) ) {
331331 $(nextnode).before( $item );
332332 } else {
333 - // If the jQuery selector isn't found within the <ul>, just
 333+ // If the jQuery selector isn't found within the <ul>, just
334334 // append it at the end
335335 if ( $ul.find( nextnode ).length === 0 ) {
336336 $ul.append( $item );
Index: trunk/phase3/resources/Resources.php
@@ -3,15 +3,15 @@
44 return array(
55
66 /* Special resources who have their own classes */
7 -
 7+
88 'site' => array( 'class' => 'ResourceLoaderSiteModule' ),
99 'startup' => array( 'class' => 'ResourceLoaderStartUpModule' ),
1010 'user' => array( 'class' => 'ResourceLoaderUserModule' ),
1111 'user.options' => array( 'class' => 'ResourceLoaderUserOptionsModule' ),
12 -
 12+
1313 /* Skins */
14 -
15 - 'skins.vector' => array(
 14+
 15+ 'skins.vector' => array(
1616 'styles' => array( 'skins/vector/screen.css' => array( 'media' => 'screen' ) )
1717 ),
1818 'skins.monobook' => array(
@@ -21,20 +21,20 @@
2222 //$GLOBALS['wgHandheldStyle'] => array( 'media' => 'handheld' )
2323 )
2424 ),
25 -
 25+
2626 /* jQuery */
27 -
 27+
2828 'jquery' => array(
29 - 'scripts' => 'resources/jquery/jquery.js',
 29+ 'scripts' => 'resources/jquery/jquery.js',
3030 'debugRaw' => false
3131 ),
32 -
 32+
3333 /* jQuery Plugins */
34 -
35 - 'jquery.async' => array(
 34+
 35+ 'jquery.async' => array(
3636 'scripts' => 'resources/jquery/jquery.async.js'
3737 ),
38 - 'jquery.autoEllipsis' => array(
 38+ 'jquery.autoEllipsis' => array(
3939 'scripts' => 'resources/jquery/jquery.autoEllipsis.js'
4040 ),
4141 'jquery.checkboxShiftClick' => array(
@@ -78,9 +78,9 @@
7979 'scripts' => 'resources/jquery.tipsy/jquery.tipsy.js',
8080 'styles' => 'resources/jquery.tipsy/jquery.tipsy.css',
8181 ),
82 -
 82+
8383 /* jQuery UI */
84 -
 84+
8585 // Core
8686 'jquery.ui.core' => array(
8787 'scripts' => 'resources/jquery.ui/jquery.ui.core.js',
@@ -113,8 +113,8 @@
114114 ),
115115 'jquery.ui.droppable' => array(
116116 'scripts' => 'resources/jquery.ui/jquery.ui.droppable.js',
117 - 'dependencies' => array(
118 - 'jquery.ui.core', 'jquery.ui.mouse', 'jquery.ui.widget', 'jquery.ui.draggable'
 117+ 'dependencies' => array(
 118+ 'jquery.ui.core', 'jquery.ui.mouse', 'jquery.ui.widget', 'jquery.ui.draggable'
119119 ),
120120 ),
121121 'jquery.ui.resizable' => array(
@@ -317,9 +317,9 @@
318318 'scripts' => 'resources/jquery.effects/jquery.effects.transfer.js',
319319 'dependencies' => 'jquery.effects.core',
320320 ),
321 -
 321+
322322 /* MediaWiki */
323 -
 323+
324324 'mediawiki' => array(
325325 'scripts' => 'resources/mediawiki/mediawiki.js',
326326 'debugScripts' => 'resources/mediawiki/mediawiki.log.js',
@@ -394,14 +394,14 @@
395395 'wa' => 'resources/mediawiki.language/languages/wa.js',
396396 ),
397397 ),
398 -
 398+
399399 /* mediawiki Legacy */
400 -
 400+
401401 'mediawiki.legacy.ajax' => array(
402402 'scripts' => 'skins/common/ajax.js',
403 - 'messages' => array(
404 - 'watch', 'unwatch', 'watching', 'unwatching', 'tooltip-ca-watch',
405 - 'tooltip-ca-unwatch'
 403+ 'messages' => array(
 404+ 'watch', 'unwatch', 'watching', 'unwatching', 'tooltip-ca-watch',
 405+ 'tooltip-ca-unwatch'
406406 ),
407407 'dependencies' => 'mediawiki.legacy.wikibits',
408408 ),
Index: trunk/phase3/resources/mediawiki.language/mediawiki.language.js
@@ -26,7 +26,7 @@
2727 }
2828 // Restore the count into a Number ( if it got converted earlier )
2929 var count = mediaWiki.language.convertNumber( template.title, true );
30 - // Do convertPlural call
 30+ // Do convertPlural call
3131 return mediaWiki.language.convertPlural( parseInt( count ), template.parameters );
3232 }
3333 // Could not process plural return first form or nothing
Index: trunk/phase3/resources/startup.js
@@ -1,14 +1,14 @@
22 /**
3 - * This script provides a function which is run to evaluate whether or not to
4 - * continue loading the jquery and mediawiki modules. This code should work on
 3+ * This script provides a function which is run to evaluate whether or not to
 4+ * continue loading the jquery and mediawiki modules. This code should work on
55 * even the most ancient of browsers, so be very careful when editing.
66 */
77 /**
88 * Returns false when run in a black-listed browser
9 - *
10 - * This function will be deleted after it's used, so do not expand it to be
 9+ *
 10+ * This function will be deleted after it's used, so do not expand it to be
1111 * generally useful beyond startup
12 - *
 12+ *
1313 * jQuery has minimum requirements of:
1414 * * Firefox 2.0+
1515 * * Internet Explorer 6+
@@ -18,7 +18,7 @@
1919 */
2020 var isCompatible = function() {
2121 // IE < 6
22 - if ( navigator.appVersion.indexOf( 'MSIE' ) !== -1
 22+ if ( navigator.appVersion.indexOf( 'MSIE' ) !== -1
2323 && parseFloat( navigator.appVersion.split( 'MSIE' )[1] ) < 6 )
2424 {
2525 return false;

Status & tagging log