}
}
+ /**
+ * Loads a LogEntry with the given id from database
+ *
+ * @param int $id
+ * @param IDatabase $db
+ * @return DatabaseLogEntry|null
+ */
+ public static function newFromId( $id, IDatabase $db ) {
+ $queryInfo = self::getSelectQueryData();
+ $queryInfo['conds'] += [ 'log_id' => $id ];
+ $row = $db->selectRow(
+ $queryInfo['tables'],
+ $queryInfo['fields'],
+ $queryInfo['conds'],
+ __METHOD__,
+ $queryInfo['options'],
+ $queryInfo['join_conds']
+ );
+ if ( !$row ) {
+ return null;
+ }
+ return self::newFromRow( $row );
+ }
+
/** @var stdClass Database result row. */
protected $row;
if ( $to === 'udp' || $to === 'rcandudp' ) {
$rc->notifyRCFeeds();
}
-
- // Log the autopatrol if the log entry is patrollable
- if ( $this->getIsPatrollable() &&
- $rc->getAttribute( 'rc_patrolled' ) === 1
- ) {
- PatrolLog::record( $rc, true, $this->getPerformer() );
- }
}
},
DeferredUpdates::POSTSEND,