* (bug 22364) Setting $wgUseExternalEditor to false no longer hides the reupload...
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Fri, 5 Feb 2010 14:07:18 +0000 (14:07 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Fri, 5 Feb 2010 14:07:18 +0000 (14:07 +0000)
RELEASE-NOTES
includes/ImagePage.php

index 292dbe4..30ff67c 100644 (file)
@@ -739,6 +739,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 21518) Special:UserRights no longer displays the user name box for users
   that can only change their rights
 * (bug 21593) Special:UserRights now lists automatic groups membership
+* (bug 22364) Setting $wgUseExternalEditor to false no longer hides the reupload
+  link from file pages
 
 == API changes in 1.16 ==
 
index 40cbe7c..dd2c2ab 100644 (file)
@@ -551,7 +551,7 @@ EOT
         * external editing (and instructions link) etc.
         */
        protected function uploadLinksBox() {
-               global $wgUser, $wgOut, $wgEnableUploads;
+               global $wgUser, $wgOut, $wgEnableUploads, $wgUseExternalEditor;
 
                if( !$wgEnableUploads ) { return; }
 
@@ -570,18 +570,20 @@ EOT
                }
 
                # External editing link
-               $elink = $sk->link(
-                       $this->mTitle,
-                       wfMsgHtml( 'edit-externally' ),
-                       array(),
-                       array(
-                               'action' => 'edit',
-                               'externaledit' => 'true',
-                               'mode' => 'file'
-                       ),
-                       array( 'known', 'noclasses' )
-               );
-               $wgOut->addHTML( '<li id="mw-imagepage-edit-external">' . $elink . ' <small>' . wfMsgExt( 'edit-externally-help', array( 'parseinline' ) ) . "</small></li>\n" );
+               if ( $wgUseExternalEditor ) {
+                       $elink = $sk->link(
+                               $this->mTitle,
+                               wfMsgHtml( 'edit-externally' ),
+                               array(),
+                               array(
+                                       'action' => 'edit',
+                                       'externaledit' => 'true',
+                                       'mode' => 'file'
+                               ),
+                               array( 'known', 'noclasses' )
+                       );
+                       $wgOut->addHTML( '<li id="mw-imagepage-edit-external">' . $elink . ' <small>' . wfMsgExt( 'edit-externally-help', array( 'parseinline' ) ) . "</small></li>\n" );
+               }
 
                $wgOut->addHTML( "</ul>\n" );
        }
@@ -593,7 +595,7 @@ EOT
         * we follow it with an upload history of the image and its usage.
         */
        protected function imageHistory() {
-               global $wgOut, $wgUseExternalEditor;
+               global $wgOut;
 
                $this->loadFile();
                $pager = new ImageHistoryPseudoPager( $this );
@@ -603,7 +605,7 @@ EOT
 
                # Exist check because we don't want to show this on pages where an image
                # doesn't exist along with the noimage message, that would suck. -ævar
-               if( $wgUseExternalEditor && $this->img->exists() ) {
+               if( $this->img->exists() ) {
                        $this->uploadLinksBox();
                }
        }