r67921 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r67920‎ | r67921 | r67922 >
Date:21:04, 12 June 2010
Author:catrope
Status:ok
Tags:
Comment:
Revert r67799, per CR (it did the same thing as r64426, which was reverted in r66628)
Modified paths:
  • /trunk/phase3/skins/Vector.php (modified) (history)

Diff [purge]

Index: trunk/phase3/skins/Vector.php
@@ -693,13 +693,11 @@
694694 ?>
695695 <div id="p-namespaces" class="vectorTabs<?php if ( count( $this->data['namespace_urls'] ) == 0 ) echo ' emptyPortlet'; ?>">
696696 <h5><?php $this->msg('namespaces') ?></h5>
697 - <?php if ( count( $this->data['namespace_urls'] ) > 0 ): ?>
698697 <ul<?php $this->html('userlangattributes') ?>>
699698 <?php foreach ($this->data['namespace_urls'] as $key => $link ): ?>
700699 <li <?php echo $link['attributes'] ?>><a href="<?php echo htmlspecialchars( $link['href'] ) ?>" <?php echo $link['key'] ?>><span><?php echo htmlspecialchars( $link['text'] ) ?></span></a></li>
701700 <?php endforeach; ?>
702701 </ul>
703 - <?php endif; ?>
704702 </div>
705703 <?php
706704 break;
@@ -716,7 +714,6 @@
717715 </h4>
718716 <?php endif; ?>
719717 <h5><span><?php $this->msg('variants') ?></span><a href="#"></a></h5>
720 - <?php if ( count( $this->data['variant_urls'] ) > 0 ): ?>
721718 <div class="menu">
722719 <ul<?php $this->html('userlangattributes') ?>>
723720 <?php foreach ( $this->data['variant_urls'] as $key => $link ): ?>
@@ -724,7 +721,6 @@
725722 <?php endforeach; ?>
726723 </ul>
727724 </div>
728 - <?php endif; ?>
729725 </div>
730726 <?php
731727 break;
@@ -732,13 +728,11 @@
733729 ?>
734730 <div id="p-views" class="vectorTabs<?php if ( count( $this->data['view_urls'] ) == 0 ) echo ' emptyPortlet'; ?>">
735731 <h5><?php $this->msg('views') ?></h5>
736 - <?php if ( count( $this->data['view_urls'] ) > 0 ): ?>
737732 <ul<?php $this->html('userlangattributes') ?>>
738733 <?php foreach ( $this->data['view_urls'] as $key => $link ): ?>
739734 <li<?php echo $link['attributes'] ?>><a href="<?php echo htmlspecialchars( $link['href'] ) ?>" <?php echo $link['key'] ?>><?php echo (array_key_exists('img',$link) ? '<img src="'.$link['img'].'" alt="'.$link['text'].'" />' : '<span>'.htmlspecialchars( $link['text'] ).'</span>') ?></a></li>
740735 <?php endforeach; ?>
741736 </ul>
742 - <?php endif; ?>
743737 </div>
744738 <?php
745739 break;
@@ -746,7 +740,6 @@
747741 ?>
748742 <div id="p-cactions" class="vectorMenu<?php if ( count( $this->data['action_urls'] ) == 0 ) echo ' emptyPortlet'; ?>">
749743 <h5><span><?php $this->msg('actions') ?></span><a href="#"></a></h5>
750 - <?php if ( count( $this->data['action_urls'] ) > 0 ): ?>
751744 <div class="menu">
752745 <ul<?php $this->html('userlangattributes') ?>>
753746 <?php foreach ($this->data['action_urls'] as $key => $link ): ?>
@@ -754,7 +747,6 @@
755748 <?php endforeach; ?>
756749 </ul>
757750 </div>
758 - <?php endif; ?>
759751 </div>
760752 <?php
761753 break;
@@ -762,13 +754,11 @@
763755 ?>
764756 <div id="p-personal" class="<?php if ( count( $this->data['personal_urls'] ) == 0 ) echo ' emptyPortlet'; ?>">
765757 <h5><?php $this->msg('personaltools') ?></h5>
766 - <?php if ( count( $this->data['personal_urls'] ) > 0 ): ?>
767758 <ul<?php $this->html('userlangattributes') ?>>
768759 <?php foreach($this->data['personal_urls'] as $key => $item): ?>
769760 <li <?php echo $item['attributes'] ?>><a href="<?php echo htmlspecialchars($item['href']) ?>"<?php echo $item['key'] ?><?php if(!empty($item['class'])): ?> class="<?php echo htmlspecialchars($item['class']) ?>"<?php endif; ?>><?php echo htmlspecialchars($item['text']) ?></a></li>
770761 <?php endforeach; ?>
771762 </ul>
772 - <?php endif; ?>
773763 </div>
774764 <?php
775765 break;

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r64426Ensures empty UL elements are never included in output by testing if menus ha...tparscal06:48, 31 March 2010
r66628Revert r64426: caused bug 23581 (CollapsibleTabs breakage) for reasons noted ...catrope21:38, 18 May 2010
r67799Do not show empty <ul>platonides11:29, 10 June 2010

Status & tagging log