* Place a block user link in the sidebar on user pages for administrators

This commit is contained in:
Ævar Arnfjörð Bjarmason 2005-10-24 00:31:02 +00:00
parent b9ee309a83
commit e40a9daf98
2 changed files with 5 additions and 1 deletions

View 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;
}

View 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 } ?>