Merge "mediawiki.ui: Remove deployment hack"
[lhc/web/wiklou.git] / includes / specials / SpecialEditWatchlist.php
index 73438d9..3656b9c 100644 (file)
@@ -553,7 +553,15 @@ class SpecialEditWatchlist extends UnlistedSpecialPage {
                $fields = array();
                $count = 0;
 
-               foreach ( $this->getWatchlistInfo() as $namespace => $pages ) {
+               // Allow subscribers to manipulate the list of watched pages (or use it
+               // to preload lots of details at once)
+               $watchlistInfo = $this->getWatchlistInfo();
+               wfRunHooks(
+                       'WatchlistEditorBeforeFormRender',
+                       array( &$watchlistInfo )
+               );
+
+               foreach ( $watchlistInfo as $namespace => $pages ) {
                        $options = array();
 
                        foreach ( array_keys( $pages ) as $dbkey ) {
@@ -620,10 +628,10 @@ class SpecialEditWatchlist extends UnlistedSpecialPage {
        private function buildRemoveLine( $title ) {
                $link = Linker::link( $title );
 
-               $tools[] = Linker::link( $title->getTalkPage(), $this->msg( 'talkpagelinktext' )->escaped() );
+               $tools['talk'] = Linker::link( $title->getTalkPage(), $this->msg( 'talkpagelinktext' )->escaped() );
 
                if ( $title->exists() ) {
-                       $tools[] = Linker::linkKnown(
+                       $tools['history'] = Linker::linkKnown(
                                $title,
                                $this->msg( 'history_short' )->escaped(),
                                array(),
@@ -632,7 +640,7 @@ class SpecialEditWatchlist extends UnlistedSpecialPage {
                }
 
                if ( $title->getNamespace() == NS_USER && !$title->isSubpage() ) {
-                       $tools[] = Linker::linkKnown(
+                       $tools['contributions'] = Linker::linkKnown(
                                SpecialPage::getTitleFor( 'Contributions', $title->getText() ),
                                $this->msg( 'contributions' )->escaped()
                        );