Esempio n. 1
0
                        // disable BLOB repository monitoring
                    // disable BLOB repository monitoring
                    case "disable":
                        // if at least one blobstreaming table exists, execute drop
                        if ($oneBSTableExists) {
                            PMA_BS_DropTables($db);
                        }
                        break;
                        // repair BLOB repository
                    // repair BLOB repository
                    case "repair":
                        // check if a blobstreaming table is missing
                        foreach ($bs_tables as $table_key => $tbl) {
                            if (!$bs_tables[$table_key]['Exists']) {
                                PMA_DBI_select_db($db);
                                PMA_DBI_query(PMA_BS_GetTableStruct($table_key));
                            }
                        }
                }
                // refresh side menu
                PMA_sendHeaderLocation($cfg['PmaAbsoluteUri'] . 'db_operations.php?' . PMA_generate_common_url('', '', '&') . (isset($db) ? '&db=' . urlencode($db) : '') . (isset($token) ? '&token=' . urlencode($token) : '') . (isset($goto) ? '&goto=' . urlencode($goto) : '') . 'reload=1&purge=1');
            }
            // end  if ($PMA_Config->get('BLOBSTREAMING_PLUGINS_EXIST'))
        }
        // end if ($PMA_Config->get('PBXT_NAME') !== strtolower($db))
    }
}
/**
 * Settings for relations stuff
 */
require_once './libraries/relation.lib.php';
Esempio n. 2
0
/**
 * creates the BLOBStreaming tables for a given database
 *
 * @access  public
 * @param   string - database name
 * @uses    PMA_Config::get()
 * @uses    PMA_DBI_select_db()
 * @uses    PMA_DBI_query()
 * @uses    PMA_BS_GetTableStruct()
 * @return  boolean - success/failure of transactional query execution
*/
function PMA_BS_CreateTables($db_name)
{
    // retrieve BS tables
    $bs_tables = $_SESSION['PMA_Config']->get('BLOBSTREAMING_TABLES');
    // select specified database
    PMA_DBI_select_db($db_name);
    // create necessary BS tables for specified database
    foreach ($bs_tables as $table_key => $table) {
        $result = PMA_DBI_query(PMA_BS_GetTableStruct($table_key));
        // return false if query execution fails
        if (!$result) {
            return FALSE;
        }
    }
    // return true on success
    return TRUE;
}