From fbc4b1ecd3a2e02bc399f844d9bbc8eb94050c06 Mon Sep 17 00:00:00 2001 From: Raimond Spekking Date: Sun, 9 Nov 2008 21:44:56 +0000 Subject: [PATCH] Use existing function. Now without PHP error. Thanks to Ialex. --- includes/ChangesList.php | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/includes/ChangesList.php b/includes/ChangesList.php index c438b58a78..84596edb02 100644 --- a/includes/ChangesList.php +++ b/includes/ChangesList.php @@ -186,11 +186,8 @@ class ChangesList { } else { $articlelink = ' '. $this->skin->makeKnownLinkObj( $rc->getTitle(), '', $params ); } - if( $watched ) { - $articlelink = "{$articlelink}"; - } else { - $articlelink = '' . $articlelink . ''; - } + $articlelink = $this->maybeWatchedLink( $articlelink, $watched ); + global $wgContLang; $articlelink .= $wgContLang->getDirMark(); @@ -301,6 +298,15 @@ class ChangesList { return true; } } + + protected function maybeWatchedLink( $link, $watched=false ) { + if( $watched ) { + // FIXME: css style might be more appropriate + return '' . $link . ''; + } else { + return '' . $link . ''; + } + } } @@ -770,15 +776,6 @@ class EnhancedChangesList extends ChangesList { return $r; } - protected function maybeWatchedLink( $link, $watched=false ) { - if( $watched ) { - // FIXME: css style might be more appropriate - return '' . $link . ''; - } else { - return '' . $link . ''; - } - } - /** * Generate HTML for an arrow or placeholder graphic * @param string $dir one of '', 'd', 'l', 'r' -- 2.20.1