Index: branches/REL1_17/phase3/skins/Vector.php |
— | — | @@ -73,6 +73,8 @@ |
74 | 74 | $action = $wgRequest->getVal( 'action', 'view' ); |
75 | 75 | $section = $wgRequest->getVal( 'section' ); |
76 | 76 | |
| 77 | + $userCanRead = $this->mTitle->userCanRead(); |
| 78 | + |
77 | 79 | // Checks if page is some kind of content |
78 | 80 | if( $this->iscontent ) { |
79 | 81 | // Gets page objects for the related namespaces |
— | — | @@ -93,16 +95,16 @@ |
94 | 96 | |
95 | 97 | // Adds namespace links |
96 | 98 | $links['namespaces'][$subjectId] = $this->tabAction( |
97 | | - $subjectPage, 'nstab-' . $subjectId, !$isTalk, '', true |
| 99 | + $subjectPage, 'nstab-' . $subjectId, !$isTalk, '', $userCanRead |
98 | 100 | ); |
99 | 101 | $links['namespaces'][$subjectId]['context'] = 'subject'; |
100 | 102 | $links['namespaces'][$talkId] = $this->tabAction( |
101 | | - $talkPage, 'talk', $isTalk, '', true |
| 103 | + $talkPage, 'talk', $isTalk, '', $userCanRead |
102 | 104 | ); |
103 | 105 | $links['namespaces'][$talkId]['context'] = 'talk'; |
104 | 106 | |
105 | 107 | // Adds view view link |
106 | | - if ( $this->mTitle->exists() ) { |
| 108 | + if ( $this->mTitle->exists() && $userCanRead ) { |
107 | 109 | $links['views']['view'] = $this->tabAction( |
108 | 110 | $isTalk ? $talkPage : $subjectPage, |
109 | 111 | 'vector-view-view', ( $action == 'view' ), '', true |
— | — | @@ -113,8 +115,8 @@ |
114 | 116 | |
115 | 117 | // Checks if user can... |
116 | 118 | if ( |
117 | | - // edit the current page |
118 | | - $this->mTitle->quickUserCan( 'edit' ) && |
| 119 | + // read and edit the current page |
| 120 | + $userCanRead && $this->mTitle->quickUserCan( 'edit' ) && |
119 | 121 | ( |
120 | 122 | // if it exists |
121 | 123 | $this->mTitle->exists() || |
— | — | @@ -155,7 +157,7 @@ |
156 | 158 | } |
157 | 159 | } |
158 | 160 | // Checks if the page has some kind of viewable content |
159 | | - } elseif ( $this->mTitle->hasSourceText() ) { |
| 161 | + } elseif ( $this->mTitle->hasSourceText() && $userCanRead ) { |
160 | 162 | // Adds view source view link |
161 | 163 | $links['views']['viewsource'] = array( |
162 | 164 | 'class' => ( $action == 'edit' ) ? 'selected' : false, |
— | — | @@ -169,7 +171,7 @@ |
170 | 172 | wfProfileIn( __METHOD__ . '-live' ); |
171 | 173 | |
172 | 174 | // Checks if the page exists |
173 | | - if ( $this->mTitle->exists() ) { |
| 175 | + if ( $this->mTitle->exists() && $userCanRead ) { |
174 | 176 | // Adds history view link |
175 | 177 | $links['views']['history'] = array( |
176 | 178 | 'class' => 'collapsible ' . ( ( $action == 'history' ) ? 'selected' : false ), |
— | — | @@ -766,8 +768,13 @@ |
767 | 769 | <input type='hidden' name="title" value="<?php $this->text( 'searchtitle' ) ?>"/> |
768 | 770 | <?php if ( $wgVectorUseSimpleSearch && $wgUser->getOption( 'vector-simplesearch' ) ): ?> |
769 | 771 | <div id="simpleSearch"> |
| 772 | + <?php if ( $this->data['rtl'] ): ?> |
| 773 | + <button id="searchButton" type='submit' name='button' <?php echo $this->skin->tooltipAndAccesskey( 'search-fulltext' ); ?>><img src="<?php echo $this->skin->getSkinStylePath('images/search-rtl.png'); ?>" alt="<?php $this->msg( 'searchbutton' ) ?>" /></button> |
| 774 | + <?php endif; ?> |
770 | 775 | <input id="searchInput" name="search" type="text" <?php echo $this->skin->tooltipAndAccesskey( 'search' ); ?> <?php if( isset( $this->data['search'] ) ): ?> value="<?php $this->text( 'search' ) ?>"<?php endif; ?> /> |
771 | | - <button id="searchButton" type='submit' name='button' <?php echo $this->skin->tooltipAndAccesskey( 'search-fulltext' ); ?>><img src="<?php echo $this->skin->getSkinStylePath('images/search-' . ( $this->data['rtl'] ? 'rtl' : 'ltr' ) . '.png'); ?>" alt="<?php $this->msg( 'searchbutton' ) ?>" /></button> |
| 776 | + <?php if ( !$this->data['rtl'] ): ?> |
| 777 | + <button id="searchButton" type='submit' name='button' <?php echo $this->skin->tooltipAndAccesskey( 'search-fulltext' ); ?>><img src="<?php echo $this->skin->getSkinStylePath('images/search-ltr.png'); ?>" alt="<?php $this->msg( 'searchbutton' ) ?>" /></button> |
| 778 | + <?php endif; ?> |
772 | 779 | </div> |
773 | 780 | <?php else: ?> |
774 | 781 | <input id="searchInput" name="search" type="text" <?php echo $this->skin->tooltipAndAccesskey( 'search' ); ?> <?php if( isset( $this->data['search'] ) ): ?> value="<?php $this->text( 'search' ) ?>"<?php endif; ?> /> |
Property changes on: branches/REL1_17/phase3/skins/Vector.php |
___________________________________________________________________ |
Added: svn:mergeinfo |
775 | 782 | Merged /branches/sqlite/skins/Vector.php:r58211-58321 |
776 | 783 | Merged /trunk/phase3/skins/Vector.php:r78117,78170,78172,78506 |
777 | 784 | Merged /branches/new-installer/phase3/skins/Vector.php:r43664-66004 |
778 | 785 | Merged /branches/REL1_15/phase3/skins/Vector.php:r51646 |