Index: trunk/phase3/includes/EditPage.php |
— | — | @@ -129,8 +129,8 @@ |
130 | 130 | wfProfileIn( __METHOD__ ); |
131 | 131 | # Get variables from query string :P |
132 | 132 | $section = $wgRequest->getVal( 'section' ); |
133 | | - |
134 | | - $preload = $wgRequest->getVal( 'preload', |
| 133 | + |
| 134 | + $preload = $wgRequest->getVal( 'preload', |
135 | 135 | // Custom preload text for new sections |
136 | 136 | $section === 'new' ? 'MediaWiki:addsection-preload' : '' ); |
137 | 137 | $undoafter = $wgRequest->getVal( 'undoafter' ); |
— | — | @@ -320,7 +320,7 @@ |
321 | 321 | } |
322 | 322 | |
323 | 323 | $wgOut->addScriptFile( 'edit.js' ); |
324 | | - |
| 324 | + |
325 | 325 | if ( $wgUser->getOption( 'uselivepreview', false ) ) { |
326 | 326 | $wgOut->includeJQuery(); |
327 | 327 | $wgOut->addScriptFile( 'preview.js' ); |
— | — | @@ -493,7 +493,7 @@ |
494 | 494 | /** |
495 | 495 | * Does this EditPage class support section editing? |
496 | 496 | * This is used by EditPage subclasses to indicate their ui cannot handle section edits |
497 | | - * |
| 497 | + * |
498 | 498 | * @return bool |
499 | 499 | */ |
500 | 500 | protected function isSectionEditSupported() { |
— | — | @@ -505,7 +505,7 @@ |
506 | 506 | * This is used by EditPage subclasses when simply customizing the action |
507 | 507 | * variable in the constructor is not enough. This can be used when the |
508 | 508 | * EditPage lives inside of a Special page rather than a custom page action. |
509 | | - * |
| 509 | + * |
510 | 510 | * @param $title Title object for which is being edited (where we go to for &action= links) |
511 | 511 | * @return string |
512 | 512 | */ |
— | — | @@ -655,7 +655,7 @@ |
656 | 656 | * posted form to be placed in $this->textbox1, if using customized input |
657 | 657 | * this method should be overrided and return the page text that will be used |
658 | 658 | * for saving, preview parsing and so on... |
659 | | - * |
| 659 | + * |
660 | 660 | * @param $request WebRequest |
661 | 661 | */ |
662 | 662 | protected function importContentFormData( &$request ) { |
— | — | @@ -1064,9 +1064,9 @@ |
1065 | 1065 | $flags = EDIT_UPDATE | EDIT_DEFER_UPDATES | EDIT_AUTOSUMMARY | |
1066 | 1066 | ( $this->minoredit ? EDIT_MINOR : 0 ) | |
1067 | 1067 | ( $bot ? EDIT_FORCE_BOT : 0 ); |
1068 | | - $status = $this->mArticle->doEdit( $text, $this->summary, $flags, |
| 1068 | + $status = $this->mArticle->doEdit( $text, $this->summary, $flags, |
1069 | 1069 | false, null, $this->watchthis, false, $sectionanchor, true ); |
1070 | | - |
| 1070 | + |
1071 | 1071 | if ( $status->isOK() ) |
1072 | 1072 | { |
1073 | 1073 | wfProfileOut( __METHOD__ ); |
— | — | @@ -1303,7 +1303,7 @@ |
1304 | 1304 | } |
1305 | 1305 | |
1306 | 1306 | $wgOut->addHTML( $this->editFormTextBeforeContent ); |
1307 | | - |
| 1307 | + |
1308 | 1308 | if ( $this->isConflict ) { |
1309 | 1309 | // In an edit conflict bypass the overrideable content form method |
1310 | 1310 | // and fallback to the raw wpTextbox1 since editconflicts can't be |
— | — | @@ -1340,7 +1340,7 @@ |
1341 | 1341 | |
1342 | 1342 | if ( $this->isConflict ) |
1343 | 1343 | $this->showConflict(); |
1344 | | - |
| 1344 | + |
1345 | 1345 | $wgOut->addHTML( $this->editFormTextBottom ); |
1346 | 1346 | $wgOut->addHTML( "</form>\n" ); |
1347 | 1347 | if ( !$wgUser->getOption( 'previewontop' ) ) { |
— | — | @@ -1349,7 +1349,7 @@ |
1350 | 1350 | |
1351 | 1351 | wfProfileOut( __METHOD__ ); |
1352 | 1352 | } |
1353 | | - |
| 1353 | + |
1354 | 1354 | protected function showHeader() { |
1355 | 1355 | global $wgOut, $wgUser, $wgTitle, $wgMaxArticleSize, $wgLang; |
1356 | 1356 | if ( $this->isConflict ) { |
— | — | @@ -1490,12 +1490,12 @@ |
1491 | 1491 | * Note that you do not need to worry about the label's for=, it will be |
1492 | 1492 | * inferred by the id given to the input. You can remove them both by |
1493 | 1493 | * passing array( 'id' => false ) to $userInputAttrs. |
1494 | | - * |
| 1494 | + * |
1495 | 1495 | * @param $summary The value of the summary input |
1496 | 1496 | * @param $labelText The html to place inside the label |
1497 | 1497 | * @param $inputAttrs An array of attrs to use on the input |
1498 | 1498 | * @param $spanLabelAttrs An array of attrs to use on the span inside the label |
1499 | | - * |
| 1499 | + * |
1500 | 1500 | * @return array An array in the format array( $label, $input ) |
1501 | 1501 | */ |
1502 | 1502 | function getSummaryInput($summary = "", $labelText = null, $inputAttrs = null, $spanLabelAttrs = null) { |
— | — | @@ -1559,10 +1559,10 @@ |
1560 | 1560 | protected function getSummaryPreview( $isSubjectPreview, $summary = "" ) { |
1561 | 1561 | if ( !$summary || ( !$this->preview && !$this->diff ) ) |
1562 | 1562 | return ""; |
1563 | | - |
| 1563 | + |
1564 | 1564 | global $wgParser, $wgUser; |
1565 | 1565 | $sk = $wgUser->getSkin(); |
1566 | | - |
| 1566 | + |
1567 | 1567 | if ( $isSubjectPreview ) |
1568 | 1568 | $summary = wfMsgForContent( 'newsectionsummary', $wgParser->stripSectionName( $summary ) ); |
1569 | 1569 | |
— | — | @@ -1586,7 +1586,7 @@ |
1587 | 1587 | if ( !$this->checkUnicodeCompliantBrowser() ) |
1588 | 1588 | $wgOut->addHTML(Xml::hidden( 'safemode', '1' )); |
1589 | 1589 | } |
1590 | | - |
| 1590 | + |
1591 | 1591 | protected function showFormAfterText() { |
1592 | 1592 | global $wgOut, $wgUser; |
1593 | 1593 | /** |
— | — | @@ -1611,7 +1611,7 @@ |
1612 | 1612 | * be it a form, or simply wpTextbox1 with a modified content that will be |
1613 | 1613 | * reverse modified when extracted from the post data. |
1614 | 1614 | * Note that this is basically the inverse for importContentFormData |
1615 | | - * |
| 1615 | + * |
1616 | 1616 | * @param $request WebRequest |
1617 | 1617 | */ |
1618 | 1618 | protected function showContentForm() { |
— | — | @@ -1622,7 +1622,7 @@ |
1623 | 1623 | * Method to output wpTextbox1 |
1624 | 1624 | * The $textoverride method can be used by subclasses overriding showContentForm |
1625 | 1625 | * to pass back to this method. |
1626 | | - * |
| 1626 | + * |
1627 | 1627 | * @param $customAttribs An array of html attributes to use in the textarea |
1628 | 1628 | * @param $textoverride String: optional text to override $this->textarea1 with |
1629 | 1629 | */ |
— | — | @@ -1648,7 +1648,7 @@ |
1649 | 1649 | $classes[] = $attribs['class']; |
1650 | 1650 | $attribs['class'] = implode( ' ', $classes ); |
1651 | 1651 | } |
1652 | | - |
| 1652 | + |
1653 | 1653 | $this->showTextbox( isset($textoverride) ? $textoverride : $this->textbox1, 'wpTextbox1', $attribs ); |
1654 | 1654 | } |
1655 | 1655 | |
— | — | @@ -1671,7 +1671,7 @@ |
1672 | 1672 | $attribs = $customAttribs + array( |
1673 | 1673 | 'accesskey' => ',', |
1674 | 1674 | 'id' => $name, |
1675 | | - 'cols' => $wgUser->getIntOption( 'cols' ), |
| 1675 | + 'cols' => $wgUser->getIntOption( 'cols' ), |
1676 | 1676 | 'rows' => $wgUser->getIntOption( 'rows' ), |
1677 | 1677 | 'style' => '' // avoid php notices when appending preferences (appending allows customAttribs['style'] to still work |
1678 | 1678 | ); |
— | — | @@ -1727,7 +1727,7 @@ |
1728 | 1728 | * Give a chance for site and per-namespace customizations of |
1729 | 1729 | * terms of service summary link that might exist separately |
1730 | 1730 | * from the copyright notice. |
1731 | | - * |
| 1731 | + * |
1732 | 1732 | * This will display between the save button and the edit tools, |
1733 | 1733 | * so should remain short! |
1734 | 1734 | */ |
— | — | @@ -1749,7 +1749,7 @@ |
1750 | 1750 | $wgOut->addWikiMsgArray( 'edittools', array(), array( 'content' ) ); |
1751 | 1751 | $wgOut->addHTML( '</div>' ); |
1752 | 1752 | } |
1753 | | - |
| 1753 | + |
1754 | 1754 | protected function getCopywarn() { |
1755 | 1755 | global $wgRightsText; |
1756 | 1756 | if ( $wgRightsText ) { |
— | — | @@ -1762,10 +1762,10 @@ |
1763 | 1763 | } |
1764 | 1764 | // Allow for site and per-namespace customization of contribution/copyright notice. |
1765 | 1765 | wfRunHooks( 'EditPageCopyrightWarning', array( $this->mTitle, &$copywarnMsg ) ); |
1766 | | - |
| 1766 | + |
1767 | 1767 | return "<div id=\"editpage-copywarn\">\n" . call_user_func_array("wfMsgNoTrans", $copywarnMsg) . "\n</div>"; |
1768 | 1768 | } |
1769 | | - |
| 1769 | + |
1770 | 1770 | protected function showStandardInputs( &$tabindex = 2 ) { |
1771 | 1771 | global $wgOut, $wgUser; |
1772 | 1772 | $wgOut->addHTML( "<div class='editOptions'>\n" ); |
— | — | @@ -2650,5 +2650,5 @@ |
2651 | 2651 | } else { |
2652 | 2652 | return $this->mBaseRevision; |
2653 | 2653 | } |
2654 | | - } |
| 2654 | + } |
2655 | 2655 | } |