$logtype = $suppress ? 'suppress' : 'delete';
$log = new LogPage( $logtype );
# Make sure logging got through
- $ok = $log->addEntry( 'delete', $this->mTitle, $reason, array(), $dbw );
+ $ok = $log->addEntry( 'delete', $this->mTitle, $reason, array() );
if( !$ok ) {
$dbw->rollback();
return false;
$this->updateRecentChanges = $rc;
}
- function saveContent( $dbw ) {
+ function saveContent() {
if( wfReadOnly() ) return false;
global $wgUser, $wgLogRestrictions;
$fname = 'LogPage::saveContent';
- $dbw = $dbw ? $dbw : wfGetDB( DB_MASTER );
+ $dbw = wfGetDB( DB_MASTER );
$uid = $wgUser->getID();
$log_id = $dbw->nextSequenceValue( 'log_log_id_seq' );
* @param object &$target A title object.
* @param string $comment Description associated
* @param array $params Parameters passed later to wfMsg.* functions
- * @param Database $dbw, optional
*/
- function addEntry( $action, $target, $comment, $params = array(), $dbw = NULL ) {
+ function addEntry( $action, $target, $comment, $params = array() ) {
if ( !is_array( $params ) ) {
$params = array( $params );
}
$this->actionText = LogPage::actionText( $this->type, $action, $target, NULL, $params );
- return $this->saveContent( $dbw );
+ return $this->saveContent();
}
/**
# Make log entry, if the name is hidden, put it in the oversight log
$log_type = ($this->BlockHideName) ? 'suppress' : 'block';
$log = new LogPage( $log_type );
- $ok = $log->addEntry( 'block', Title::makeTitle( NS_USER, $this->BlockAddress ),
- $reasonstr, $logParams, $dbw );
+ $ok = $log->addEntry( 'block', Title::makeTitle( NS_USER, $this->BlockAddress ), $reasonstr, $logParams );
# Make sure logging got through
if( !$ok ) {
$dbw->rollback();