mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-18 15:33:15 +00:00
Merge pull request #638 from romainneutron/fix-dailymotion-api
Fix strict standards
This commit is contained in:
@@ -582,7 +582,7 @@ class Bridge_Api_Dailymotion extends Bridge_Api_Abstract implements Bridge_Api_I
|
|||||||
{
|
{
|
||||||
switch ($record->get_type()) {
|
switch ($record->get_type()) {
|
||||||
case self::ELEMENT_TYPE_VIDEO :
|
case self::ELEMENT_TYPE_VIDEO :
|
||||||
$url_file = $this->_api->uploadFile($record->get_hd_file()->getRealPath(), $this->oauth_token);
|
$url_file = $this->_api->uploadFileWithToken($record->get_hd_file()->getRealPath(), $this->oauth_token);
|
||||||
$options = array_merge(array('url' => $url_file), $options);
|
$options = array_merge(array('url' => $url_file), $options);
|
||||||
$video = $this->_api->call('POST /me/videos', $options, $this->oauth_token);
|
$video = $this->_api->call('POST /me/videos', $options, $this->oauth_token);
|
||||||
|
|
||||||
|
@@ -75,7 +75,7 @@ class DailymotionWithoutOauth2 extends Dailymotion
|
|||||||
*
|
*
|
||||||
* @return String the resulting URL
|
* @return String the resulting URL
|
||||||
*/
|
*/
|
||||||
public function uploadFile($filePath, $oauth_token)
|
public function uploadFileWithToken($filePath, $oauth_token)
|
||||||
{
|
{
|
||||||
$result = $this->call('file.upload', array(), $oauth_token);
|
$result = $this->call('file.upload', array(), $oauth_token);
|
||||||
$timeout = $this->timeout;
|
$timeout = $this->timeout;
|
||||||
|
Reference in New Issue
Block a user