Use existing function. Now without PHP error. Thanks to Ialex.
authorRaimond Spekking <raymond@users.mediawiki.org>
Sun, 9 Nov 2008 21:44:56 +0000 (21:44 +0000)
committerRaimond Spekking <raymond@users.mediawiki.org>
Sun, 9 Nov 2008 21:44:56 +0000 (21:44 +0000)
includes/ChangesList.php

index c438b58..84596ed 100644 (file)
@@ -186,11 +186,8 @@ class ChangesList {
                } else {
                        $articlelink = ' '. $this->skin->makeKnownLinkObj( $rc->getTitle(), '', $params );
                }
-               if( $watched ) {
-                       $articlelink = "<strong class=\"mw-watched\">{$articlelink}</strong>";
-               } else {
-                       $articlelink = '<span class="mw-rc-unwatched">' . $articlelink . '</span>';
-               }
+               $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 '<strong class="mw-watched">' . $link . '</strong>';
+               } else {
+                       return '<span class="mw-rc-unwatched">' . $link . '</span>';
+               }
+       }
 }
 
 
@@ -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 '<strong class="mw-watched">' . $link . '</strong>';
-               } else {
-                       return '<span class="mw-rc-unwatched">' . $link . '</span>';
-               }
-       }
-
        /**
         * Generate HTML for an arrow or placeholder graphic
         * @param string $dir one of '', 'd', 'l', 'r'