* Place a block user link in the sidebar on user pages for administrators
authorÆvar Arnfjörð Bjarmason <avar@users.mediawiki.org>
Mon, 24 Oct 2005 00:31:02 +0000 (00:31 +0000)
committerÆvar Arnfjörð Bjarmason <avar@users.mediawiki.org>
Mon, 24 Oct 2005 00:31:02 +0000 (00:31 +0000)
includes/SkinTemplate.php
skins/MonoBook.php

index 812d94e..3074d3a 100644 (file)
@@ -852,6 +852,10 @@ class SkinTemplate extends Skin {
                        $nav_urls['contributions'] = array(
                                'href' => $this->makeSpecialUrl('Contributions/' . $this->mTitle->getText() )
                        );
+                       if ( $wgUser->isAllowed( 'protect' ) )
+                               $nav_urls['blockip'] = array(
+                                       'href' => $this->makeSpecialUrl( 'Blockip/' . $this->mTitle->getText() )
+                               );
                } else {
                        $nav_urls['contributions'] = false;
                }
index 3eab60c..a1460f7 100644 (file)
@@ -177,7 +177,7 @@ class MonoBookTemplate extends QuickTemplate {
                ?><span id="feed-<?php echo htmlspecialchars($key) ?>"><a href="<?php
                echo htmlspecialchars($feed['href']) ?>"><?php echo htmlspecialchars($feed['text'])?></a>&nbsp;</span>
                <?php } ?></li><?php } ?>
-             <?php foreach( array('contributions', 'emailuser', 'upload', 'specialpages') as $special ) { ?>
+             <?php foreach( array('contributions', 'blockip', 'emailuser', 'upload', 'specialpages') as $special ) { ?>
              <?php if($this->data['nav_urls'][$special]) {?><li id="t-<?php echo $special ?>"><a href="<?php
                echo htmlspecialchars($this->data['nav_urls'][$special]['href'])
                ?>"><?php $this->msg($special) ?></a></li><?php } ?>