Removed unused code from db_operations.php. Changed blobstreaming.lib.php so that it check to see if blob streaming is enabled before doing anything and also uses an indirect method to create the 'pbms' database if it doesn't exist.

This commit is contained in:
Leslie
2010-07-16 10:33:53 -07:00
committed by Marc Delisle
parent a8e5b0f275
commit b6349cd626
2 changed files with 47 additions and 100 deletions

View File

@@ -438,92 +438,6 @@ if (!$is_information_schema) {
</form>
<?php
/*
* BLOB streaming support
*/
// load PMA_Config
$PMA_Config = $GLOBALS['PMA_Config'];
// if all blobstreaming plugins exist, begin checking for blobstreaming tables
if (!empty($PMA_Config))
{
if ($PMA_Config->get('PBXT_NAME') !== strtolower($db))
{
if ($PMA_Config->get('BLOBSTREAMING_PLUGINS_EXIST'))
{
$bs_tables = $PMA_Config->get('BLOBSTREAMABLE_DATABASES');
$bs_tables = $bs_tables[$db];
$oneBSTableExists = FALSE;
$allBSTablesExist = TRUE;
// first check that all blobstreaming tables do not exist
foreach ($bs_tables as $table_key=>$tbl)
if ($bs_tables[$table_key]['Exists'])
$oneBSTableExists = TRUE;
else
$allBSTablesExist = FALSE;
?>
<form method="post" action="./db_operations.php">
<?php echo PMA_generate_common_hidden_inputs($db); ?>
<fieldset>
<legend>
<?php echo PMA_getIcon('b_edit.png', __('BLOB Repository'), false, true); ?>
</legend>
<?php echo __('Status'); ?>:
<?php
// if the blobstreaming tables exist, provide option to disable the BLOB repository
if ($allBSTablesExist)
{
?>
<?php echo _pgettext('BLOB repository', 'Enabled'); ?>
</fieldset>
<fieldset class="tblFooters">
<input type="hidden" name="db_blob_streaming_op" value="disable" />
<input type="submit" onclick="return confirmDisableRepository('<?php echo $db; ?>');" value="<?php echo __('Disable'); ?>" />
</fieldset>
<?php
}
else
{
// if any of the blobstreaming tables are missing, provide option to repair the BLOB repository
if ($oneBSTableExists && !$allBSTablesExist)
{
?>
<?php echo __('Damaged'); ?>
</fieldset>
<fieldset class="tblFooters">
<input type="hidden" name="db_blob_streaming_op" value="repair" />
<input type="submit" value="<?php echo _pgettext('BLOB repository', 'Repair'); ?>" />
</fieldset>
<?php
}
// if none of the blobstreaming tables exist, provide option to enable BLOB repository
else
{
?>
<?php echo _pgettext('BLOB repository', 'Disabled'); ?>
</fieldset>
<fieldset class="tblFooters">
<input type="hidden" name="db_blob_streaming_op" value="enable" />
<input type="submit" value="<?php echo __('Enable'); ?>" />
</fieldset>
<?php
}
} // end if ($allBSTablesExist)
?>
</form>
<?php
} // end if ($PMA_Config->get('BLOBSTREAMING_PLUGINS_EXIST'))
} // end if ($PMA_Config->get('PBXT_NAME') !== strtolower($db))
}
/**
* Change database charset