*/
public static function newFromRow( $row ) {
if ( is_array( $row ) && isset( $row['rc_logid'] ) ) {
- return new RCDatabaseLogEntry( (object) $row );
+ return new RCDatabaseLogEntry( (object)$row );
} else {
return new self( $row );
}
public function getPerformer() {
if ( !$this->performer ) {
- $userId = (int) $this->row->log_user;
+ $userId = (int)$this->row->log_user;
if ( $userId !== 0 ) { // logged-in users
if ( isset( $this->row->user_name ) ) {
$this->performer = User::newFromRow( $this->row );
public function getPerformer() {
if ( !$this->performer ) {
- $userId = (int) $this->row->rc_user;
+ $userId = (int)$this->row->rc_user;
if ( $userId !== 0 ) {
$this->performer = User::newFromId( $userId );
} else {
/**
* Inserts the entry into the logging table.
- * @param DatabaseBase $dbw
+ * @param IDatabase $dbw
* @return int If of the log entry
*/
- public function insert( DatabaseBase $dbw = null ) {
+ public function insert( IDatabase $dbw = null ) {
global $wgContLang;
$dbw = $dbw ?: wfGetDB( DB_MASTER );
'log_title' => $this->getTarget()->getDBkey(),
'log_page' => $this->getTarget()->getArticleID(),
'log_comment' => $comment,
- 'log_params' => serialize( (array) $this->getParameters() ),
+ 'log_params' => serialize( (array)$this->getParameters() ),
);
$dbw->insert( 'logging', $data, __METHOD__ );
$this->id = !is_null( $id ) ? $id : $dbw->insertId();
$this->getSubtype(),
$this->getTarget(),
$this->getComment(),
- serialize( (array) $this->getParameters() ),
+ serialize( (array)$this->getParameters() ),
$newId,
$formatter->getIRCActionComment() // Used for IRC feeds
);
}
if ( $to === 'udp' || $to === 'rcandudp' ) {
- $rc->notifyRC2UDP();
+ $rc->notifyRCFeeds();
}
}
}
public function getDeleted() {
- return (int) $this->deleted;
+ return (int)$this->deleted;
}
}