protected $rclistOpen;
protected $rcMoveIndex;
+ /** @var callable */
+ protected $changeLinePrefixer;
+
/** @var BagOStuff */
protected $watchMsgCache;
*
* @since 1.27
*
- * @param RecentChange $rc Passed by reference
+ * @param RecentChange &$rc Passed by reference
* @param bool $watched (default false)
* @param int $linenumber (default null)
*
* @return array of classes
*/
protected function getHTMLClasses( $rc, $watched ) {
- $classes = [];
+ $classes = [ self::CSS_CLASS_PREFIX . 'line' ];
$logType = $rc->mAttribs['rc_log_type'];
if ( $logType ) {
+ $classes[] = self::CSS_CLASS_PREFIX . 'log';
$classes[] = Sanitizer::escapeClass( self::CSS_CLASS_PREFIX . 'log-' . $logType );
} else {
+ $classes[] = self::CSS_CLASS_PREFIX . 'edit';
$classes[] = Sanitizer::escapeClass( self::CSS_CLASS_PREFIX . 'ns' .
$rc->mAttribs['rc_namespace'] . '-' . $rc->mAttribs['rc_title'] );
$classes[] = Sanitizer::escapeClass( self::CSS_CLASS_PREFIX . 'ns-' .
}
/**
- * @param string $s HTML to update
+ * @param string &$s HTML to update
* @param mixed $rc_timestamp
*/
public function insertDateHeader( &$s, $rc_timestamp ) {
}
/**
- * @param string $s HTML to update
+ * @param string &$s HTML to update
* @param Title $title
* @param string $logtype
*/
}
/**
- * @param string $s HTML to update
- * @param RecentChange $rc
+ * @param string &$s HTML to update
+ * @param RecentChange &$rc
* @param bool|null $unpatrolled Unused variable, since 1.27.
*/
public function insertDiffHist( &$s, &$rc, $unpatrolled = null ) {
}
/**
- * @param string $s Article link will be appended to this string, in place.
+ * @param string &$s Article link will be appended to this string, in place.
* @param RecentChange $rc
* @param bool $unpatrolled
* @param bool $watched
}
/**
- * @param RecentChange $rc
+ * @param RecentChange &$rc
* @param bool $unpatrolled
* @param bool $watched
* @return string HTML
/**
* Insert time timestamp string from $rc into $s
*
- * @param string $s HTML to update
+ * @param string &$s HTML to update
* @param RecentChange $rc
*/
public function insertTimestamp( &$s, $rc ) {
/** Inserts a rollback link
*
- * @param string $s
- * @param RecentChange $rc
+ * @param string &$s
+ * @param RecentChange &$rc
*/
public function insertRollback( &$s, &$rc ) {
if ( $rc->mAttribs['rc_type'] == RC_EDIT
}
/**
- * @param string $s
- * @param RecentChange $rc
- * @param array $classes
+ * @param string &$s
+ * @param RecentChange &$rc
+ * @param array &$classes
*/
public function insertTags( &$s, &$rc, &$classes ) {
if ( empty( $rc->mAttribs['ts_tags'] ) ) {
/**
* @param RecentChange $rc
- * @param array $classes
+ * @param array &$classes
* @return string
* @since 1.26
*/
return $attrs;
}
+
+ /**
+ * Sets the callable that generates a change line prefix added to the beginning of each line.
+ *
+ * @param callable $prefixer Callable to run that generates the change line prefix.
+ * Takes three parameters: a RecentChange object, a ChangesList object,
+ * and whether the current entry is a grouped entry.
+ */
+ public function setChangeLinePrefixer( callable $prefixer ) {
+ $this->changeLinePrefixer = $prefixer;
+ }
}