Merged [3352] and [3353] back from the 1.4 branch to the trunk.

Did not merge [3354]; this fix is not necessary with the new libodbc++ version.
This commit is contained in:
fgerlits 2009-04-04 14:03:53 +00:00
parent f79b925f91
commit 3c85aefafe
6 changed files with 11 additions and 9 deletions

View file

@ -93,7 +93,7 @@ FileTools :: copyUrlToFile(const std::string & url,
int status = curl_easy_setopt(handle, CURLOPT_URL, url.c_str()); int status = curl_easy_setopt(handle, CURLOPT_URL, url.c_str());
status |= curl_easy_setopt(handle, CURLOPT_WRITEDATA, file); status |= curl_easy_setopt(handle, CURLOPT_WRITEDATA, file);
status |= curl_easy_setopt(handle, CURLOPT_HTTPGET); status |= curl_easy_setopt(handle, CURLOPT_HTTPGET, 1);
if (status) { if (status) {
fclose(file); fclose(file);

View file

@ -34,7 +34,7 @@
#endif #endif
#include <unicode/msgfmt.h> #include <unicode/msgfmt.h>
#include <string.h>
#include "LiveSupport/Core/LocalizedObject.h" #include "LiveSupport/Core/LocalizedObject.h"
@ -322,7 +322,7 @@ LocalizedObject :: getBinaryResourceAsUstring(const char * key)
"binary resource"); "binary resource");
} }
char * strBuf = new char[length + 1]; char * strBuf = new char[length + 1];
std::memcpy(strBuf, data, length); memcpy(strBuf, data, length);
strBuf[length] = 0; strBuf[length] = 0;
Ptr<Glib::ustring>::Ref string(new Glib::ustring(strBuf)); Ptr<Glib::ustring>::Ref string(new Glib::ustring(strBuf));
if (string->validate()) { if (string->validate()) {

View file

@ -49,7 +49,7 @@
#include <cstdlib> #include <cstdlib>
#include <iomanip> #include <iomanip>
#include <sstream> #include <sstream>
#include <string.h>
#include "LiveSupport/Core/Uuid.h" #include "LiveSupport/Core/Uuid.h"

View file

@ -21,7 +21,7 @@ if (window.attachEvent) window.attachEvent("onload", sfHover);
<li class="nav-main"><a href="{$UI_BROWSER}?folderId={$START.fid}&act=addFileData">##Add Audio##</a> <li class="nav-main"><a href="{$UI_BROWSER}?folderId={$START.fid}&act=addFileData">##Add Audio##</a>
<ul> <ul>
<li><a href="{$UI_BROWSER}?folderId={$START.fid}&act=addFileData">##Audioclip##</a></li> <li><a href="{$UI_BROWSER}?folderId={$START.fid}&act=addFileData">##Audioclip##</a></li>
{* <li><a href="{$UI_BROWSER}?folderId={$START.fid}&act=addWebstreamData">##Webstream##</a></li> *} <li><a href="{$UI_BROWSER}?folderId={$START.fid}&act=addWebstreamData">##Webstream##</a></li>
</ul> </ul>
</li> </li>
<li class="nav-main"><a>##Media Library##</a> <li class="nav-main"><a>##Media Library##</a>

View file

@ -28,11 +28,11 @@
</p> </p>
<br> <br>
<div>
{if $data.header} {if $data.header}
Returned connection header:<pre>{$data.header}</pre> ##Connection header:##
<br>
<textarea rows="6" cols="45" readonly>{$data.header}</textarea>
{/if} {/if}
</div>
{else} {else}
<div>{tra str='Connection to $1 port $2 $3' 1=$data.host 2=$data.port 3='<font color="red">failed</font>'}</div> <div>{tra str='Connection to $1 port $2 $3' 1=$data.host 2=$data.port 3='<font color="red">failed</font>'}</div>

View file

@ -377,6 +377,8 @@ class uiBrowser extends uiBase {
*/ */
function testStream($url) function testStream($url)
{ {
global $CC_CONFIG;
touch(UI_TESTSTREAM_MU3_TMP); touch(UI_TESTSTREAM_MU3_TMP);
$handle = fopen(UI_TESTSTREAM_MU3_TMP, "w"); $handle = fopen(UI_TESTSTREAM_MU3_TMP, "w");
fwrite($handle, $url); fwrite($handle, $url);
@ -403,7 +405,7 @@ class uiBrowser extends uiBase {
$type = explode(':', $type); $type = explode(':', $type);
foreach ($CC_CONFIG['stream_types'] as $t) { foreach ($CC_CONFIG['stream_types'] as $t) {
if (preg_match('/'.str_replace('/', '\/', $t).'/i', $type[1])) { if (stripos($type[1], $t) !== false) {
$match = TRUE; $match = TRUE;
break; break;
} }