added possibility of setting the MIME type and transformation
This commit is contained in:
parent
f5b20c9828
commit
fb05c019cf
@ -61,7 +61,27 @@ if (isset($_REQUEST['do_save_data'])) {
|
||||
// Executes the query
|
||||
$result = $GLOBALS['dbi']->tryQuery($sql_query);
|
||||
|
||||
if (!$result) {
|
||||
if ($result) {
|
||||
// If comments were sent, enable relation stuff
|
||||
include_once 'libraries/transformations.lib.php';
|
||||
// Update comment table for mime types [MIME]
|
||||
if (isset($_REQUEST['field_mimetype'])
|
||||
&& is_array($_REQUEST['field_mimetype'])
|
||||
&& $cfg['BrowseMIME']
|
||||
) {
|
||||
foreach ($_REQUEST['field_mimetype'] as $fieldindex => $mimetype) {
|
||||
if (isset($_REQUEST['field_name'][$fieldindex])
|
||||
&& strlen($_REQUEST['field_name'][$fieldindex])
|
||||
) {
|
||||
PMA_setMIME(
|
||||
$db, $table, $_REQUEST['field_name'][$fieldindex], $mimetype,
|
||||
$_REQUEST['field_transformation'][$fieldindex],
|
||||
$_REQUEST['field_transformation_options'][$fieldindex]
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$response = PMA_Response::getInstance();
|
||||
$response->isSuccess(false);
|
||||
$response->addJSON('message', $GLOBALS['dbi']->getError());
|
||||
|
||||
Loading…
Reference in New Issue
Block a user