* @throws MWException
*/
public function insert( IDatabase $dbw = null ) {
- global $wgContLang;
-
$dbw = $dbw ?: wfGetDB( DB_MASTER );
- $id = $dbw->nextSequenceValue( 'logging_log_id_seq' );
if ( $this->timestamp === null ) {
$this->timestamp = wfTimestampNow();
// Trim spaces on user supplied text
$comment = trim( $this->getComment() );
- // Truncate for whole multibyte characters.
- $comment = $wgContLang->truncate( $comment, 255 );
-
$params = $this->getParameters();
$relations = $this->relations;
}
$data = [
- 'log_id' => $id,
'log_type' => $this->getType(),
'log_action' => $this->getSubtype(),
'log_timestamp' => $dbw->timestamp( $this->getTimestamp() ),