X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=skins%2FMonoBook.php;h=018a81030b4d4af27bbefbbc1a5d07917dfb8da9;hb=b974497da87c899ed96009003f39860a5e9703cd;hp=e3e2e9a3b0401ed629a34c3c5da9df4e4c23a10d;hpb=3e7309606dbf4afe231dfdca19c4fc59e712b83e;p=lhc%2Fweb%2Fwiklou.git diff --git a/skins/MonoBook.php b/skins/MonoBook.php index e3e2e9a3b0..018a81030b 100644 --- a/skins/MonoBook.php +++ b/skins/MonoBook.php @@ -51,8 +51,13 @@ class SkinMonoBook extends SkinTemplate { * @todo document * @ingroup Skins */ -class MonoBookTemplate extends QuickTemplate { +class MonoBookTemplate extends BaseTemplate { + + /** + * @var Skin + */ var $skin; + /** * Template filter callback for MonoBook skin. * Takes an associative array of data set from a SkinTemplate-based @@ -62,35 +67,11 @@ class MonoBookTemplate extends QuickTemplate { * @access private */ function execute() { - global $wgRequest; - $this->skin = $skin = $this->data['skin']; - $action = $wgRequest->getText( 'action' ); // Suppress warnings to prevent notices about missing indexes in $this->data wfSuppressWarnings(); - // Generate additional footer links - $footerlinks = $this->data["footerlinks"]; - // fold footerlinks into a single array using a bit of trickery - $footerlinks = call_user_func_array('array_merge', array_values($footerlinks)); - // Generate additional footer icons - $footericons = $this->data["footericons"]; - // Unset any icons which don't have an image - foreach ( $footericons as $footerIconsKey => &$footerIconsBlock ) { - foreach ( $footerIconsBlock as $footerIconKey => $footerIcon ) { - if ( !is_string($footerIcon) && !isset($footerIcon["src"]) ) { - unset($footerIconsBlock[$footerIconKey]); - } - } - } - // Redo removal of any empty blocks - foreach ( $footericons as $footerIconsKey => &$footerIconsBlock ) { - if ( count($footerIconsBlock) <= 0 ) { - unset($footericons[$footerIconsKey]); - } - } - $this->html( 'headelement' ); ?>
html("specialpageattributes") ?>> @@ -117,54 +98,26 @@ class MonoBookTemplate extends QuickTemplate {
html('userlangattributes') ?>> -
-
msg('views') ?>
- -
+cactions( $skin ); ?>
msg('personaltools') ?>
html('userlangattributes') ?>> -data['personal_urls'] as $key => $item) { ?> -
  • " class="active">tooltipAndAccesskey('pt-'.$key) ?> class="">
  • - +getPersonalTools() as $key => $item) { ?> + makeListItem($key, $item); ?> + +
    -html('bottomscripts'); /* JS call to runBodyOnloadHook */ ?> -html('reporttime') ?> -data['debug'] ): ?> - -printTrail(); echo Html::closeElement( 'body' ); echo Html::closeElement( 'html' ); wfRestoreWarnings(); @@ -253,19 +182,15 @@ class MonoBookTemplate extends QuickTemplate {
    - data['search'] ) ? $this->data['search'] : '', 'search', - array( - 'id' => 'searchInput', - 'title' => $this->skin->titleAttrib( 'search' ), - 'accesskey' => $this->skin->accesskey( 'search' ) - ) ); ?> + makeSearchInput(array( "id" => "searchInput" )); ?> - skin->tooltipAndAccesskey( 'search-go' ); ?> />  - skin->tooltipAndAccesskey( 'search-fulltext' ); ?> /> + makeSearchButton("go", array( "id" => "searchGoButton", "class" => "searchButton" )); + if ($wgUseTwoButtonsSearchForm): ?>  + makeSearchButton("fulltext", array( "id" => "mw-searchButton", "class" => "searchButton" )); + else: ?> -
    +
    @@ -273,6 +198,43 @@ class MonoBookTemplate extends QuickTemplate { +
    +
    msg('views') ?>
    +
    + +
    +
    + @@ -281,49 +243,11 @@ class MonoBookTemplate extends QuickTemplate {