Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

bug #3504567 [mime] Description of the transformation missing in the …

…tooltip
  • Loading branch information...
commit 33d1a8dce25e59daf34eb3d1a4ece4250b75aa2a 1 parent 3cdb0e5
@madhuracj madhuracj authored
View
1  ChangeLog
@@ -74,6 +74,7 @@ phpMyAdmin - ChangeLog
- bug #3423717 [core] Improved detection of SSL connection
+ FULLTEXT support for InnoDB, starting with MySQL 5.6.4
- bug #3497151 [interface] Duplicate inline query edit box
+- bug #3504567 [mime] Description of the transformation missing in the tooltip
3.4.11.0 (not yet released)
- bug #3486970 [import] Exception on XML import
View
3  libraries/tbl_properties.inc.php
@@ -531,8 +531,7 @@
if (is_array($available_mime['transformation'])) {
foreach ($available_mime['transformation'] AS $mimekey => $transform) {
$checked = (isset($row['Field']) && isset($mime_map[$row['Field']]['transformation']) && (preg_match('@' . preg_quote($available_mime['transformation_file'][$mimekey]) . '3?@i', $mime_map[$row['Field']]['transformation'])) ? 'selected ' : '');
- $tooltip = 'strTransformation_' . strtolower(str_replace('.inc.php', '', $available_mime['transformation_file'][$mimekey]));
- $tooltip = isset($$tooltip) ? $$tooltip : sprintf(str_replace('<br />', ' ', __('No description is available for this transformation.<br />Please ask the author what %s does.')), 'PMA_transformation_' . $tooltip . '()');
+ $tooltip = PMA_getTransformationDescription($available_mime['transformation_file'][$mimekey], false);
$content_cells[$i][$ci] .= '<option value="' . $available_mime['transformation_file'][$mimekey] . '" ' . $checked . ' title="' . htmlspecialchars($tooltip) . '">' . htmlspecialchars($transform) . '</option>';
}
}
View
29 libraries/transformations.lib.php
@@ -118,6 +118,35 @@ function PMA_getAvailableMIMEtypes()
}
/**
+ * Returns the description of the transformation
+ *
+ * @param string $file transformation file
+ * @param string $html_formatted whether the description should be formatted as HTML
+ *
+ * @return the description of the transformation
+ */
+function PMA_getTransformationDescription($file, $html_formatted = true)
+{
+ include_once './libraries/transformations/' . $file;
+ $func = strtolower(str_replace('.inc.php', '', $file));
+ $funcname = 'PMA_transformation_' . $func . '_info';
+
+ $desc = sprintf(__('No description is available for this transformation.<br />Please ask the author what %s does.'), 'PMA_transformation_' . $func . '()');
+ if ($html_formatted) {
+ $desc = '<i>' . $desc . '</i>';
+ } else {
+ $desc = str_replace('<br />', ' ', $desc);
+ }
+ if (function_exists($funcname)) {
+ $desc_arr = $funcname();
+ if (isset($desc_arr['info'])) {
+ $desc = $desc_arr['info'];
+ }
+ }
+ return $desc;
+}
+
+/**
* Gets the mimetypes for all columns of a table
*
* @param string $db the name of the db to check for
View
11 transformation_overview.php
@@ -51,16 +51,7 @@
<?php
$odd_row = true;
foreach ($types['transformation'] as $key => $transform) {
- $func = strtolower(str_ireplace('.inc.php', '', $types['transformation_file'][$key]));
- include './libraries/transformations/' . $types['transformation_file'][$key];
- $funcname = 'PMA_transformation_' . $func . '_info';
- $desc = '<i>' . sprintf(__('No description is available for this transformation.<br />Please ask the author what %s does.'), 'PMA_transformation_' . $func . '()') . '</i>';
- if (function_exists($funcname)) {
- $desc_arr = $funcname();
- if (isset($desc_arr['info'])) {
- $desc = $desc_arr['info'];
- }
- }
+ $desc = PMA_getTransformationDescription($types['transformation_file'][$key]);
?>
<tr class="<?php echo $odd_row ? 'odd' : 'even'; ?>">
<td><?php echo $transform; ?></td>
Please sign in to comment.
Something went wrong with that request. Please try again.