Robert Vogel has uploaded a new change for review.
https://gerrit.wikimedia.org/r/223800
Change subject: ContextMenu: Moved link data attributes to BSF
......................................................................
ContextMenu: Moved link data attributes to BSF
As the PDF Export depends on them we need those in the foundation.
Change-Id: Ie088b0e5a29ea54655def518839afce165c3fcf2
---
M ContextMenu/ContextMenu.class.php
1 file changed, 0 insertions(+), 24 deletions(-)
git pull
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceExtensions
refs/changes/00/223800/1
diff --git a/ContextMenu/ContextMenu.class.php
b/ContextMenu/ContextMenu.class.php
index aa777dd..1ba426e 100644
--- a/ContextMenu/ContextMenu.class.php
+++ b/ContextMenu/ContextMenu.class.php
@@ -63,7 +63,6 @@
*/
protected function initExt() {
$this->setHook('BeforePageDisplay');
- $this->setHook('LinkerMakeMediaLinkFile');
$this->setHook('LinkEnd');
$this->setHook('ThumbnailBeforeProduceHTML');
@@ -106,29 +105,6 @@
}
$out->addJsConfigVars( 'bsUserCanSendMail', $bUserCanSendMail );
-
- return true;
- }
-
- /**
- * Adds data attributes to media link tags
- * THIS IS FOR FUTURE USE: The hook is available starting with MW 1.24!
- * @param Title $title
- * @param File $file The File object
- * @param string $html The content of the resulting anchor tag
- * @param array $attribs An array of attributes that will be used in
the resulting anchor tag
- * @param string $ret The HTML output in case the handler returns false
- * @return boolean Always true to keep hook running
- */
- public function onLinkerMakeMediaLinkFile( $title, $file, &$html,
&$attribs, &$ret ) {
-
- $attribs['data-bs-title'] = $title->getPrefixedText();
- if( $file instanceof File ) {
- $attribs['data-bs-filename'] = $file->getName();
- }
- else {
- $attribs['data-bs-filename'] = $title->getText();
- }
return true;
}
--
To view, visit https://gerrit.wikimedia.org/r/223800
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie088b0e5a29ea54655def518839afce165c3fcf2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: master
Gerrit-Owner: Robert Vogel <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits