Basic detection if mime-features are available, better check on error
situations. See ChangeLog.
This commit is contained in:
10
ChangeLog
10
ChangeLog
@@ -10,6 +10,16 @@ $Source$
|
|||||||
* libraries/display_tbl.lib.php3: Fixed transformation-link variable
|
* libraries/display_tbl.lib.php3: Fixed transformation-link variable
|
||||||
usage for special queries like 'SHOW FIELDS', where certain variables are
|
usage for special queries like 'SHOW FIELDS', where certain variables are
|
||||||
not set.
|
not set.
|
||||||
|
* config.inc.php3, tbl_addfield.php3, tbl_alter.php3, tbl_create.php3,
|
||||||
|
tbl_move_copy.php3, tbl_properties.inc.php3, tbl_properties_structure.php3,
|
||||||
|
transformation_wrapper.php3, libraries/config_import.lib.php3,
|
||||||
|
libraries/display_tbl.lib.php3, libraries/relation.lib.php3,
|
||||||
|
scripts/create_tables.sql:
|
||||||
|
Test if MIME-feature are really available. Preparation for PMA_db-based
|
||||||
|
SQL-History.
|
||||||
|
Removed a dupe for inserting comments, fixed integrity check when
|
||||||
|
moving/renaming tables and keeping comments.
|
||||||
|
|
||||||
|
|
||||||
2003-02-25 Marc Delisle <lem9@users.sourceforge.net>
|
2003-02-25 Marc Delisle <lem9@users.sourceforge.net>
|
||||||
* db_details_structure.php3: undefined variable $comment
|
* db_details_structure.php3: undefined variable $comment
|
||||||
|
@@ -94,6 +94,11 @@ $cfg['Servers'][$i]['pdf_pages'] = ''; // table to describe pages o
|
|||||||
// - leave blank if you don't want to use this
|
// - leave blank if you don't want to use this
|
||||||
$cfg['Servers'][$i]['column_info'] = ''; // table to store column information
|
$cfg['Servers'][$i]['column_info'] = ''; // table to store column information
|
||||||
// - leave blank if you don't want to use this
|
// - leave blank if you don't want to use this
|
||||||
|
$cfg['Servers'][$i]['history'] = ''; // table to store SQL history
|
||||||
|
// - leave blank if you don't want to use this
|
||||||
|
$cfg['Servers'][$i]['verbose_check'] = TRUE; // set to FALSE if you know that your PMA_* tables
|
||||||
|
// are up to date. This prevents compatibility
|
||||||
|
// checks and thereby increases performance.
|
||||||
$cfg['Servers'][$i]['AllowDeny']['order'] // Host authentication order, leave blank to not use
|
$cfg['Servers'][$i]['AllowDeny']['order'] // Host authentication order, leave blank to not use
|
||||||
= '';
|
= '';
|
||||||
$cfg['Servers'][$i]['AllowDeny']['rules'] // Host authentication rules, leave blank for defaults
|
$cfg['Servers'][$i]['AllowDeny']['rules'] // Host authentication rules, leave blank for defaults
|
||||||
|
@@ -120,6 +120,14 @@ if (!defined('PMA_CONFIG_IMPORT_LIB_INCLUDED')) {
|
|||||||
$cfg['Servers'][$i]['pdf_pages'] = '';
|
$cfg['Servers'][$i]['pdf_pages'] = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!isset($cfg['Servers'][$i]['history'])) {
|
||||||
|
$cfg['Servers'][$i]['history'] = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!isset($cfg['Servers'][$i]['verbose_check'])) {
|
||||||
|
$cfg['Servers'][$i]['verbose_check'] = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
if (!isset($cfg['Servers'][$i]['AllowDeny'])) {
|
if (!isset($cfg['Servers'][$i]['AllowDeny'])) {
|
||||||
$cfg['Servers'][$i]['AllowDeny'] = array ('order' => '',
|
$cfg['Servers'][$i]['AllowDeny'] = array ('order' => '',
|
||||||
'rules' => array());
|
'rules' => array());
|
||||||
|
@@ -527,7 +527,7 @@ if (!defined('PMA_DISPLAY_TBL_LIB_INCLUDED')) {
|
|||||||
$comments_map = array();
|
$comments_map = array();
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($GLOBALS['cfgRelation']['commwork'] && $GLOBALS['cfg']['BrowseMIME']) {
|
if ($GLOBALS['cfgRelation']['commwork'] && $GLOBALS['cfgRelation']['mimework'] && $GLOBALS['cfg']['BrowseMIME']) {
|
||||||
require('./libraries/transformations.lib.php3');
|
require('./libraries/transformations.lib.php3');
|
||||||
$GLOBALS['mime_map'] = PMA_getMIME($db, $table);
|
$GLOBALS['mime_map'] = PMA_getMIME($db, $table);
|
||||||
}
|
}
|
||||||
@@ -1001,7 +1001,7 @@ if (!defined('PMA_DISPLAY_TBL_LIB_INCLUDED')) {
|
|||||||
$transform_function = $default_function;
|
$transform_function = $default_function;
|
||||||
$transform_options = array();
|
$transform_options = array();
|
||||||
|
|
||||||
if ($GLOBALS['cfg']['BrowseMIME']) {
|
if ($GLOBALS['cfgRelation']['mimework'] && $GLOBALS['cfg']['BrowseMIME']) {
|
||||||
|
|
||||||
if (isset($GLOBALS['mime_map'][$meta->name]['mimetype']) && isset($GLOBALS['mime_map'][$meta->name]['transformation'])) {
|
if (isset($GLOBALS['mime_map'][$meta->name]['mimetype']) && isset($GLOBALS['mime_map'][$meta->name]['transformation'])) {
|
||||||
// garvin: for security, never allow to break out from transformations directory
|
// garvin: for security, never allow to break out from transformations directory
|
||||||
|
@@ -84,6 +84,8 @@ if (!defined('PMA_RELATION_LIB_INCLUDED')){
|
|||||||
$cfgRelation['displaywork'] = FALSE;
|
$cfgRelation['displaywork'] = FALSE;
|
||||||
$cfgRelation['pdfwork'] = FALSE;
|
$cfgRelation['pdfwork'] = FALSE;
|
||||||
$cfgRelation['commwork'] = FALSE;
|
$cfgRelation['commwork'] = FALSE;
|
||||||
|
$cfgRelation['mimework'] = FALSE;
|
||||||
|
$cfgRelation['historywork'] = FALSE;
|
||||||
$cfgRelation['allworks'] = FALSE;
|
$cfgRelation['allworks'] = FALSE;
|
||||||
|
|
||||||
// No server selected -> no bookmark table
|
// No server selected -> no bookmark table
|
||||||
@@ -127,6 +129,8 @@ if (!defined('PMA_RELATION_LIB_INCLUDED')){
|
|||||||
$cfgRelation['column_info'] = $curr_table[0];
|
$cfgRelation['column_info'] = $curr_table[0];
|
||||||
} else if ($curr_table[0] == $cfg['Server']['pdf_pages']) {
|
} else if ($curr_table[0] == $cfg['Server']['pdf_pages']) {
|
||||||
$cfgRelation['pdf_pages'] = $curr_table[0];
|
$cfgRelation['pdf_pages'] = $curr_table[0];
|
||||||
|
} else if ($curr_table[0] == $cfg['Server']['history']) {
|
||||||
|
$cfgRelation['history'] = $curr_table[0];
|
||||||
}
|
}
|
||||||
} // end while
|
} // end while
|
||||||
if (isset($cfgRelation['relation'])) {
|
if (isset($cfgRelation['relation'])) {
|
||||||
@@ -139,11 +143,42 @@ if (!defined('PMA_RELATION_LIB_INCLUDED')){
|
|||||||
}
|
}
|
||||||
if (isset($cfgRelation['column_info'])) {
|
if (isset($cfgRelation['column_info'])) {
|
||||||
$cfgRelation['commwork'] = TRUE;
|
$cfgRelation['commwork'] = TRUE;
|
||||||
|
|
||||||
|
if ($cfg['Server']['verbose_check']) {
|
||||||
|
$mime_query = 'SHOW FIELDS FROM ' . PMA_backquote($cfgRelation['db']) . '.' . PMA_backquote($cfgRelation['column_info']);
|
||||||
|
$mime_rs = PMA_query_as_cu($mime_query, FALSE);
|
||||||
|
|
||||||
|
$mime_field_mimetype = FALSE;
|
||||||
|
$mime_field_transformation = FALSE;
|
||||||
|
$mime_field_transformation_options = FALSE;
|
||||||
|
while ($curr_mime_field = @PMA_mysql_fetch_array($mime_rs)) {
|
||||||
|
if ($curr_mime_field[0] == 'mimetype') {
|
||||||
|
$mime_field_mimetype = TRUE;
|
||||||
|
} else if ($curr_mime_field[0] == 'transformation') {
|
||||||
|
$mime_field_transformation = TRUE;
|
||||||
|
} else if ($curr_mime_field[0] == 'transformation_options') {
|
||||||
|
$mime_field_transformation_options = TRUE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($mime_field_mimetype == TRUE
|
||||||
|
&& $mime_field_transformation == TRUE
|
||||||
|
&& $mime_field_transformation_options == TRUE) {
|
||||||
|
$cfgRelation['mimework'] = TRUE;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$cfgRelation['mimework'] = TRUE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} // end if
|
} // end if
|
||||||
|
|
||||||
|
if (isset($cfgRelation['history'])) {
|
||||||
|
$cfgRelation['historywork'] = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
if ($cfgRelation['relwork'] == TRUE && $cfgRelation['displaywork'] == TRUE
|
if ($cfgRelation['relwork'] == TRUE && $cfgRelation['displaywork'] == TRUE
|
||||||
&& $cfgRelation['pdfwork'] == TRUE && $cfgRelation['commwork'] == TRUE) {
|
&& $cfgRelation['pdfwork'] == TRUE && $cfgRelation['commwork'] == TRUE
|
||||||
|
&& $cfgRelation['mimework'] && $cfgRelation['historywork']) {
|
||||||
$cfgRelation['allworks'] = TRUE;
|
$cfgRelation['allworks'] = TRUE;
|
||||||
}
|
}
|
||||||
if ($tab_rs) {
|
if ($tab_rs) {
|
||||||
@@ -197,6 +232,19 @@ if (!defined('PMA_RELATION_LIB_INCLUDED')){
|
|||||||
echo ' <tr><td colspan=2 align="center">' . $GLOBALS['strColComFeat'] . ': '
|
echo ' <tr><td colspan=2 align="center">' . $GLOBALS['strColComFeat'] . ': '
|
||||||
. (($cfgRelation['commwork'] == TRUE) ? $enabled : $disabled)
|
. (($cfgRelation['commwork'] == TRUE) ? $enabled : $disabled)
|
||||||
. '</td></tr>' . "\n";
|
. '</td></tr>' . "\n";
|
||||||
|
echo ' <tr><td colspan=2 align="center">MIME: '
|
||||||
|
. (($cfgRelation['mimework'] == TRUE) ? $enabled : $disabled)
|
||||||
|
. '</td></tr>' . "\n";
|
||||||
|
|
||||||
|
// . '<br />(MIME: ' . (($cfgRelation['mimework'] == TRUE) ? $enabled : $disabled) . ')'
|
||||||
|
|
||||||
|
echo ' <tr><th align="left">$cfg[\'Servers\'][$i][\'history\'] ... </th><td align="right">'
|
||||||
|
. ((isset($cfgRelation['history'])) ? $hit : sprintf($shit, 'history'))
|
||||||
|
. '</td></tr>' . "\n";
|
||||||
|
echo ' <tr><td colspan=2 align="center">' . $GLOBALS['strQuerySQLHistory'] . ': '
|
||||||
|
. (($cfgRelation['historywork'] == TRUE) ? $enabled : $disabled)
|
||||||
|
. '</td></tr>' . "\n";
|
||||||
|
|
||||||
echo '</table>' . "\n";
|
echo '</table>' . "\n";
|
||||||
} // end if ($verbose == TRUE) {
|
} // end if ($verbose == TRUE) {
|
||||||
|
|
||||||
|
@@ -77,3 +77,14 @@ CREATE TABLE `PMA_column_comments` (
|
|||||||
PRIMARY KEY (id),
|
PRIMARY KEY (id),
|
||||||
UNIQUE KEY db_name (db_name, table_name, column_name)
|
UNIQUE KEY db_name (db_name, table_name, column_name)
|
||||||
) TYPE=MyISAM COMMENT='Comments for Columns';
|
) TYPE=MyISAM COMMENT='Comments for Columns';
|
||||||
|
|
||||||
|
CREATE TABLE `PMA_history` (
|
||||||
|
`id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||||
|
`username` VARCHAR( 64 ) NOT NULL ,
|
||||||
|
`db` VARCHAR( 64 ) NOT NULL ,
|
||||||
|
`table` VARCHAR( 64 ) NOT NULL ,
|
||||||
|
`timevalue` TIMESTAMP NOT NULL ,
|
||||||
|
`sqlquery` TEXT NOT NULL ,
|
||||||
|
PRIMARY KEY ( `id` ) ,
|
||||||
|
INDEX ( `username` , `db` , `table` , `timevalue` )
|
||||||
|
) TYPE=MyISAM COMMENT='SQL history';
|
||||||
|
@@ -207,28 +207,13 @@ if (isset($submit)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// garvin: Update comment table for mime types [MIME]
|
// garvin: Update comment table for mime types [MIME]
|
||||||
if (is_array($field_mimetype) && $cfgRelation['commwork'] && $cfg['BrowseMIME']) {
|
if (is_array($field_mimetype) && $cfgRelation['commwork'] && $cfgRelation['mimework'] && $cfg['BrowseMIME']) {
|
||||||
@reset($field_mimetype);
|
@reset($field_mimetype);
|
||||||
while(list($fieldindex, $mimetype) = each($field_mimetype)) {
|
while(list($fieldindex, $mimetype) = each($field_mimetype)) {
|
||||||
PMA_setMIME($db, $table, $field_name[$fieldindex], $mimetype, $field_transformation[$fieldindex], $field_transformation_options[$fieldindex]);
|
PMA_setMIME($db, $table, $field_name[$fieldindex], $mimetype, $field_transformation[$fieldindex], $field_transformation_options[$fieldindex]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// garvin: If comments were sent, enable relation stuff
|
|
||||||
require('./libraries/relation.lib.php3');
|
|
||||||
require('./libraries/transformations.lib.php3');
|
|
||||||
|
|
||||||
$cfgRelation = PMA_getRelationsParam();
|
|
||||||
|
|
||||||
// garvin: Update comment table for mime types [MIME]
|
|
||||||
if (is_array($field_mimetype) && $cfgRelation['commwork'] && $cfg['BrowseMIME']) {
|
|
||||||
@reset($field_mimetype);
|
|
||||||
while(list($fieldindex, $mimetype) = each($field_mimetype)) {
|
|
||||||
PMA_setMIME($db, $table, $field_name[$fieldindex], $mimetype, $field_transformation[$fieldindex], $field_transformation_options[$fieldindex]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Go back to the structure sub-page
|
// Go back to the structure sub-page
|
||||||
$sql_query = $sql_query_cpy;
|
$sql_query = $sql_query_cpy;
|
||||||
unset($sql_query_cpy);
|
unset($sql_query_cpy);
|
||||||
|
@@ -103,7 +103,7 @@ if (isset($submit)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// garvin: Update comment table for mime types [MIME]
|
// garvin: Update comment table for mime types [MIME]
|
||||||
if (is_array($field_mimetype) && $cfgRelation['commwork'] && $cfg['BrowseMIME']) {
|
if (is_array($field_mimetype) && $cfgRelation['commwork'] && $cfgRelation['mimework'] && $cfg['BrowseMIME']) {
|
||||||
@reset($field_mimetype);
|
@reset($field_mimetype);
|
||||||
while(list($fieldindex, $mimetype) = each($field_mimetype)) {
|
while(list($fieldindex, $mimetype) = each($field_mimetype)) {
|
||||||
PMA_setMIME($db, $table, $field_name[$fieldindex], $mimetype, $field_transformation[$fieldindex], $field_transformation_options[$fieldindex]);
|
PMA_setMIME($db, $table, $field_name[$fieldindex], $mimetype, $field_transformation[$fieldindex], $field_transformation_options[$fieldindex]);
|
||||||
|
@@ -208,7 +208,7 @@ if (isset($submit)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// garvin: Update comment table for mime types [MIME]
|
// garvin: Update comment table for mime types [MIME]
|
||||||
if (is_array($field_mimetype) && $cfgRelation['commwork'] && $cfg['BrowseMIME']) {
|
if (is_array($field_mimetype) && $cfgRelation['commwork'] && $cfgRelation['mimework'] && $cfg['BrowseMIME']) {
|
||||||
@reset($field_mimetype);
|
@reset($field_mimetype);
|
||||||
while(list($fieldindex, $mimetype) = each($field_mimetype)) {
|
while(list($fieldindex, $mimetype) = each($field_mimetype)) {
|
||||||
PMA_setMIME($db, $table, $field_name[$fieldindex], $mimetype, $field_transformation[$fieldindex], $field_transformation_options[$fieldindex]);
|
PMA_setMIME($db, $table, $field_name[$fieldindex], $mimetype, $field_transformation[$fieldindex], $field_transformation_options[$fieldindex]);
|
||||||
|
@@ -142,9 +142,24 @@ if (isset($new_name) && trim($new_name) != '') {
|
|||||||
} else {
|
} else {
|
||||||
// garvin: Create new entries as duplicates from old comments
|
// garvin: Create new entries as duplicates from old comments
|
||||||
if ($cfgRelation['commwork']) {
|
if ($cfgRelation['commwork']) {
|
||||||
|
// Write every comment as new copied entry. [MIME]
|
||||||
|
while ($comments_copy_row = @PMA_mysql_fetch_array($comments_copy_rs)) {
|
||||||
|
$new_comment_query = 'INSERT INTO ' . PMA_backquote($cfgRelation['column_comments'])
|
||||||
|
. ' (db_name, table_name, column_name, ' . PMA_backquote('comment') . ', mimetype, transformation, transformation_options) '
|
||||||
|
. ' VALUES('
|
||||||
|
. '\'' . PMA_sqlAddslashes($target_db) . '\','
|
||||||
|
. '\'' . PMA_sqlAddslashes($new_name) . '\','
|
||||||
|
. '\'' . PMA_handleSlashes($comments_copy_row['column_name']) . '\','
|
||||||
|
. '\'' . PMA_handleSlashes($comments_copy_row['comment']) . '\','
|
||||||
|
. '\'' . PMA_handleSlashes($comments_copy_row['mimetype']) . '\','
|
||||||
|
. '\'' . PMA_handleSlashes($comments_copy_row['transformation']) . '\','
|
||||||
|
. '\'' . PMA_handleSlashes($comments_copy_row['transformation_options']) . '\')';
|
||||||
|
$new_comment_rs = PMA_query_as_cu($new_comment_query);
|
||||||
|
} // end while
|
||||||
|
|
||||||
// Get all comments and MIME-Types for current table
|
// Get all comments and MIME-Types for current table
|
||||||
$comments_copy_query = 'SELECT
|
$comments_copy_query = 'SELECT
|
||||||
column_name, ' . PMA_backquote('comment') . '
|
column_name, ' . PMA_backquote('comment') . ($cfgRelation['mimework'] ? ', mimetype, transformation, transformation_options' : '') . '
|
||||||
FROM ' . PMA_backquote($cfgRelation['column_info']) . '
|
FROM ' . PMA_backquote($cfgRelation['column_info']) . '
|
||||||
WHERE
|
WHERE
|
||||||
db_name = \'' . PMA_sqlAddslashes($db) . '\' AND
|
db_name = \'' . PMA_sqlAddslashes($db) . '\' AND
|
||||||
@@ -154,11 +169,16 @@ if (isset($new_name) && trim($new_name) != '') {
|
|||||||
// Write every comment as new copied entry. [MIME]
|
// Write every comment as new copied entry. [MIME]
|
||||||
while ($comments_copy_row = @PMA_mysql_fetch_array($comments_copy_rs)) {
|
while ($comments_copy_row = @PMA_mysql_fetch_array($comments_copy_rs)) {
|
||||||
$new_comment_query = 'INSERT INTO ' . PMA_backquote($cfgRelation['column_info'])
|
$new_comment_query = 'INSERT INTO ' . PMA_backquote($cfgRelation['column_info'])
|
||||||
. ' (db_name, table_name, column_name, ' . PMA_backquote('comment') . ') '
|
. ' (db_name, table_name, column_name, ' . PMA_backquote('comment') . ($cfgRelation['mimework'] ? ', mimetype, transformation, transformation_options' : '') . ') '
|
||||||
. ' VALUES('
|
. ' VALUES('
|
||||||
. '\'' . PMA_sqlAddslashes($target_db) . '\','
|
. '\'' . PMA_sqlAddslashes($target_db) . '\','
|
||||||
. '\'' . PMA_sqlAddslashes($new_name) . '\','
|
. '\'' . PMA_sqlAddslashes($new_name) . '\','
|
||||||
. '\'' . PMA_handleSlashes($comments_copy_row['comment']) . '\')';
|
. '\'' . PMA_handleSlashes($comments_copy_row['column_name']) . '\''
|
||||||
|
. ($cfgRelation['mimework'] ? ',\'' . PMA_handleSlashes($comments_copy_row['comment']) . '\','
|
||||||
|
. '\'' . PMA_handleSlashes($comments_copy_row['mimetype']) . '\','
|
||||||
|
. '\'' . PMA_handleSlashes($comments_copy_row['transformation']) . '\','
|
||||||
|
. '\'' . PMA_handleSlashes($comments_copy_row['transformation_options']) . '\'' : '')
|
||||||
|
. ')';
|
||||||
$new_comment_rs = PMA_query_as_cu($new_comment_query);
|
$new_comment_rs = PMA_query_as_cu($new_comment_query);
|
||||||
} // end while
|
} // end while
|
||||||
}
|
}
|
||||||
|
@@ -51,7 +51,7 @@ if ($cfgRelation['commwork']) {
|
|||||||
$comments_map = PMA_getComments($db, $table);
|
$comments_map = PMA_getComments($db, $table);
|
||||||
echo '<th>' . $strComments . '</th>';
|
echo '<th>' . $strComments . '</th>';
|
||||||
|
|
||||||
if ($cfg['BrowseMIME']) {
|
if ($cfgRelation['mimework'] && $cfg['BrowseMIME']) {
|
||||||
$mime_map = PMA_getMIME($db, $table);
|
$mime_map = PMA_getMIME($db, $table);
|
||||||
$available_mime = PMA_getAvailableMIMEtypes();
|
$available_mime = PMA_getAvailableMIMEtypes();
|
||||||
|
|
||||||
@@ -255,7 +255,7 @@ for ($i = 0 ; $i < $num_fields; $i++) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// garvin: MIME-types
|
// garvin: MIME-types
|
||||||
if ($cfg['BrowseMIME'] && $cfgRelation['commwork']) {
|
if ($cfgRelation['mimework'] && $cfg['BrowseMIME'] && $cfgRelation['commwork']) {
|
||||||
?>
|
?>
|
||||||
<td bgcolor="<?php echo $bgcolor; ?>" valign="top">
|
<td bgcolor="<?php echo $bgcolor; ?>" valign="top">
|
||||||
<select id="field_<?php echo $i; ?>_8" size="1" name="field_mimetype[]">
|
<select id="field_<?php echo $i; ?>_8" size="1" name="field_mimetype[]">
|
||||||
@@ -462,7 +462,7 @@ echo "\n";
|
|||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
if ($cfgRelation['commwork'] && $cfg['BrowseMIME']) {
|
if ($cfgRelation['commwork'] && $cfgRelation['mimework'] && $cfg['BrowseMIME']) {
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<td valign="top" rowspan="2">*** </td>
|
<td valign="top" rowspan="2">*** </td>
|
||||||
|
@@ -85,7 +85,7 @@ if ($GLOBALS['cfg']['ShowPropertyComments']) {
|
|||||||
if ($cfgRelation['commwork']) {
|
if ($cfgRelation['commwork']) {
|
||||||
$comments_map = PMA_getComments($db, $table);
|
$comments_map = PMA_getComments($db, $table);
|
||||||
|
|
||||||
if ($cfg['BrowseMIME']) {
|
if ($cfgRelation['mimework'] && $cfg['BrowseMIME']) {
|
||||||
$mime_map = PMA_getMIME($db, $table, true);
|
$mime_map = PMA_getMIME($db, $table, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -126,7 +126,7 @@ while ($row = PMA_mysql_fetch_array($fields_rs)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// garvin: Display basic mimetype [MIME]
|
// garvin: Display basic mimetype [MIME]
|
||||||
if ($cfg['BrowseMIME'] && isset($mime_map[$row['Field']]['mimetype'])) {
|
if ($cfgRelation['commwork'] && $cfgRelation['mimework'] && $cfg['BrowseMIME'] && isset($mime_map[$row['Field']]['mimetype'])) {
|
||||||
$type .= '<br />MIME: ' . str_replace('_', '/', $mime_map[$row['Field']]['mimetype']);
|
$type .= '<br />MIME: ' . str_replace('_', '/', $mime_map[$row['Field']]['mimetype']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -130,7 +130,7 @@ else
|
|||||||
|
|
||||||
$default_ct = 'application/octet-stream';
|
$default_ct = 'application/octet-stream';
|
||||||
|
|
||||||
if ($cfgRelation['commwork']) {
|
if ($cfgRelation['commwork'] && $cfgRelation['mimework']) {
|
||||||
$mime_map = PMA_getMime($db, $table);
|
$mime_map = PMA_getMime($db, $table);
|
||||||
$mime_options = PMA_transformation_getOptions((isset($mime_map[urldecode($transform_key)]['transformation_options']) ? $mime_map[urldecode($transform_key)]['transformation_options'] : ''));
|
$mime_options = PMA_transformation_getOptions((isset($mime_map[urldecode($transform_key)]['transformation_options']) ? $mime_map[urldecode($transform_key)]['transformation_options'] : ''));
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user