private $target;
/**
- * Constructor
- *
* @param string $type One of '', 'block', 'protect', 'rights', 'delete',
* 'upload', 'move'
* @param bool $rc Whether to update recent changes as well as the logging table
'log_namespace' => $this->target->getNamespace(),
'log_title' => $this->target->getDBkey(),
'log_page' => $this->target->getArticleID(),
- 'log_comment' => $this->comment,
'log_params' => $this->params
];
+ $data += CommentStore::newKey( 'log_comment' )->insert( $dbw, $this->comment );
$dbw->insert( 'logging', $data, __METHOD__ );
- $newId = !is_null( $log_id ) ? $log_id : $dbw->insertId();
+ $newId = $dbw->insertId();
# And update recentchanges
if ( $this->updateRecentChanges ) {
* @return bool
*/
public static function isLogType( $type ) {
- return in_array( $type, LogPage::validTypes() );
+ return in_array( $type, self::validTypes() );
}
/**
* @param string $type
* @param Language|null $lang
* @param Title $title
- * @param array $params
+ * @param array &$params
* @return string
*/
protected static function getTitleLink( $type, $lang, $title, &$params ) {
$this->action = $action;
$this->target = $target;
$this->comment = $comment;
- $this->params = LogPage::makeParamBlob( $params );
+ $this->params = self::makeParamBlob( $params );
if ( $doer === null ) {
global $wgUser;