Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F5263
image-link.diff
Public
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Authored By
•
bzimport
Nov 21 2014, 10:24 PM
2014-11-21 22:24:26 (UTC+0)
Size
1 KB
Referenced Files
None
Subscribers
None
image-link.diff
View Options
Index: includes/MediaTransformOutput.php
===================================================================
--- includes/MediaTransformOutput.php (revision 50539)
+++ includes/MediaTransformOutput.php (working copy)
@@ -153,14 +153,15 @@
$alt = empty( $options['alt'] ) ? '' : $options['alt'];
# Note: if title is empty and alt is not, make the title empty, don't
# use alt; only use alt if title is not set
- $title = !isset( $options['title'] ) ? $alt : $options['title'];
+ $title = !isset( $options['title'] ) ? $alt : $options['title'];
$query = empty($options['desc-query']) ? '' : $options['desc-query'];
if ( !empty( $options['custom-url-link'] ) ) {
- $linkAttribs = array( 'href' => $options['custom-url-link'] );
+ $linkAttribs = array( 'href' => $options['custom-url-link'], 'title' => $alt );
} elseif ( !empty( $options['custom-title-link'] ) ) {
$title = $options['custom-title-link'];
- $linkAttribs = array( 'href' => $title->getLinkUrl(), 'title' => $title->getFullText() );
+ $linkAttribs = array( 'href' => $title->getLinkUrl(),
+ 'title' => empty( $options['alt'] ) ? $title->getFullText() : $alt );
} elseif ( !empty( $options['desc-link'] ) ) {
$linkAttribs = $this->getDescLinkAttribs( $title, $query );
} elseif ( !empty( $options['file-link'] ) ) {
File Metadata
Details
Attached
Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4824
Default Alt Text
image-link.diff (1 KB)
Attached To
Mode
T18912: Missing tooltip of images (title="" not specified)
Attached
Detach File
Event Timeline
Log In to Comment