Display MIME types to transform any table cell. You can only choose from a list of pre-defined MIME-types. The list gets built by a function searching a directory for valid transforms. For further information see README-file and soon documentation. ;)

This commit is contained in:
Garvin Hicking
2003-02-24 17:54:19 +00:00
parent 3e31d888ba
commit dba8ecc4fd
23 changed files with 1107 additions and 8 deletions

View File

@@ -73,6 +73,7 @@ $fields_cnt = mysql_num_rows($fields_rs);
<?php
$comments_map = array();
$mime_map = array();
if ($GLOBALS['cfg']['ShowPropertyComments']) {
require('./libraries/relation.lib.php3');
@@ -83,6 +84,10 @@ if ($GLOBALS['cfg']['ShowPropertyComments']) {
if ($cfgRelation['commwork']) {
$comments_map = PMA_getComments($db, $table);
if ($cfg['BrowseMIME']) {
$mime_map = PMA_getMIME($db, $table, true);
}
}
}
@@ -119,6 +124,12 @@ while ($row = PMA_mysql_fetch_array($fields_rs)) {
$unsigned = eregi('UNSIGNED', $row['Type'], $test);
$zerofill = eregi('ZEROFILL', $row['Type'], $test);
}
// garvin: Display basic mimetype [MIME]
if ($cfg['BrowseMIME'] && isset($mime_map[$row['Field']]['mimetype'])) {
$type .= '<br />MIME: ' . str_replace('_', '/', $mime_map[$row['Field']]['mimetype']);
}
$strAttribute = '&nbsp;';
if ($binary) {
$strAttribute = 'BINARY';