r56002 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r56001‎ | r56002 | r56003 >
Date:22:43, 7 September 2009
Author:werdna
Status:deferred
Tags:
Comment:
Don't display a header delete link for non-admins :)
Modified paths:
  • /trunk/extensions/LiquidThreads/lqt.js (modified) (history)
  • /trunk/extensions/LiquidThreads/pages/TalkpageView.php (modified) (history)

Diff [purge]

Index: trunk/extensions/LiquidThreads/pages/TalkpageView.php
@@ -42,9 +42,12 @@
4343 $actionLinks[] = $sk->link( $this->title,
4444 wfMsgExt( 'history_short', 'parseinline' ) . "↑",
4545 array(), array( 'action' => 'history' ) );
46 - $actionLinks[] = $sk->link( $this->title,
47 - wfMsgExt( 'delete', 'parseinline' ) . '↑',
48 - array(), array( 'action' => 'delete' ) );
 46+
 47+ if ( $wgUser->isAllowed( 'delete' ) ) {
 48+ $actionLinks[] = $sk->link( $this->title,
 49+ wfMsgExt( 'delete', 'parseinline' ) . '↑',
 50+ array(), array( 'action' => 'delete' ) );
 51+ }
4952
5053 $actions = '';
5154 foreach( $actionLinks as $link ) {
Index: trunk/extensions/LiquidThreads/lqt.js
@@ -323,7 +323,8 @@
324324
325325 if ( scrollTop > toolbarTop ) {
326326 toolbar.css( 'top', scrollTop );
327 - } else if ( toolbar.css('top') && scrollTop < toolbarTop ) {
 327+ } else if ( toolbar.css('top') && toolbar.css('top') != 'auto'
 328+ && scrollTop < toolbarTop ) {
328329 // Move back either to the start of the post, or to the scroll point
329330 if ( scrollTop > postTop ) {
330331 toolbar.css( 'top', scrollTop );

Status & tagging log