use current server instead of default server; add vim lines; pass token because bs_play_media did not work after merging to current trunk

This commit is contained in:
Marc Delisle
2008-08-23 13:35:23 +00:00
parent 3b5b6ed3f7
commit 3f07d2aff2
4 changed files with 12 additions and 8 deletions

View File

@@ -1,4 +1,5 @@
<?php <?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/** /**
* @author Raj Kissu Rajandran * @author Raj Kissu Rajandran
* @version 1.0 * @version 1.0

View File

@@ -1,4 +1,5 @@
<?php <?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/** /**
* @author Raj Kissu Rajandran * @author Raj Kissu Rajandran
* @version 1.0 * @version 1.0

View File

@@ -1244,12 +1244,13 @@ function pdfPaperSize(format, axis) {
* rajk - for playing media from the BLOB repository * rajk - for playing media from the BLOB repository
* *
* @param var * @param var
* @param var url_params main purpose is to pass the token
* @param var bs_ref BLOB repository reference * @param var bs_ref BLOB repository reference
* @param var m_type type of BLOB repository media * @param var m_type type of BLOB repository media
* @param var w_width width of popup window * @param var w_width width of popup window
* @param var w_height height of popup window * @param var w_height height of popup window
*/ */
function popupBSMedia(bs_ref, m_type, w_width, w_height) function popupBSMedia(url_params, bs_ref, m_type, w_width, w_height)
{ {
// if width not specified, use default // if width not specified, use default
if (w_width == undefined) if (w_width == undefined)
@@ -1260,7 +1261,7 @@ function popupBSMedia(bs_ref, m_type, w_width, w_height)
w_height = 480; w_height = 480;
// open popup window (for displaying video/playing audio) // open popup window (for displaying video/playing audio)
var mediaWin = window.open('bs_play_media.php?bs_reference=' + bs_ref + '&media_type=' + m_type, 'viewBSMedia', 'width=' + w_width + ', height=' + w_height + ', resizable=1, scrollbars=1, status=0'); var mediaWin = window.open('bs_play_media.php?' + url_params + '&bs_reference=' + bs_ref + '&media_type=' + m_type, 'viewBSMedia', 'width=' + w_width + ', height=' + w_height + ', resizable=1, scrollbars=1, status=0');
} }
/** /**

View File

@@ -1,4 +1,5 @@
<?php <?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/** /**
* @author Raj Kissu Rajandran * @author Raj Kissu Rajandran
* @version 1.0 * @version 1.0
@@ -27,12 +28,12 @@ function checkBLOBStreamingPlugins()
if (empty($PMA_Config)) if (empty($PMA_Config))
return FALSE; return FALSE;
// retrieve default server configuration // retrieve current server configuration
$serverCfg = $PMA_Config->get('Servers'); $serverCfg = $PMA_Config->get('Servers');
$serverCfg = $serverCfg[$PMA_Config->settings['ServerDefault']]; $serverCfg = $serverCfg[$GLOBALS['server']];
// return if unable to retrieve default server configuration // return if unable to retrieve current server configuration
if (!$serverCfg) if (! $serverCfg)
return FALSE; return FALSE;
// if PHP extension in use is 'mysql', specify element 'PersistentConnections' // if PHP extension in use is 'mysql', specify element 'PersistentConnections'
@@ -694,12 +695,12 @@ function PMA_BS_CreateReferenceLink($bs_reference, $db_name)
break; break;
// audio content // audio content
case 'audio/mpeg': case 'audio/mpeg':
$output .= ' (<a href="#" onclick="popupBSMedia(\'' . urlencode($bs_reference) . '\', \'' . $content_type . '\', 640, 120)">Play Audio</a>)'; $output .= ' (<a href="#" onclick="popupBSMedia(\'' . PMA_generate_common_url() . '\',\'' . urlencode($bs_reference) . '\', \'' . $content_type . '\', 640, 120)">Play Audio</a>)';
break; break;
// video content // video content
case 'application/x-flash-video': case 'application/x-flash-video':
case 'video/mpeg': case 'video/mpeg':
$output .= ' (<a href="#" onclick="popupBSMedia(\'' . urlencode($bs_reference) . '\', \'' . $content_type . '\', 640, 480)">View Video</a>)'; $output .= ' (<a href="#" onclick="popupBSMedia(\'' . PMA_generate_common_url() . '\',\'' . urlencode($bs_reference) . '\', \'' . $content_type . '\', 640, 480)">View Video</a>)';
break; break;
// unsupported content. specify download // unsupported content. specify download
default: default: