return array(
'tables' => $tables,
'fields' => $fields,
- 'conds' => array(),
+ 'conds' => array(),
'options' => array(),
'join_conds' => $joins,
);
}
public function getPerformer() {
- if( !$this->performer ) {
+ if ( !$this->performer ) {
$userId = (int) $this->row->log_user;
if ( $userId !== 0 ) { // logged-in users
if ( isset( $this->row->user_name ) ) {
}
public function getPerformer() {
- if( !$this->performer ) {
+ if ( !$this->performer ) {
$userId = (int) $this->row->rc_user;
if ( $userId !== 0 ) {
$this->performer = User::newFromId( $userId );
/**
* Inserts the entry into the logging table.
+ * @param DatabaseBase $dbw
* @return int If of the log entry
*/
- public function insert() {
+ public function insert( DatabaseBase $dbw = null ) {
global $wgContLang;
- $dbw = wfGetDB( DB_MASTER );
+ $dbw = $dbw ?: wfGetDB( DB_MASTER );
$id = $dbw->nextSequenceValue( 'logging_log_id_seq' );
if ( $this->timestamp === null ) {