}
/**
- * @param string $s HTML to update
+ * @param string $s Article link will be appended to this string, in place.
* @param RecentChange $rc
* @param bool $unpatrolled
* @param bool $watched
+ * @deprecated since 1.27, use getArticleLink instead.
*/
- public function insertArticleLink( &$s, &$rc, $unpatrolled, $watched ) {
+ public function insertArticleLink( &$s, RecentChange $rc, $unpatrolled, $watched ) {
+ $s .= $this->getArticleLink( $rc, $unpatrolled, $watched );
+ }
+
+ /**
+ * @param RecentChange $rc
+ * @param bool $unpatrolled
+ * @param bool $watched
+ * @return string HTML
+ * @since 1.26
+ */
+ public function getArticleLink( &$rc, $unpatrolled, $watched ) {
$params = array();
if ( $rc->getTitle()->isRedirect() ) {
$params = array( 'redirect' => 'no' );
# RTL/LTR marker
$articlelink .= $this->getLanguage()->getDirMark();
+ # TODO: Deprecate the $s argument, it seems happily unused.
+ $s = '';
Hooks::run( 'ChangesListInsertArticleLink',
array( &$this, &$articlelink, &$s, &$rc, $unpatrolled, $watched ) );
- $s .= " $articlelink";
- }
-
- /**
- * @param RecentChange $rc
- * @param bool $unpatrolled
- * @param bool $watched
- * @return string
- * @since 1.26
- */
- public function getArticleLink( RecentChange $rc, $unpatrolled, $watched ) {
- $s = '';
- $this->insertArticleLink( $s, $rc, $unpatrolled, $watched );
- return $s;
+ return "{$s} {$articlelink}";
}
/**