* Fix watch checkbox for real in Firefox 3. It still wasn't working right, due to the duplicate use of the W accesskey for the watch/unwatch tab. This is now disabled on edit.
* (bug 12441) ./maintenance/generateSitemap.php fix -fspath requiring
a trailing slash.
* (bug 12568) configuration script now produce valid XHTML.
+* The accesskey to edit a page is now disabled when editing the page, to pre-
+ vent conflicts with Safari shortcuts.
=== API changes in 1.13 ===
<h5><?php $this->msg('views') ?></h5>
<div class="pBody">
<ul>
- <?php foreach($this->data['content_actions'] as $key => $tab) { ?>
- <li id="ca-<?php echo Sanitizer::escapeId($key) ?>"<?php
- if($tab['class']) { ?> class="<?php echo htmlspecialchars($tab['class']) ?>"<?php }
- ?>><a href="<?php echo htmlspecialchars($tab['href']) ?>"<?php echo $skin->tooltipAndAccesskey('ca-'.$key) ?>><?php
- echo htmlspecialchars($tab['text']) ?></a></li>
- <?php } ?>
+ <?php foreach($this->data['content_actions'] as $key => $tab) {
+ echo '
+ <li id="ca-' . Sanitizer::escapeId($key).'"';
+ if( $tab['class'] ) {
+ echo ' class="'.htmlspecialchars($tab['class']).'"';
+ }
+ echo'><a href="'.htmlspecialchars($tab['href']).'"';
+ # We don't want to give the watch tab an accesskey if the
+ # page is being edited, because that conflicts with the
+ # accesskey on the watch checkbox. We also don't want to
+ # give the edit tab an accesskey, because that's fairly su-
+ # perfluous and conflicts with an accesskey (Ctrl-E) often
+ # used for editing in Safari.
+ if( in_array( $action, array( 'edit', 'submit' ) )
+ && in_array( $key, array( 'edit', 'watch', 'unwatch' ))) {
+ echo $skin->tooltip( "ca-$key" );
+ } else {
+ echo $skin->tooltipAndAccesskey( "ca-$key" );
+ }
+ echo '>'.htmlspecialchars($tab['text']).'</a></li>';
+ } ?>
</ul>
</div>
</div>
* @access private
*/
function execute() {
- global $wgUser;
+ global $wgUser, $wgRequest;
$this->skin = $skin = $wgUser->getSkin();
+ $action = $wgRequest->getText( 'action' );
// Suppress warnings to prevent notices about missing indexes in $this->data
wfSuppressWarnings();
<h5><?php $this->msg('views') ?></h5>
<div class="pBody">
<ul>
- <?php foreach($this->data['content_actions'] as $key => $tab) { ?>
- <li id="ca-<?php echo Sanitizer::escapeId($key) ?>"<?php
- if($tab['class']) { ?> class="<?php echo htmlspecialchars($tab['class']) ?>"<?php }
- ?>><a href="<?php echo htmlspecialchars($tab['href']) ?>"<?php echo $skin->tooltipAndAccesskey('ca-'.$key) ?>><?php
- echo htmlspecialchars($tab['text']) ?></a></li>
- <?php } ?>
+ <?php foreach($this->data['content_actions'] as $key => $tab) {
+ echo '
+ <li id="ca-' . Sanitizer::escapeId($key).'"';
+ if( $tab['class'] ) {
+ echo ' class="'.htmlspecialchars($tab['class']).'"';
+ }
+ echo'><a href="'.htmlspecialchars($tab['href']).'"';
+ # We don't want to give the watch tab an accesskey if the
+ # page is being edited, because that conflicts with the
+ # accesskey on the watch checkbox. We also don't want to
+ # give the edit tab an accesskey, because that's fairly su-
+ # perfluous and conflicts with an accesskey (Ctrl-E) often
+ # used for editing in Safari.
+ if( in_array( $action, array( 'edit', 'submit' ) )
+ && in_array( $key, array( 'edit', 'watch', 'unwatch' ))) {
+ echo $skin->tooltip( "ca-$key" );
+ } else {
+ echo $skin->tooltipAndAccesskey( "ca-$key" );
+ }
+ echo '>'.htmlspecialchars($tab['text']).'</a></li>';
+ } ?>
</ul>
</div>
</div>