Index: trunk/phase3/includes/Linker.php |
— | — | @@ -1674,10 +1674,16 @@ |
1675 | 1675 | public function accesskey( $name ) { |
1676 | 1676 | wfProfileIn( __METHOD__ ); |
1677 | 1677 | |
1678 | | - if ( wfEmptyMsg( "accesskey-$name" ) ) { |
| 1678 | + if ( isset( $this->accesskeycache[$name] ) ) { |
| 1679 | + return $this->accesskeycache[$name]; |
| 1680 | + } |
| 1681 | + |
| 1682 | + $message = wfMessage( "accesskey-$name" ); |
| 1683 | + |
| 1684 | + if ( !$message->exists() ) { |
1679 | 1685 | $accesskey = false; |
1680 | 1686 | } else { |
1681 | | - $accesskey = wfMsg( "accesskey-$name" ); |
| 1687 | + $accesskey = $message->plain(); |
1682 | 1688 | if ( $accesskey === '' || $accesskey === '-' ) { |
1683 | 1689 | # FIXME: Per standard MW behavior, a value of '-' means to suppress the |
1684 | 1690 | # attribute, but this is broken for accesskey: that might be a useful |
— | — | @@ -1687,7 +1693,7 @@ |
1688 | 1694 | } |
1689 | 1695 | |
1690 | 1696 | wfProfileOut( __METHOD__ ); |
1691 | | - return $accesskey; |
| 1697 | + return $this->accesskeycache[$name] = $accesskey; |
1692 | 1698 | } |
1693 | 1699 | |
1694 | 1700 | /** |