From: Sam Wilson Date: Wed, 7 Aug 2019 21:09:57 +0000 (+0800) Subject: Remove single-item HTML list for re-upload link X-Git-Tag: 1.34.0-rc.0~749^2 X-Git-Url: http://git.cyclocoop.org/?a=commitdiff_plain;h=de61041e0c40f9457a7452d90a66a0b5eedadd3b;p=lhc%2Fweb%2Fwiklou.git Remove single-item HTML list for re-upload link The 'upload links box' only contains a single link (or message), so there's no need for it to be a list. This also adds a top-level class to this box, for easier CSS/JS selecting. Change-Id: I3967eea82dcd63a3e161daa13e49204e4d6dde97 --- diff --git a/includes/page/ImagePage.php b/includes/page/ImagePage.php index 16b83d1f50..4f08995212 100644 --- a/includes/page/ImagePage.php +++ b/includes/page/ImagePage.php @@ -736,13 +736,10 @@ EOT } /** - * Print out the various links at the bottom of the image page, e.g. reupload, - * external editing (and instructions link) etc. + * Add the re-upload link (or message about not being able to re-upload) to the output. */ protected function uploadLinksBox() { - global $wgEnableUploads; - - if ( !$wgEnableUploads ) { + if ( !$this->getContext()->getConfig()->get( 'EnableUploads' ) ) { return; } @@ -751,27 +748,27 @@ EOT return; } - $out = $this->getContext()->getOutput(); - $out->addHTML( "\n" ); + $uploadLinks = Html::rawElement( 'div', [ 'class' => 'mw-imagepage-upload-links' ], $linkPara ); + $this->getContext()->getOutput()->addHTML( $uploadLinks ); } /**