From: Aaron Schulz Date: Wed, 16 Apr 2008 17:34:52 +0000 (+0000) Subject: No need to pass db around, should be the same X-Git-Tag: 1.31.0-rc.0~48266 X-Git-Url: http://git.cyclocoop.org/%24action?a=commitdiff_plain;h=6eac8727d756aa9c89ec01157cea90c0cbdeaf95;p=lhc%2Fweb%2Fwiklou.git No need to pass db around, should be the same --- diff --git a/includes/Article.php b/includes/Article.php index 95979f14b2..af347d7100 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -2361,7 +2361,7 @@ class Article { $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; diff --git a/includes/LogPage.php b/includes/LogPage.php index e86aadf21d..041d05ce5e 100644 --- a/includes/LogPage.php +++ b/includes/LogPage.php @@ -51,13 +51,13 @@ class LogPage { $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' ); @@ -237,9 +237,8 @@ class LogPage { * @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 ); } @@ -251,7 +250,7 @@ class LogPage { $this->actionText = LogPage::actionText( $this->type, $action, $target, NULL, $params ); - return $this->saveContent( $dbw ); + return $this->saveContent(); } /** diff --git a/includes/SpecialBlockip.php b/includes/SpecialBlockip.php index 20063c0ca7..83eb23c7f4 100644 --- a/includes/SpecialBlockip.php +++ b/includes/SpecialBlockip.php @@ -365,8 +365,7 @@ class IPBlockForm { # 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();