X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialContributions.php;h=689e096e26f8c473b248c78827a67551b2ed4ef1;hb=c4d0ce485280223eda024cc52d37ee19ade02111;hp=fb94ff72b29ca97f0111e4301078095427bfc010;hpb=eeb7300f6004e95620514eb9bac508425e94f197;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialContributions.php b/includes/specials/SpecialContributions.php index fb94ff72b2..689e096e26 100644 --- a/includes/specials/SpecialContributions.php +++ b/includes/specials/SpecialContributions.php @@ -399,7 +399,7 @@ class SpecialContributions extends SpecialPage { $this->opts['topOnly'] = false; } - $form = Xml::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript, 'class' => 'mw-contributions-form' ) ); + $form = Html::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript, 'class' => 'mw-contributions-form' ) ); # Add hidden params for tracking except for parameters in $skipParameters $skipParameters = array( 'namespace', 'nsInvert', 'deletedOnly', 'target', 'contribs', 'year', 'month', 'topOnly', 'associated' ); @@ -414,13 +414,13 @@ class SpecialContributions extends SpecialPage { if ( $tagFilter ) { $filterSelection = - Xml::tags( 'td', array( 'class' => 'mw-label' ), array_shift( $tagFilter ) ) . - Xml::tags( 'td', array( 'class' => 'mw-input' ), implode( ' ', $tagFilter ) ); + Html::rawElement( 'td', array( 'class' => 'mw-label' ), array_shift( $tagFilter ) ) . + Html::rawElement( 'td', array( 'class' => 'mw-input' ), implode( ' ', $tagFilter ) ); } else { - $filterSelection = Xml::tags( 'td', array( 'colspan' => 2 ), '' ); + $filterSelection = Html::rawElement( 'td', array( 'colspan' => 2 ), '' ); } - $targetSelection = Xml::tags( 'td', array( 'colspan' => 2 ), + $targetSelection = Html::rawElement( 'td', array( 'colspan' => 2 ), Xml::radioLabel( $this->msg( 'sp-contributions-newbies' )->text(), 'contribs', @@ -455,7 +455,7 @@ class SpecialContributions extends SpecialPage { '' ) ) . - Xml::tags( 'td', null, + Html::rawElement( 'td', null, Html::namespaceSelector( array( 'selected' => $this->opts['namespace'], 'all' => '', @@ -485,8 +485,8 @@ class SpecialContributions extends SpecialPage { ) ) ; - $extraOptions = Xml::tags( 'td', array( 'colspan' => 2 ), - Html::rawElement( 'span', array( 'style' => 'white-space: nowrap' ), + if ( $this->getUser()->isAllowed( 'deletedhistory' ) ) { + $deletedOnlyCheck = Html::rawElement( 'span', array( 'style' => 'white-space: nowrap' ), Xml::checkLabel( $this->msg( 'history-show-deleted' )->text(), 'deletedOnly', @@ -494,7 +494,13 @@ class SpecialContributions extends SpecialPage { $this->opts['deletedOnly'], array( 'class' => 'mw-input' ) ) - ) . + ); + } else { + $deletedOnlyCheck = ''; + } + + $extraOptions = Html::rawElement( 'td', array( 'colspan' => 2 ), + $deletedOnlyCheck . Html::rawElement( 'span', array( 'style' => 'white-space: nowrap' ), Xml::checkLabel( $this->msg( 'sp-contributions-toponly' )->text(), @@ -504,7 +510,7 @@ class SpecialContributions extends SpecialPage { array( 'class' => 'mw-input' ) ) ) - ) ; + ); $dateSelectionAndSubmit = Xml::tags( 'td', array( 'colspan' => 2 ), Xml::dateMenu( @@ -519,23 +525,13 @@ class SpecialContributions extends SpecialPage { $form .= Xml::fieldset( $this->msg( 'sp-contributions-search' )->text() ) . - Xml::openElement( 'table', array( 'class' => 'mw-contributions-table' ) ) . - Xml::openElement( 'tr' ) . - $targetSelection . - Xml::closeElement( 'tr' ) . - Xml::openElement( 'tr' ) . - $namespaceSelection . - Xml::closeElement( 'tr' ) . - Xml::openElement( 'tr' ) . - $filterSelection . - Xml::closeElement( 'tr' ) . - Xml::openElement( 'tr' ) . - $extraOptions . - Xml::closeElement( 'tr' ) . - Xml::openElement( 'tr' ) . - $dateSelectionAndSubmit . - Xml::closeElement( 'tr' ) . - Xml::closeElement( 'table' ); + Html::rawElement( 'table', array( 'class' => 'mw-contributions-table' ), "\n" . + Html::rawElement( 'tr', array(), $targetSelection ) . "\n" . + Html::rawElement( 'tr', array(), $namespaceSelection ) . "\n" . + Html::rawElement( 'tr', array(), $filterSelection ) . "\n" . + Html::rawElement( 'tr', array(), $extraOptions ) . "\n" . + Html::rawElement( 'tr', array(), $dateSelectionAndSubmit ) . "\n" + ); $explain = $this->msg( 'sp-contributions-explain' ); if ( $explain->exists() ) { @@ -841,7 +837,7 @@ class ContribsPager extends ReverseChronologicalPager { $link = Linker::link( $page, htmlspecialchars( $page->getPrefixedText() ), - array(), + array( 'class' => 'mw-contributions-title' ), $page->isRedirect() ? array( 'redirect' => 'no' ) : array() ); # Mark current revisions @@ -882,11 +878,11 @@ class ContribsPager extends ReverseChronologicalPager { // For some reason rev_parent_id isn't populated for this row. // Its rumoured this is true on wikipedia for some revisions (bug 34922). // Next best thing is to have the total number of bytes. - $chardiff = ' . . ' . Linker::formatRevisionSize( $row->rev_len ) . ' . . '; + $chardiff = ' . . ' . Linker::formatRevisionSize( $row->rev_len ) . ' . . '; } else { $parentLen = isset( $this->mParentLens[$row->rev_parent_id] ) ? $this->mParentLens[$row->rev_parent_id] : 0; - $chardiff = ' . . ' . ChangesList::showCharacterDifference( - $parentLen, $row->rev_len, $this->getContext() ) . ' . . '; + $chardiff = ' . . ' . ChangesList::showCharacterDifference( + $parentLen, $row->rev_len, $this->getContext() ) . ' . . '; } $lang = $this->getLanguage(); @@ -896,7 +892,7 @@ class ContribsPager extends ReverseChronologicalPager { $d = Linker::linkKnown( $page, htmlspecialchars( $date ), - array(), + array( 'class' => 'mw-changeslist-date' ), array( 'oldid' => intval( $row->rev_id ) ) ); } else {