2 /* vim: set expandtab sw=4 ts=4 sts=4: */
4 * @package BLOBStreaming
10 require_once './libraries/common.inc.php';
13 * @var string contains database name
15 $bsDB = isset($_REQUEST['bs_db']) ?
urldecode($_REQUEST['bs_db']) : NULL;
18 * @var string contains table name
20 $bsTable = isset($_REQUEST['bs_table']) ?
urldecode($_REQUEST['bs_table']) : NULL;
23 * @var string contains BLOB reference
25 $bsReference = isset($_REQUEST['bs_reference']) ?
urldecode($_REQUEST['bs_reference']) : NULL;
28 * @var string contains MIME type
30 $bsNewMIMEType = isset($_REQUEST['bs_new_mime_type']) ?
urldecode($_REQUEST['bs_new_mime_type']) : NULL;
32 // necessary variables exist
33 if ($bsDB && $bsTable && $bsReference && $bsNewMIMEType)
35 if (PMA_BS_SetContentType($bsDB, $bsTable, $bsReference, $bsNewMIMEType)) {
36 // determine redirector page
37 $newLoc = $cfg['PmaAbsoluteUri'] . 'sql.php?' . PMA_generate_common_url ('','', '&') . (isset($bsDB) ?
'&db=' . urlencode($bsDB) : '') . (isset($bsTable) ?
'&table=' . urlencode($bsTable) : '') . (isset($token) ?
'&token=' . urlencode($token) : '') . (isset($goto) ?
'&goto=' . urlencode($goto) : '') . '&reload=1&purge=1';
39 // redirect to specified page
42 window
.location
= "<?php echo $newLoc ?>";
46 } // end if ($bsDB && $bsTable && $bsReference && $bsNewMIMEType)