r82454 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r82453‎ | r82454 | r82455 >
Date:14:35, 19 February 2011
Author:catrope
Status:ok
Tags:
Comment:
1.17wmf1: MFT r82315, r82386, r82411, r82412, r82413
Modified paths:
  • /branches/wmf/1.17wmf1/extensions/CentralAuth/ApiQueryGlobalUserInfo.php (modified) (history)
  • /branches/wmf/1.17wmf1/extensions/CentralAuth/SpecialCentralAuth.php (modified) (history)
  • /branches/wmf/1.17wmf1/extensions/FlaggedRevs/FlaggedArticleView.php (modified) (history)
  • /branches/wmf/1.17wmf1/extensions/ProofreadPage/ProofreadPage_body.php (modified) (history)
  • /branches/wmf/1.17wmf1/extensions/skins/p2wiki/P2wiki.skin.php (modified) (history)
  • /branches/wmf/1.17wmf1/includes/specials/SpecialListfiles.php (modified) (history)
  • /branches/wmf/1.17wmf1/skins/vector/screen.css (modified) (history)

Diff [purge]

Index: branches/wmf/1.17wmf1/skins/vector/screen.css
@@ -969,8 +969,8 @@
970970 }
971971 /* User Message */
972972 .usermessage {
973 - background-color: #e0e8ff;
974 - border: 1px solid #99b3ff;
 973+ background-color: #ffce7b;
 974+ border: 1px solid #ffa500;
975975 color: black;
976976 font-weight: bold;
977977 margin: 2em 0 1em;
Property changes on: branches/wmf/1.17wmf1/skins/vector/screen.css
___________________________________________________________________
Modified: svn:mergeinfo
978978 Merged /trunk/phase3/skins/vector/screen.css:r82315,82386,82411-82413,82446
Index: branches/wmf/1.17wmf1/extensions/FlaggedRevs/FlaggedArticleView.php
@@ -1744,7 +1744,7 @@
17451745 $labelMsg = wfMsgExt( 'revreview-check-flag-u', 'parseinline' );
17461746 }
17471747 $label = Xml::element( 'label', $attribs, $labelMsg );
1748 - $checkboxes['reviewed'] = $checkbox . ' ' . $label;
 1748+ $checkboxes['reviewed'] = $checkbox . ' ' . $label;
17491749 }
17501750 return true;
17511751 }
Index: branches/wmf/1.17wmf1/extensions/ProofreadPage/ProofreadPage_body.php
@@ -1525,7 +1525,7 @@
15261526 $qe = $ne * 100 / $n;
15271527 $void_cell = $ne ? "<td align=center style='border-style:dotted;border-width:1px;' width=\"{$qe}\"></td>" : '';
15281528 $output = "<table class=\"pr_quality\" style=\"line-height:40%;\" border=0 cellpadding=0 cellspacing=0 ><tr>
1529 -<td align=center >&nbsp;</td>
 1529+<td align=center >&#160;</td>
15301530 <td align=center class='quality4' width=\"$q4\"></td>
15311531 <td align=center class='quality3' width=\"$q3\"></td>
15321532 <td align=center class='quality2' width=\"$q2\"></td>
Index: branches/wmf/1.17wmf1/extensions/skins/p2wiki/P2wiki.skin.php
@@ -317,7 +317,7 @@
318318 <!-- /dataAfterContent -->
319319 <?php endif; ?>
320320 </div>
321 - <div class="bottom_of_entry">&nbsp;</div>
 321+ <div class="bottom_of_entry">&#160;</div>
322322 <div class="visualClear"></div>
323323 </div>
324324
Index: branches/wmf/1.17wmf1/extensions/CentralAuth/ApiQueryGlobalUserInfo.php
@@ -42,37 +42,40 @@
4343 $params['user'] = $wgUser->getName();
4444 }
4545 $user = new CentralAuthUser( $params['user'] );
46 - if ( !$user->exists() ) {
47 - $this->dieUsageMsg( array( 'nosuchuser', $params['user'] ) );
48 - }
4946
5047 // Add basic info
5148 $result = $this->getResult();
52 - $data = array(
53 - 'home' => $user->getHomeWiki(),
54 - 'id' => $user->getId(),
55 - 'registration' => wfTimestamp( TS_ISO_8601, $user->getRegistration() )
56 - );
57 - if ( $user->isLocked() ) {
58 - $data['locked'] = '';
 49+ $data = array();
 50+ $userExists = $user->exists();
 51+
 52+ if ( $userExists ) {
 53+ $data['home'] = $user->getHomeWiki();
 54+ $data['id'] = $user->getId();
 55+ $data['registration'] = wfTimestamp( TS_ISO_8601, $user->getRegistration() );
 56+
 57+ if ( $user->isLocked() ) {
 58+ $data['locked'] = '';
 59+ }
 60+ if ( $user->isHidden() ) {
 61+ $data['hidden'] = '';
 62+ }
 63+ } else {
 64+ $data['missing'] = '';
5965 }
60 - if ( $user->isHidden() ) {
61 - $data['hidden'] = '';
62 - }
6366 $result->addValue( 'query', $this->getModuleName(), $data );
6467
6568 // Add requested info
66 - if ( isset( $prop['groups'] ) ) {
 69+ if ( $userExists && isset( $prop['groups'] ) ) {
6770 $groups = $user->getGlobalGroups();
6871 $result->setIndexedTagName( $groups, 'g' );
6972 $result->addValue( array( 'query', $this->getModuleName() ), 'groups', $groups );
7073 }
71 - if ( isset( $prop['rights'] ) ) {
 74+ if ( $userExists && isset( $prop['rights'] ) ) {
7275 $rights = $user->getGlobalRights();
7376 $result->setIndexedTagName( $rights, 'r' );
7477 $result->addValue( array( 'query', $this->getModuleName() ), 'rights', $rights );
7578 }
76 - if ( isset( $prop['merged'] ) ) {
 79+ if ( $userExists && isset( $prop['merged'] ) ) {
7780 $accounts = $user->queryAttached();
7881 foreach ( $accounts as $account ) {
7982 $a = array(
@@ -152,12 +155,6 @@
153156 return 'Show information about a global user.';
154157 }
155158
156 - public function getPossibleErrors() {
157 - return array_merge( parent::getPossibleErrors(), array(
158 - array( 'nosuchuser', 'user' ),
159 - ) );
160 - }
161 -
162159 protected function getExamples() {
163160 return array(
164161 'api.php?action=query&meta=globaluserinfo',
Index: branches/wmf/1.17wmf1/extensions/CentralAuth/SpecialCentralAuth.php
@@ -258,9 +258,9 @@
259259 if ( $span < 2 * $chunk ) {
260260 return wfMsgExt( "centralauth-$unit-ago", 'parsemag', $wgLang->formatNum( $span ) );
261261 }
262 - $span = $wgLang->formatNum( intval( $span / $chunk ) );
 262+ $span = intval( $span / $chunk );
263263 }
264 - return wfMsgExt( "centralauth-$unit-ago", 'parsemag', $span );
 264+ return wfMsgExt( "centralauth-$unit-ago", 'parsemag', $wgLang->formatNum( $span ) );
265265 }
266266
267267 function showInfo() {
Index: branches/wmf/1.17wmf1/includes/specials/SpecialListfiles.php
@@ -211,10 +211,8 @@
212212 ) );
213213 $s = Html::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript, 'id' => 'mw-listfiles-form' ) ) .
214214 Xml::fieldset( wfMsg( 'listfiles' ) ) .
215 - Html::openElement( 'table', array( 'id' => 'mw-listfiles-table' ) ) .
216215 Xml::buildForm( $inputForm, 'table_pager_limit_submit' ) .
217216 $this->getHiddenFields( array( 'limit', 'ilsearch', 'user' ) ) .
218 - Html::closeElement( 'table' ) .
219217 Html::closeElement( 'fieldset' ) .
220218 Html::closeElement( 'form' ) . "\n";
221219 return $s;

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r82315Reverting r76017 per discussion on Bugzilla. Lack of community consensus for ...soxred9300:30, 17 February 2011
r82386Bug 27430 - Special:CentralAuth shouldn't use always minutes:...raymond09:55, 18 February 2011
r82411Fix invalid HTML introduced in r68096: Xml::buildForm() adds <table></table> tooraymond18:35, 18 February 2011
r82412* (bug 25508) Poor API behavior when the SUL account does not exist...reedy18:54, 18 February 2011
r82413Remove named entities again...simetrical18:56, 18 February 2011

Status & tagging log