r69629 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r69628‎ | r69629 | r69630 >
Date:15:50, 20 July 2010
Author:mah
Status:ok
Tags:
Comment:
trailing ws cleanup
Modified paths:
  • /trunk/phase3/includes/EditPage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/EditPage.php
@@ -129,8 +129,8 @@
130130 wfProfileIn( __METHOD__ );
131131 # Get variables from query string :P
132132 $section = $wgRequest->getVal( 'section' );
133 -
134 - $preload = $wgRequest->getVal( 'preload',
 133+
 134+ $preload = $wgRequest->getVal( 'preload',
135135 // Custom preload text for new sections
136136 $section === 'new' ? 'MediaWiki:addsection-preload' : '' );
137137 $undoafter = $wgRequest->getVal( 'undoafter' );
@@ -320,7 +320,7 @@
321321 }
322322
323323 $wgOut->addScriptFile( 'edit.js' );
324 -
 324+
325325 if ( $wgUser->getOption( 'uselivepreview', false ) ) {
326326 $wgOut->includeJQuery();
327327 $wgOut->addScriptFile( 'preview.js' );
@@ -493,7 +493,7 @@
494494 /**
495495 * Does this EditPage class support section editing?
496496 * This is used by EditPage subclasses to indicate their ui cannot handle section edits
497 - *
 497+ *
498498 * @return bool
499499 */
500500 protected function isSectionEditSupported() {
@@ -505,7 +505,7 @@
506506 * This is used by EditPage subclasses when simply customizing the action
507507 * variable in the constructor is not enough. This can be used when the
508508 * EditPage lives inside of a Special page rather than a custom page action.
509 - *
 509+ *
510510 * @param $title Title object for which is being edited (where we go to for &action= links)
511511 * @return string
512512 */
@@ -655,7 +655,7 @@
656656 * posted form to be placed in $this->textbox1, if using customized input
657657 * this method should be overrided and return the page text that will be used
658658 * for saving, preview parsing and so on...
659 - *
 659+ *
660660 * @param $request WebRequest
661661 */
662662 protected function importContentFormData( &$request ) {
@@ -1064,9 +1064,9 @@
10651065 $flags = EDIT_UPDATE | EDIT_DEFER_UPDATES | EDIT_AUTOSUMMARY |
10661066 ( $this->minoredit ? EDIT_MINOR : 0 ) |
10671067 ( $bot ? EDIT_FORCE_BOT : 0 );
1068 - $status = $this->mArticle->doEdit( $text, $this->summary, $flags,
 1068+ $status = $this->mArticle->doEdit( $text, $this->summary, $flags,
10691069 false, null, $this->watchthis, false, $sectionanchor, true );
1070 -
 1070+
10711071 if ( $status->isOK() )
10721072 {
10731073 wfProfileOut( __METHOD__ );
@@ -1303,7 +1303,7 @@
13041304 }
13051305
13061306 $wgOut->addHTML( $this->editFormTextBeforeContent );
1307 -
 1307+
13081308 if ( $this->isConflict ) {
13091309 // In an edit conflict bypass the overrideable content form method
13101310 // and fallback to the raw wpTextbox1 since editconflicts can't be
@@ -1340,7 +1340,7 @@
13411341
13421342 if ( $this->isConflict )
13431343 $this->showConflict();
1344 -
 1344+
13451345 $wgOut->addHTML( $this->editFormTextBottom );
13461346 $wgOut->addHTML( "</form>\n" );
13471347 if ( !$wgUser->getOption( 'previewontop' ) ) {
@@ -1349,7 +1349,7 @@
13501350
13511351 wfProfileOut( __METHOD__ );
13521352 }
1353 -
 1353+
13541354 protected function showHeader() {
13551355 global $wgOut, $wgUser, $wgTitle, $wgMaxArticleSize, $wgLang;
13561356 if ( $this->isConflict ) {
@@ -1490,12 +1490,12 @@
14911491 * Note that you do not need to worry about the label's for=, it will be
14921492 * inferred by the id given to the input. You can remove them both by
14931493 * passing array( 'id' => false ) to $userInputAttrs.
1494 - *
 1494+ *
14951495 * @param $summary The value of the summary input
14961496 * @param $labelText The html to place inside the label
14971497 * @param $inputAttrs An array of attrs to use on the input
14981498 * @param $spanLabelAttrs An array of attrs to use on the span inside the label
1499 - *
 1499+ *
15001500 * @return array An array in the format array( $label, $input )
15011501 */
15021502 function getSummaryInput($summary = "", $labelText = null, $inputAttrs = null, $spanLabelAttrs = null) {
@@ -1559,10 +1559,10 @@
15601560 protected function getSummaryPreview( $isSubjectPreview, $summary = "" ) {
15611561 if ( !$summary || ( !$this->preview && !$this->diff ) )
15621562 return "";
1563 -
 1563+
15641564 global $wgParser, $wgUser;
15651565 $sk = $wgUser->getSkin();
1566 -
 1566+
15671567 if ( $isSubjectPreview )
15681568 $summary = wfMsgForContent( 'newsectionsummary', $wgParser->stripSectionName( $summary ) );
15691569
@@ -1586,7 +1586,7 @@
15871587 if ( !$this->checkUnicodeCompliantBrowser() )
15881588 $wgOut->addHTML(Xml::hidden( 'safemode', '1' ));
15891589 }
1590 -
 1590+
15911591 protected function showFormAfterText() {
15921592 global $wgOut, $wgUser;
15931593 /**
@@ -1611,7 +1611,7 @@
16121612 * be it a form, or simply wpTextbox1 with a modified content that will be
16131613 * reverse modified when extracted from the post data.
16141614 * Note that this is basically the inverse for importContentFormData
1615 - *
 1615+ *
16161616 * @param $request WebRequest
16171617 */
16181618 protected function showContentForm() {
@@ -1622,7 +1622,7 @@
16231623 * Method to output wpTextbox1
16241624 * The $textoverride method can be used by subclasses overriding showContentForm
16251625 * to pass back to this method.
1626 - *
 1626+ *
16271627 * @param $customAttribs An array of html attributes to use in the textarea
16281628 * @param $textoverride String: optional text to override $this->textarea1 with
16291629 */
@@ -1648,7 +1648,7 @@
16491649 $classes[] = $attribs['class'];
16501650 $attribs['class'] = implode( ' ', $classes );
16511651 }
1652 -
 1652+
16531653 $this->showTextbox( isset($textoverride) ? $textoverride : $this->textbox1, 'wpTextbox1', $attribs );
16541654 }
16551655
@@ -1671,7 +1671,7 @@
16721672 $attribs = $customAttribs + array(
16731673 'accesskey' => ',',
16741674 'id' => $name,
1675 - 'cols' => $wgUser->getIntOption( 'cols' ),
 1675+ 'cols' => $wgUser->getIntOption( 'cols' ),
16761676 'rows' => $wgUser->getIntOption( 'rows' ),
16771677 'style' => '' // avoid php notices when appending preferences (appending allows customAttribs['style'] to still work
16781678 );
@@ -1727,7 +1727,7 @@
17281728 * Give a chance for site and per-namespace customizations of
17291729 * terms of service summary link that might exist separately
17301730 * from the copyright notice.
1731 - *
 1731+ *
17321732 * This will display between the save button and the edit tools,
17331733 * so should remain short!
17341734 */
@@ -1749,7 +1749,7 @@
17501750 $wgOut->addWikiMsgArray( 'edittools', array(), array( 'content' ) );
17511751 $wgOut->addHTML( '</div>' );
17521752 }
1753 -
 1753+
17541754 protected function getCopywarn() {
17551755 global $wgRightsText;
17561756 if ( $wgRightsText ) {
@@ -1762,10 +1762,10 @@
17631763 }
17641764 // Allow for site and per-namespace customization of contribution/copyright notice.
17651765 wfRunHooks( 'EditPageCopyrightWarning', array( $this->mTitle, &$copywarnMsg ) );
1766 -
 1766+
17671767 return "<div id=\"editpage-copywarn\">\n" . call_user_func_array("wfMsgNoTrans", $copywarnMsg) . "\n</div>";
17681768 }
1769 -
 1769+
17701770 protected function showStandardInputs( &$tabindex = 2 ) {
17711771 global $wgOut, $wgUser;
17721772 $wgOut->addHTML( "<div class='editOptions'>\n" );
@@ -2650,5 +2650,5 @@
26512651 } else {
26522652 return $this->mBaseRevision;
26532653 }
2654 - }
 2654+ }
26552655 }

Status & tagging log