55 $rc = RecentChange::newFromId( $rc );
56 if ( !is_object( $rc ) ) {
65 $page = $rc->getPage() ?? PageReferenceValue::localReference(
NS_SPECIAL,
'Badtitle' );
66 $entry->setTarget( $page );
67 $entry->setParameters( self::buildParams( $rc ) );
68 $entry->setPerformer( $user );
69 $entry->addTags( $tags );
70 $logid = $entry->insert();
71 $entry->publish( $logid,
'udp' );
82 private static function buildParams( $change ) {
84 '4::curid' => $change->getAttribute(
'rc_this_oldid' ),
85 '5::previd' => $change->getAttribute(
'rc_last_oldid' ),
92class_alias( PatrolLog::class,
'PatrolLog' );
Class for creating new log entries and inserting them into the database.