function upload( $src, $comment, $pageText, $flags = 0, $props = false,
$timestamp = false, $user = null, $tags = []
) {
- global $wgContLang;
-
if ( $this->getRepo()->getReadOnlyReason() !== false ) {
return $this->readOnlyFatalStatus();
}
// Trim spaces on user supplied text
$comment = trim( $comment );
- // Truncate nicely or the DB will do it for us
- // non-nicely (dangling multi-byte chars, non-truncated version in cache).
- $comment = $wgContLang->truncate( $comment, 255 );
$this->lock(); // begin
$status = $this->publish( $src, $flags, $options );