r113235 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r113234‎ | r113235 | r113236 >
Date:15:14, 7 March 2012
Author:reedy
Status:ok
Tags:
Comment:
Modified paths:
  • /branches/REL1_19/phase3 (modified) (history)
  • /branches/REL1_19/phase3/includes (modified) (history)
  • /branches/REL1_19/phase3/includes/RecentChange.php (modified) (history)
  • /branches/REL1_19/phase3/includes/api (modified) (history)
  • /branches/REL1_19/phase3/includes/api/ApiBase.php (modified) (history)
  • /branches/REL1_19/phase3/includes/filerepo/backend/FileOp.php (modified) (history)

Diff [purge]

Index: branches/REL1_19/phase3/includes/RecentChange.php
@@ -166,7 +166,7 @@
167167 * @param $noudp bool
168168 */
169169 public function save( $noudp = false ) {
170 - global $wgLocalInterwiki, $wgPutIPinRC;
 170+ global $wgLocalInterwiki, $wgPutIPinRC, $wgContLang;
171171
172172 $dbw = wfGetDB( DB_MASTER );
173173 if( !is_array($this->mExtra) ) {
@@ -183,6 +183,9 @@
184184 unset( $this->mAttribs['rc_ip'] );
185185 }
186186
 187+ # Make sure summary is truncated (whole multibyte characters)
 188+ $this->mAttribs['rc_comment'] = $wgContLang->truncate( $this->mAttribs['rc_comment'], 255 );
 189+
187190 # Fixup database timestamps
188191 $this->mAttribs['rc_timestamp'] = $dbw->timestamp($this->mAttribs['rc_timestamp']);
189192 $this->mAttribs['rc_cur_time'] = $dbw->timestamp($this->mAttribs['rc_cur_time']);
Index: branches/REL1_19/phase3/includes/filerepo/backend/FileOp.php
@@ -134,13 +134,12 @@
135135 } else {
136136 $status->success[$index] = false;
137137 ++$status->failCount;
138 - if ( !$ignoreErrors ) {
139 - // Log remaining ops as failed for recovery...
140 - for ( $i = ($index + 1); $i < count( $performOps ); $i++ ) {
141 - $performOps[$i]->logFailure( 'attempt_aborted' );
142 - }
143 - return $status; // bail out
 138+ // We can't continue (even with $ignoreErrors) as $predicates is wrong.
 139+ // Log the remaining ops as failed for recovery...
 140+ for ( $i = ($index + 1); $i < count( $performOps ); $i++ ) {
 141+ $performOps[$i]->logFailure( 'attempt_aborted' );
144142 }
 143+ return $status; // bail out
145144 }
146145 }
147146
Index: branches/REL1_19/phase3/includes/api/ApiBase.php
@@ -1269,6 +1269,7 @@
12701270 * @return array('code' => code, 'info' => info)
12711271 */
12721272 public function parseMsg( $error ) {
 1273+ $error = (array)$error; // It seems strings sometimes make their way in here
12731274 $key = array_shift( $error );
12741275
12751276 // Check whether the error array was nested
Property changes on: branches/REL1_19/phase3/includes/api
___________________________________________________________________
Modified: svn:mergeinfo
12761277 Merged /trunk/phase3/includes/api:r113211
Property changes on: branches/REL1_19/phase3/includes
___________________________________________________________________
Modified: svn:mergeinfo
12771278 Merged /trunk/phase3/includes:r113171,113195,113211
Property changes on: branches/REL1_19/phase3
___________________________________________________________________
Modified: svn:mergeinfo
12781279 Merged /trunk/phase3:r113171,113195,113211

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r113171r110955: also truncate rc_comment for log entries. This adds the code in save...aaron19:38, 6 March 2012
r113195Fixed FileOp::attemptBatch() behavior when unexpected failures occur with the...aaron22:59, 6 March 2012
r113211It seems that parseMsg() sometimes receives strings, probably from bad dieUsa...catrope02:09, 7 March 2012

Status & tagging log