diff --git a/ChangeLog b/ChangeLog index 924d53f31..2bcc82814 100755 --- a/ChangeLog +++ b/ChangeLog @@ -16,14 +16,17 @@ $Source$ Fix empty table rows in vertical display (kept Mozilla from displaying borders in this printmode). Adjusted layout a tiny-weeny bit to let the comments of a field fit the whole space. + * libraries/display_tbl.lib.php3, libraries/transformations/TEMPLATE, + Documentation.html: Propagate current MIME-type to plugin functions. + Thanks for noticing (again), Thiemo. :) 2003-11-06 Michal Cihar - * libraries/export/xml.php3: Add xml header with encoding information + * libraries/export/xml.php3: Add xml header with encoding information (bug #836630). 2003-11-05 Garvin Hicking - * libraries/common.lib.php3, footer.inc.php3: Bug #831181: Do not - store queries with errors in history, also when coming from the + * libraries/common.lib.php3, footer.inc.php3: Bug #831181: Do not + store queries with errors in history, also when coming from the database SQL tab. * libraries/common.lib.php3: Bug #835854. The MySQL-error messages are now put inside a HTML-container, not
. This allows
diff --git a/Documentation.html b/Documentation.html
index 31968d73d..f4aa0d947 100755
--- a/Documentation.html
+++ b/Documentation.html
@@ -553,7 +553,7 @@ $cfg['PmaAbsoluteUri'] = (!empty($_SERVER['HTTPS']) ? 'https' : 'http') . '://'
         database list. But it does not replace the
         privileges rules of the MySQL database server. If set, it just
         means only these databases will be displayed but
-        not at all other databases can't be used.
+        not that all other databases can't be used.
         

An example of using more that one database: $cfg['Servers'][$i]['only_db'] = array('db1', 'db2'); @@ -2141,7 +2141,8 @@ To create a new, empty mimetype please see libraries/transformations/template_ge
  • $meta - Contains an object with field information to your column. The data is drawn from the output of the mysql_fetch_field() function. This means, all object properties described on the manual page are available in this variable and can be used to - transform a field accordingly to unsigned/zerofill/not_null/... properties.
  • + transform a field accordingly to unsigned/zerofill/not_null/... properties.
    + The $meta->mimetype variable contains the original MIME-type of the field (i.e. 'text/plain', 'image/jpeg' etc.) diff --git a/libraries/display_tbl.lib.php3 b/libraries/display_tbl.lib.php3 index 3b0cfc4ca..c19ad5be0 100644 --- a/libraries/display_tbl.lib.php3 +++ b/libraries/display_tbl.lib.php3 @@ -1244,7 +1244,8 @@ if (!defined('PMA_DISPLAY_TBL_LIB_INCLUDED')) { if (defined('PMA_TRANSFORMATION_' . strtoupper($transformfunction_name)) && function_exists('PMA_transformation_' . $transformfunction_name)) { $transform_function = 'PMA_transformation_' . $transformfunction_name; - $transform_options = PMA_transformation_getOptions((isset($GLOBALS['mime_map'][$meta->name]['transformation_options']) ? $GLOBALS['mime_map'][$meta->name]['transformation_options'] : '')); + $transform_options = PMA_transformation_getOptions((isset($GLOBALS['mime_map'][$meta->name]['transformation_options']) ? $GLOBALS['mime_map'][$meta->name]['transformation_options'] : '')); + $meta->mimetype = str_replace('_', '/', $GLOBALS['mime_map'][$meta->name]['mimetype']); } } // end if file_exists } // end if transformation is set diff --git a/libraries/transformations/TEMPLATE b/libraries/transformations/TEMPLATE index 4e28078bb..7dc2f939d 100644 --- a/libraries/transformations/TEMPLATE +++ b/libraries/transformations/TEMPLATE @@ -23,6 +23,7 @@ if (!defined('PMA_TRANSFORMATION_[ENTER_FILENAME_HERE]')){ // You can evaluate the propagated $meta Object. It's contained fields are described in http://www.php.net/mysql_fetch_field. // This stored information can be used to get the field information about the transformed field. + // $meta->mimetype contains the original MimeType of the field (i.e. 'text/plain', 'image/jpeg' etc.) return $buffer; }