summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Reed <reedy@users.mediawiki.org>2012-03-07 15:14:48 +0000
committerSam Reed <reedy@users.mediawiki.org>2012-03-07 15:14:48 +0000
commit23c5d3d58123793efcf8ca867b0895e8fac4edfc (patch)
treefb98fdb0f44f44488baba6a3f0ee3ce4241c85ee
parent9e1431bf625e7767b2a18497cf901289aa3548be (diff)
MFT r113171, r113195, r1132111.19.0beta1
Notes
http://mediawiki.org/wiki/Special:Code/MediaWiki/113235
-rw-r--r--includes/RecentChange.php5
-rw-r--r--includes/api/ApiBase.php1
-rw-r--r--includes/filerepo/backend/FileOp.php11
3 files changed, 10 insertions, 7 deletions
diff --git a/includes/RecentChange.php b/includes/RecentChange.php
index f8573eb9ed6b..ca0ed955f9d2 100644
--- a/includes/RecentChange.php
+++ b/includes/RecentChange.php
@@ -166,7 +166,7 @@ class RecentChange {
* @param $noudp bool
*/
public function save( $noudp = false ) {
- global $wgLocalInterwiki, $wgPutIPinRC;
+ global $wgLocalInterwiki, $wgPutIPinRC, $wgContLang;
$dbw = wfGetDB( DB_MASTER );
if( !is_array($this->mExtra) ) {
@@ -183,6 +183,9 @@ class RecentChange {
unset( $this->mAttribs['rc_ip'] );
}
+ # Make sure summary is truncated (whole multibyte characters)
+ $this->mAttribs['rc_comment'] = $wgContLang->truncate( $this->mAttribs['rc_comment'], 255 );
+
# Fixup database timestamps
$this->mAttribs['rc_timestamp'] = $dbw->timestamp($this->mAttribs['rc_timestamp']);
$this->mAttribs['rc_cur_time'] = $dbw->timestamp($this->mAttribs['rc_cur_time']);
diff --git a/includes/api/ApiBase.php b/includes/api/ApiBase.php
index 133339a1b31e..a586f688f1e5 100644
--- a/includes/api/ApiBase.php
+++ b/includes/api/ApiBase.php
@@ -1269,6 +1269,7 @@ abstract class ApiBase extends ContextSource {
* @return array('code' => code, 'info' => info)
*/
public function parseMsg( $error ) {
+ $error = (array)$error; // It seems strings sometimes make their way in here
$key = array_shift( $error );
// Check whether the error array was nested
diff --git a/includes/filerepo/backend/FileOp.php b/includes/filerepo/backend/FileOp.php
index e51f5b1a277f..0d30a277524c 100644
--- a/includes/filerepo/backend/FileOp.php
+++ b/includes/filerepo/backend/FileOp.php
@@ -134,13 +134,12 @@ abstract class FileOp {
} else {
$status->success[$index] = false;
++$status->failCount;
- if ( !$ignoreErrors ) {
- // Log remaining ops as failed for recovery...
- for ( $i = ($index + 1); $i < count( $performOps ); $i++ ) {
- $performOps[$i]->logFailure( 'attempt_aborted' );
- }
- return $status; // bail out
+ // We can't continue (even with $ignoreErrors) as $predicates is wrong.
+ // Log the remaining ops as failed for recovery...
+ for ( $i = ($index + 1); $i < count( $performOps ); $i++ ) {
+ $performOps[$i]->logFailure( 'attempt_aborted' );
}
+ return $status; // bail out
}
}