mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-18 15:33:15 +00:00
Fix #1703 bridge is broken
This commit is contained in:
@@ -278,7 +278,7 @@ class Bridge_Api_Dailymotion extends Bridge_Api_Abstract implements Bridge_Api_I
|
||||
break;
|
||||
|
||||
default:
|
||||
throw new Bridge_Exception_ElementUnknown('Unknown element ' . $type);
|
||||
throw new Bridge_Exception_ElementUnknown('Unknown element ' . $object);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -378,7 +378,7 @@ class Bridge_Api_Dailymotion extends Bridge_Api_Abstract implements Bridge_Api_I
|
||||
$result = $this->_api->call($url, $params, $this->oauth_token);
|
||||
break;
|
||||
default:
|
||||
throw new Bridge_Exception_ElementUnknown('Unknown element ' . $type);
|
||||
throw new Bridge_Exception_ElementUnknown('Unknown element ' . $object);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -402,7 +402,7 @@ class Bridge_Api_Dailymotion extends Bridge_Api_Abstract implements Bridge_Api_I
|
||||
return $playlist["id"];
|
||||
break;
|
||||
default:
|
||||
throw new Bridge_Exception_ElementUnknown('Unknown element ' . $type);
|
||||
throw new Bridge_Exception_ElementUnknown('Unknown element ' . $container_type);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -437,7 +437,7 @@ class Bridge_Api_Dailymotion extends Bridge_Api_Abstract implements Bridge_Api_I
|
||||
return $this->get_container_from_id(self::CONTAINER_TYPE_PLAYLIST, $container_id);
|
||||
break;
|
||||
default:
|
||||
throw new Bridge_Exception_ContainerUnknown('Unknown element ' . $container);
|
||||
throw new Bridge_Exception_ContainerUnknown('Unknown element ' . $element_type);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
@@ -582,7 +582,7 @@ class Bridge_Api_Dailymotion extends Bridge_Api_Abstract implements Bridge_Api_I
|
||||
{
|
||||
switch ($record->get_type()) {
|
||||
case self::ELEMENT_TYPE_VIDEO :
|
||||
$url_file = $this->_api->uploadFile($record->get_hd_file()->getRealPath(), $this->oauth_token);
|
||||
$url_file = $this->_api->sendFile($record->get_hd_file()->getRealPath(), $this->oauth_token);
|
||||
$options = array_merge(array('url' => $url_file), $options);
|
||||
$video = $this->_api->call('POST /me/videos', $options, $this->oauth_token);
|
||||
|
||||
|
@@ -205,9 +205,9 @@ class Bridge_Api_Flickr extends Bridge_Api_Abstract implements Bridge_Api_Interf
|
||||
throw new Bridge_Exception_ApiConnectorRequestFailed('Unable to retrieve photoset infos for ' . $object);
|
||||
|
||||
$xml = $response->getXml();
|
||||
$primary_photo = $this->get_element_from_id((string) $child['primary'], self::ELEMENT_TYPE_PHOTO);
|
||||
$primary_photo = $this->get_element_from_id((string) $xml->photo['id'], self::ELEMENT_TYPE_PHOTO);
|
||||
|
||||
return new Bridge_Api_Flickr_Container($xml, $this->get_user_id(), $type, $primary_photo->get_thumbnail());
|
||||
return new Bridge_Api_Flickr_Container($xml, $this->get_user_id(), $object, $primary_photo->get_thumbnail());
|
||||
break;
|
||||
default:
|
||||
throw new Bridge_Exception_ElementUnknown('Unknown element ' . $object);
|
||||
@@ -288,7 +288,7 @@ class Bridge_Api_Flickr extends Bridge_Api_Abstract implements Bridge_Api_Interf
|
||||
|
||||
break;
|
||||
default:
|
||||
throw new Bridge_Exception_ElementUnknown('Unknown element ' . $type);
|
||||
throw new Bridge_Exception_ElementUnknown('Unknown element ' . $object);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@@ -10,7 +10,7 @@
|
||||
*/
|
||||
|
||||
use Symfony\Component\Routing\Generator\UrlGenerator;
|
||||
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
/**
|
||||
*
|
||||
* @package Bridge
|
||||
|
@@ -327,7 +327,7 @@ class Bridge_Api_Youtube extends Bridge_Api_Abstract implements Bridge_Api_Inter
|
||||
break;
|
||||
|
||||
default:
|
||||
throw new Bridge_Exception_ElementUnknown('Unknown element ' . $type);
|
||||
throw new Bridge_Exception_ElementUnknown('Unknown element ' . $object);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -348,7 +348,7 @@ class Bridge_Api_Youtube extends Bridge_Api_Abstract implements Bridge_Api_Inter
|
||||
$container_title = $request->get('f_container_title');
|
||||
|
||||
$new_playlist = $this->_api->newPlaylistListEntry();
|
||||
if (trim($description) !== '')
|
||||
if (trim($container_desc) !== '')
|
||||
$new_playlist->description = $this->_api->newDescription()->setText($container_desc);
|
||||
$new_playlist->title = $this->_api->newTitle()->setText($container_title);
|
||||
|
||||
@@ -359,7 +359,7 @@ class Bridge_Api_Youtube extends Bridge_Api_Abstract implements Bridge_Api_Inter
|
||||
|
||||
break;
|
||||
default:
|
||||
throw new Bridge_Exception_ElementUnknown('Unknown element ' . $type);
|
||||
throw new Bridge_Exception_ElementUnknown('Unknown element ' . $container_type);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -389,7 +389,7 @@ class Bridge_Api_Youtube extends Bridge_Api_Abstract implements Bridge_Api_Inter
|
||||
return new Bridge_Api_Youtube_Container($playlistEntry, $destination, null);
|
||||
break;
|
||||
default:
|
||||
throw new Bridge_Exception_ContainerUnknown('Unknown element ' . $container);
|
||||
throw new Bridge_Exception_ContainerUnknown('Unknown element ' . $destination);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
@@ -75,7 +75,7 @@ class DailymotionWithoutOauth2 extends Dailymotion
|
||||
*
|
||||
* @return String the resulting URL
|
||||
*/
|
||||
public function uploadFile($filePath, $oauth_token)
|
||||
public function sendFile($filePath, $oauth_token)
|
||||
{
|
||||
$result = $this->call('file.upload', array(), $oauth_token);
|
||||
$timeout = $this->timeout;
|
||||
|
Reference in New Issue
Block a user