X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Factions%2FInfoAction.php;h=a8a8317fbc1b90bffb5793a62f0bc90a45db8898;hp=62f7ddfc1a90e914fccdd0d3e4d3059dc1d47e51;hb=5aea96df5a7b55fe1be74dcc5259508b05d89577;hpb=2e248f0bb20cbdf7738a6d44a843eb546c3bbf23 diff --git a/includes/actions/InfoAction.php b/includes/actions/InfoAction.php index 62f7ddfc1a..a8a8317fbc 100644 --- a/includes/actions/InfoAction.php +++ b/includes/actions/InfoAction.php @@ -437,6 +437,18 @@ class InfoAction extends FormlessAction { ]; } + // Display image SHA-1 value + if ( $title->inNamespace( NS_FILE ) ) { + $fileObj = wfFindFile( $title ); + if ( $fileObj !== false ) { + $output = $fileObj->getSha1(); + $pageInfo['header-basic'][] = [ + $this->msg( 'pageinfo-file-hash' ), + $output + ]; + } + } + // Page protection $pageInfo['header-restrictions'] = [];