r98752 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r98751‎ | r98752 | r98753 >
Date:12:51, 3 October 2011
Author:reedy
Status:ok
Tags:
Comment:
Modified paths:
  • /branches/wmf/1.18wmf1 (modified) (history)
  • /branches/wmf/1.18wmf1/includes (modified) (history)
  • /branches/wmf/1.18wmf1/includes/Html.php (modified) (history)
  • /branches/wmf/1.18wmf1/includes/SpecialPage.php (modified) (history)
  • /branches/wmf/1.18wmf1/includes/specials (modified) (history)
  • /branches/wmf/1.18wmf1/includes/specials/SpecialBlockList.php (modified) (history)

Diff [purge]

Index: branches/wmf/1.18wmf1/includes/Html.php
@@ -609,7 +609,16 @@
610610 }
611611 }
612612
613 - return self::element( 'textarea', $attribs, $value );
 613+ if (substr($value, 0, 1) == "\n") {
 614+ // Workaround for bug 12130: browsers eat the initial newline
 615+ // assuming that it's just for show, but they do keep the later
 616+ // newlines, which we may want to preserve during editing.
 617+ // Prepending a single newline
 618+ $spacedValue = "\n" . $value;
 619+ } else {
 620+ $spacedValue = $value;
 621+ }
 622+ return self::element( 'textarea', $attribs, $spacedValue );
614623 }
615624
616625 /**
Index: branches/wmf/1.18wmf1/includes/specials/SpecialBlockList.php
@@ -317,7 +317,7 @@
318318 if ( $row->ipb_create_account ) {
319319 $properties[] = $msg['createaccountblock'];
320320 }
321 - if ( !$row->ipb_enable_autoblock ) {
 321+ if ( $row->ipb_user && !$row->ipb_enable_autoblock ) {
322322 $properties[] = $msg['noautoblockblock'];
323323 }
324324
@@ -346,6 +346,7 @@
347347 'fields' => array(
348348 'ipb_id',
349349 'ipb_address',
 350+ 'ipb_user',
350351 'ipb_by',
351352 'ipb_reason',
352353 'ipb_timestamp',
Property changes on: branches/wmf/1.18wmf1/includes/specials
___________________________________________________________________
Modified: svn:mergeinfo
353354 Merged /trunk/phase3/includes/specials:r98578,98598,98656
Index: branches/wmf/1.18wmf1/includes/SpecialPage.php
@@ -694,7 +694,12 @@
695695 * @see wfMessage
696696 */
697697 public function msg( /* $args */ ) {
698 - return call_user_func_array( array( $this->getContext(), 'msg' ), func_get_args() );
 698+ // Note: can't use func_get_args() directly as second or later item in
 699+ // a parameter list until PHP 5.3 or you get a fatal error.
 700+ // Works fine as the first parameter, which appears elsewhere in the
 701+ // code base. Sighhhh.
 702+ $args = func_get_args();
 703+ return call_user_func_array( array( $this->getContext(), 'msg' ), $args );
699704 }
700705
701706 /**
Property changes on: branches/wmf/1.18wmf1/includes/SpecialPage.php
___________________________________________________________________
Modified: svn:mergeinfo
702707 Merged /trunk/phase3/includes/SpecialPage.php:r98578,98598,98656
Property changes on: branches/wmf/1.18wmf1/includes
___________________________________________________________________
Modified: svn:mergeinfo
703708 Merged /trunk/phase3/includes:r98578,98598,98656
Property changes on: branches/wmf/1.18wmf1
___________________________________________________________________
Modified: svn:mergeinfo
704709 Merged /trunk/phase3:r98578,98598,98656

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r98578* (bug 12130) Initial newlines are now preserved correctly during editing...brion22:50, 30 September 2011
r98598* (bug 31289) Fix fatal error on special pages using $this->msg() on PHP 5.2...brion02:03, 1 October 2011
r98656Don't show 'autoblock disabled' for IP blocksaaron06:10, 2 October 2011

Status & tagging log