Index: trunk/phase3/skins/CologneBlue.php |
— | — | @@ -307,8 +307,8 @@ |
308 | 308 | . $this->specialLink( 'newpages' ) |
309 | 309 | . $sep . $this->specialLink( 'listfiles' ) |
310 | 310 | . $sep . $this->specialLink( 'statistics' ); |
311 | | - if ( $wgUser->isLoggedIn() && $wgEnableUploads ) { |
312 | | - $s .= $sep . $this->specialLink( 'upload' ); |
| 311 | + if( UploadBase::isEnabled() && UploadBase::isAllowed( $wgUser ) === true ) { |
| 312 | + $s .= $sep . $this->uploadLink(); |
313 | 313 | } |
314 | 314 | |
315 | 315 | global $wgSiteSupportPage; |
Index: trunk/phase3/skins/Standard.php |
— | — | @@ -264,9 +264,10 @@ |
265 | 265 | $s .= "\n<br /><hr class='sep' />"; |
266 | 266 | } |
267 | 267 | |
268 | | - if ( $wgUser->isLoggedIn() && ( $wgEnableUploads || $wgRemoteUploads ) ) { |
269 | | - $s .= $this->specialLink( 'upload' ) . $sep; |
| 268 | + if( UploadBase::isEnabled() && UploadBase::isAllowed( $wgUser ) === true ) { |
| 269 | + $s .= $this->uploadLink() . $sep; |
270 | 270 | } |
| 271 | + |
271 | 272 | $s .= $this->specialLink( 'specialpages' ); |
272 | 273 | |
273 | 274 | global $wgSiteSupportPage; |
Index: trunk/phase3/skins/Nostalgia.php |
— | — | @@ -89,9 +89,10 @@ |
90 | 90 | /* show my preferences link */ |
91 | 91 | $s .= $sep . $this->specialLink( 'preferences' ); |
92 | 92 | /* show upload file link */ |
93 | | - if ( $wgEnableUploads ) { |
94 | | - $s .= $sep . $this->specialLink( 'upload' ); |
| 93 | + if( UploadBase::isEnabled() && UploadBase::isAllowed( $wgUser ) === true ) { |
| 94 | + $s .= $sep . $this->uploadLink(); |
95 | 95 | } |
| 96 | + |
96 | 97 | /* show log out link */ |
97 | 98 | $s .= $sep . $this->specialLink( 'userlogout' ); |
98 | 99 | } |
Index: trunk/phase3/includes/Skin.php |
— | — | @@ -1988,6 +1988,25 @@ |
1989 | 1989 | ); |
1990 | 1990 | } |
1991 | 1991 | |
| 1992 | + function uploadLink() { |
| 1993 | + global $wgUploadNavigationUrl; |
| 1994 | + |
| 1995 | + if( $wgUploadNavigationUrl ) { |
| 1996 | + $title = Title::newFromText( $wgUploadNavigationUrl ); |
| 1997 | + } |
| 1998 | + if( !$title ) { |
| 1999 | + $title = SpecialPage::getTitleFor('Upload'); |
| 2000 | + } |
| 2001 | + |
| 2002 | + return $this->link( |
| 2003 | + $title, |
| 2004 | + wfMsgHtml( 'upload' ), |
| 2005 | + array(), |
| 2006 | + array(), |
| 2007 | + array( 'known', 'noclasses' ) |
| 2008 | + ); |
| 2009 | + } |
| 2010 | + |
1992 | 2011 | /* these are used extensively in SkinTemplate, but also some other places */ |
1993 | 2012 | static function makeMainPageUrl( $urlaction = '' ) { |
1994 | 2013 | $title = Title::newMainPage(); |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -166,6 +166,7 @@ |
167 | 167 | * Special:Userrights didn't recognize user as changing his/her own rights if user did not capitalize first letter of username. |
168 | 168 | * (bug 23507) Add styles for printing wikitables |
169 | 169 | * (bug 19586) Avoid JS errors in mwsuggest when using old browsers such as Opera 8. |
| 170 | +* (bug 23563) Old skins now support $wgUploadNavigationUrl and take into account upload rights. |
170 | 171 | |
171 | 172 | === API changes in 1.17 === |
172 | 173 | * (bug 22738) Allow filtering by action type on query=logevent |