[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Make ImagePage#getThumbPrevText and ImagePage#makeSizeLink p...
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/399574 ) Change subject: Make ImagePage#getThumbPrevText and ImagePage#makeSizeLink protected instead of private .. Make ImagePage#getThumbPrevText and ImagePage#makeSizeLink protected instead of private So that extensions wishing to modify ImagePage#openShowImage() that want to preserve most of the existing functionality (at least in certain contexts) do not have to copypaste these two methods over. ImagePage#openShowImage() itself is ridiculously large and it's absurd that to change a few things there you need to copy over the whole giant block of code, but that's a separate matter. Inspired by wikiHow's WikihowImagePage extension and their associated core hacks to ImagePage.php, which hopefully won't be needed in the future. Change-Id: Ic5e16acfc2cf4683154a60a3eaa9df69d30d03cb --- M includes/page/ImagePage.php 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/page/ImagePage.php b/includes/page/ImagePage.php index 1dcdc65..8724c45 100644 --- a/includes/page/ImagePage.php +++ b/includes/page/ImagePage.php @@ -632,7 +632,7 @@ * @param string $sizeLinkBigImagePreview HTML for the current size * @return string HTML output */ - private function getThumbPrevText( $params, $sizeLinkBigImagePreview ) { + protected function getThumbPrevText( $params, $sizeLinkBigImagePreview ) { if ( $sizeLinkBigImagePreview ) { // Show a different message of preview is different format from original. $previewTypeDiffers = false; @@ -670,7 +670,7 @@ * @param int $height * @return string */ - private function makeSizeLink( $params, $width, $height ) { + protected function makeSizeLink( $params, $width, $height ) { $params['width'] = $width; $params['height'] = $height; $thumbnail = $this->displayImg->transform( $params ); -- To view, visit https://gerrit.wikimedia.org/r/399574 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic5e16acfc2cf4683154a60a3eaa9df69d30d03cb Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Jack Phoenix Gerrit-Reviewer: Legoktm Gerrit-Reviewer: Thiemo Kreuz (WMDE) Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Make ImagePage#getThumbPrevText and ImagePage#makeSizeLink p...
Jack Phoenix has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/399574 ) Change subject: Make ImagePage#getThumbPrevText and ImagePage#makeSizeLink protected instead of private .. Make ImagePage#getThumbPrevText and ImagePage#makeSizeLink protected instead of private So that extensions wishing to modify ImagePage#openShowImage() that want to preserve most of the existing functionality (at least in certain contexts) do not have to copypaste these two methods over. ImagePage#openShowImage() itself is ridiculously large and it's absurd that to change a few things there you need to copy over the whole giant block of code, but that's a separate matter. Inspired by wikiHow's WikihowImagePage extension and their associated core hacks to ImagePage.php, which hopefully won't be needed in the future. Change-Id: Ic5e16acfc2cf4683154a60a3eaa9df69d30d03cb --- M includes/page/ImagePage.php 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/74/399574/1 diff --git a/includes/page/ImagePage.php b/includes/page/ImagePage.php index 1dcdc65..8724c45 100644 --- a/includes/page/ImagePage.php +++ b/includes/page/ImagePage.php @@ -632,7 +632,7 @@ * @param string $sizeLinkBigImagePreview HTML for the current size * @return string HTML output */ - private function getThumbPrevText( $params, $sizeLinkBigImagePreview ) { + protected function getThumbPrevText( $params, $sizeLinkBigImagePreview ) { if ( $sizeLinkBigImagePreview ) { // Show a different message of preview is different format from original. $previewTypeDiffers = false; @@ -670,7 +670,7 @@ * @param int $height * @return string */ - private function makeSizeLink( $params, $width, $height ) { + protected function makeSizeLink( $params, $width, $height ) { $params['width'] = $width; $params['height'] = $height; $thumbnail = $this->displayImg->transform( $params ); -- To view, visit https://gerrit.wikimedia.org/r/399574 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic5e16acfc2cf4683154a60a3eaa9df69d30d03cb Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Jack Phoenix ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits