);
$download = $this->msg( 'parentheses' )->rawParams( $download )->escaped();
+ // Add delete links if allowed
+ // From https://github.com/Wikia/app/pull/3859
+ if ( $filePage->userCan( 'delete', $this->getUser() ) ) {
+ $deleteMsg = $this->msg( 'listfiles-delete' )->escaped();
+
+ $delete = Linker::linkKnown(
+ $filePage, $deleteMsg, array(), array( 'action' => 'delete' )
+ );
+ $delete = $this->msg( 'parentheses' )->rawParams( $delete )->escaped();
+
+ return "$link $download $delete";
+ }
+
return "$link $download";
} else {
return htmlspecialchars( $value );
"license-nopreview": "(Preview not available)",
"upload_source_url": "(a valid, publicly accessible URL)",
"upload_source_file": "(a file on your computer)",
+ "listfiles-delete": "delete",
"listfiles-summary": "This special page shows all uploaded files.",
"listfiles_search_for": "Search for media name:",
"imgfile": "file",
"license-nopreview": "Error message when a certain license does not exist",
"upload_source_url": "Used in [[Special:Upload]].\n\nSee also:\n* {{msg-mw|Sourcefilename|label}}\n* {{msg-mw|Sourceurl|label}}\n* {{msg-mw|Upload source file}}\n* {{msg-mw|Upload-maxfilesize}}",
"upload_source_file": "Used in [[Special:Upload]].\n\nSee also:\n* {{msg-mw|Sourcefilename|label}}\n* {{msg-mw|Sourceurl|label}}\n* {{msg-mw|Upload source url}}\n* {{msg-mw|Upload-maxfilesize}}",
+ "listfiles-delete": "Text of the delete links next to the entries on [[Special:ListFiles]], surrounded by parentheses.",
"listfiles-summary": "This message is displayed at the top of [[Special:ImageList]] to explain how to use that special page.",
"listfiles_search_for": "Input label for the form displayed on [[Special:ListFiles]].",
"imgfile": "{{Identical|File}}",