diff -r 5e7a0fedabdf -r 877f952ae2bd web/lib/Zend/Gdata/YouTube.php --- a/web/lib/Zend/Gdata/YouTube.php Thu Mar 21 17:31:31 2013 +0100 +++ b/web/lib/Zend/Gdata/YouTube.php Thu Mar 21 19:50:53 2013 +0100 @@ -16,9 +16,9 @@ * @category Zend * @package Zend_Gdata * @subpackage YouTube - * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @version $Id: YouTube.php 20096 2010-01-06 02:05:09Z bkarwin $ + * @version $Id: YouTube.php 24796 2012-05-12 03:34:26Z adamlundrigan $ */ /** @@ -79,7 +79,7 @@ * @category Zend * @package Zend_Gdata * @subpackage YouTube - * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Gdata_YouTube extends Zend_Gdata_Media @@ -88,22 +88,22 @@ const AUTH_SERVICE_NAME = 'youtube'; const CLIENTLOGIN_URL = 'https://www.google.com/youtube/accounts/ClientLogin'; - const STANDARD_TOP_RATED_URI = 'http://gdata.youtube.com/feeds/api/standardfeeds/top_rated'; - const STANDARD_MOST_VIEWED_URI = 'http://gdata.youtube.com/feeds/api/standardfeeds/most_viewed'; - const STANDARD_RECENTLY_FEATURED_URI = 'http://gdata.youtube.com/feeds/api/standardfeeds/recently_featured'; - const STANDARD_WATCH_ON_MOBILE_URI = 'http://gdata.youtube.com/feeds/api/standardfeeds/watch_on_mobile'; + const STANDARD_TOP_RATED_URI = 'https://gdata.youtube.com/feeds/api/standardfeeds/top_rated'; + const STANDARD_MOST_VIEWED_URI = 'https://gdata.youtube.com/feeds/api/standardfeeds/most_viewed'; + const STANDARD_RECENTLY_FEATURED_URI = 'https://gdata.youtube.com/feeds/api/standardfeeds/recently_featured'; + const STANDARD_WATCH_ON_MOBILE_URI = 'https://gdata.youtube.com/feeds/api/standardfeeds/watch_on_mobile'; const STANDARD_TOP_RATED_URI_V2 = - 'http://gdata.youtube.com/feeds/api/standardfeeds/top_rated'; + 'https://gdata.youtube.com/feeds/api/standardfeeds/top_rated'; const STANDARD_MOST_VIEWED_URI_V2 = - 'http://gdata.youtube.com/feeds/api/standardfeeds/most_viewed'; + 'https://gdata.youtube.com/feeds/api/standardfeeds/most_viewed'; const STANDARD_RECENTLY_FEATURED_URI_V2 = - 'http://gdata.youtube.com/feeds/api/standardfeeds/recently_featured'; + 'https://gdata.youtube.com/feeds/api/standardfeeds/recently_featured'; const STANDARD_WATCH_ON_MOBILE_URI_V2 = - 'http://gdata.youtube.com/feeds/api/standardfeeds/watch_on_mobile'; + 'https://gdata.youtube.com/feeds/api/standardfeeds/watch_on_mobile'; - const USER_URI = 'http://gdata.youtube.com/feeds/api/users'; - const VIDEO_URI = 'http://gdata.youtube.com/feeds/api/videos'; + const USER_URI = 'https://gdata.youtube.com/feeds/api/users'; + const VIDEO_URI = 'https://gdata.youtube.com/feeds/api/videos'; const PLAYLIST_REL = 'http://gdata.youtube.com/schemas/2007#playlist'; const USER_UPLOADS_REL = 'http://gdata.youtube.com/schemas/2007#user.uploads'; const USER_PLAYLISTS_REL = 'http://gdata.youtube.com/schemas/2007#user.playlists'; @@ -113,9 +113,9 @@ const VIDEO_RESPONSES_REL = 'http://gdata.youtube.com/schemas/2007#video.responses'; const VIDEO_RATINGS_REL = 'http://gdata.youtube.com/schemas/2007#video.ratings'; const VIDEO_COMPLAINTS_REL = 'http://gdata.youtube.com/schemas/2007#video.complaints'; - const ACTIVITY_FEED_URI = 'http://gdata.youtube.com/feeds/api/events'; + const ACTIVITY_FEED_URI = 'https://gdata.youtube.com/feeds/api/events'; const FRIEND_ACTIVITY_FEED_URI = - 'http://gdata.youtube.com/feeds/api/users/default/friendsactivity'; + 'https://gdata.youtube.com/feeds/api/users/default/friendsactivity'; /** * The URI of the in-reply-to schema for comments in reply to @@ -132,7 +132,7 @@ * @var string */ const INBOX_FEED_URI = - 'http://gdata.youtube.com/feeds/api/users/default/inbox'; + 'https://gdata.youtube.com/feeds/api/users/default/inbox'; /** * The maximum number of users for which activity can be requested for, @@ -256,7 +256,7 @@ if ($location == null) { $uri = self::VIDEO_URI; } else if ($location instanceof Zend_Gdata_Query) { - $uri = $location->getQueryUrl(); + $uri = $location->getQueryUrl($this->getMajorProtocolVersion()); } else { $uri = $location; } @@ -286,7 +286,7 @@ $uri = self::VIDEO_URI . "/" . $videoId; } } else if ($location instanceof Zend_Gdata_Query) { - $uri = $location->getQueryUrl(); + $uri = $location->getQueryUrl($this->getMajorProtocolVersion()); } else { $uri = $location; } @@ -324,7 +324,7 @@ $uri = self::VIDEO_URI . "/" . $videoId . "/" . self::RELATED_URI_SUFFIX; } else if ($location instanceof Zend_Gdata_Query) { - $uri = $location->getQueryUrl(); + $uri = $location->getQueryUrl($this->getMajorProtocolVersion()); } else { $uri = $location; } @@ -346,7 +346,7 @@ $uri = self::VIDEO_URI . "/" . $videoId . "/" . self::RESPONSES_URI_SUFFIX; } else if ($location instanceof Zend_Gdata_Query) { - $uri = $location->getQueryUrl(); + $uri = $location->getQueryUrl($this->getMajorProtocolVersion()); } else { $uri = $location; } @@ -367,7 +367,7 @@ if ($videoId !== null) { $uri = self::VIDEO_URI . "/" . $videoId . "/comments"; } else if ($location instanceof Zend_Gdata_Query) { - $uri = $location->getQueryUrl(); + $uri = $location->getQueryUrl($this->getMajorProtocolVersion()); } else { $uri = $location; } @@ -398,7 +398,7 @@ $location->setFeedType('top rated'); } } - $uri = $location->getQueryUrl(); + $uri = $location->getQueryUrl($this->getMajorProtocolVersion()); } else { $uri = $location; } @@ -430,7 +430,7 @@ $location->setFeedType('most viewed'); } } - $uri = $location->getQueryUrl(); + $uri = $location->getQueryUrl($this->getMajorProtocolVersion()); } else { $uri = $location; } @@ -461,7 +461,7 @@ $location->setFeedType('recently featured'); } } - $uri = $location->getQueryUrl(); + $uri = $location->getQueryUrl($this->getMajorProtocolVersion()); } else { $uri = $location; } @@ -493,7 +493,7 @@ $location->setFeedType('watch on mobile'); } } - $uri = $location->getQueryUrl(); + $uri = $location->getQueryUrl($this->getMajorProtocolVersion()); } else { $uri = $location; } @@ -513,7 +513,7 @@ if ($user !== null) { $uri = self::USER_URI . '/' . $user . '/playlists'; } else if ($location instanceof Zend_Gdata_Query) { - $uri = $location->getQueryUrl(); + $uri = $location->getQueryUrl($this->getMajorProtocolVersion()); } else { $uri = $location; } @@ -531,7 +531,7 @@ public function getPlaylistVideoFeed($location) { if ($location instanceof Zend_Gdata_Query) { - $uri = $location->getQueryUrl(); + $uri = $location->getQueryUrl($this->getMajorProtocolVersion()); } else { $uri = $location; } @@ -551,7 +551,7 @@ if ($user !== null) { $uri = self::USER_URI . '/' . $user . '/subscriptions'; } else if ($location instanceof Zend_Gdata_Query) { - $uri = $location->getQueryUrl(); + $uri = $location->getQueryUrl($this->getMajorProtocolVersion()); } else { $uri = $location; } @@ -571,7 +571,7 @@ if ($user !== null) { $uri = self::USER_URI . '/' . $user . '/contacts'; } else if ($location instanceof Zend_Gdata_Query) { - $uri = $location->getQueryUrl(); + $uri = $location->getQueryUrl($this->getMajorProtocolVersion()); } else { $uri = $location; } @@ -592,7 +592,7 @@ $uri = self::USER_URI . '/' . $user . '/' . self::UPLOADS_URI_SUFFIX; } else if ($location instanceof Zend_Gdata_Query) { - $uri = $location->getQueryUrl(); + $uri = $location->getQueryUrl($this->getMajorProtocolVersion()); } else { $uri = $location; } @@ -613,7 +613,7 @@ $uri = self::USER_URI . '/' . $user . '/' . self::FAVORITES_URI_SUFFIX; } else if ($location instanceof Zend_Gdata_Query) { - $uri = $location->getQueryUrl(); + $uri = $location->getQueryUrl($this->getMajorProtocolVersion()); } else { $uri = $location; } @@ -633,7 +633,7 @@ if ($user !== null) { $uri = self::USER_URI . '/' . $user; } else if ($location instanceof Zend_Gdata_Query) { - $uri = $location->getQueryUrl(); + $uri = $location->getQueryUrl($this->getMajorProtocolVersion()); } else { $uri = $location; } @@ -697,7 +697,7 @@ * @return array An array containing a token and URL */ public function getFormUploadToken($videoEntry, - $url='http://gdata.youtube.com/action/GetUploadToken') + $url='https://gdata.youtube.com/action/GetUploadToken') { if ($url != null && is_string($url)) { // $response is a Zend_Http_response object @@ -729,7 +729,7 @@ $uri = null; if ($username instanceof Zend_Gdata_Query) { - $uri = $username->getQueryUrl(); + $uri = $username->getQueryUrl($this->getMajorProtocolVersion()); } else { if (count(explode(',', $username)) > self::ACTIVITY_FEED_MAX_USERS) { @@ -834,7 +834,7 @@ $messageEntry->setSummary($this->newSummary($body)); } - $insertUrl = 'http://gdata.youtube.com/feeds/api/users/' . + $insertUrl = 'https://gdata.youtube.com/feeds/api/users/' . $recipientUserName . '/inbox'; $response = $this->insertEntry($messageEntry, $insertUrl, 'Zend_Gdata_YouTube_InboxEntry'); @@ -844,11 +844,11 @@ /** * Post a comment in reply to an existing comment * - * @param $commentEntry Zend_Gdata_YouTube_CommentEntry The comment entry - * to reply to - * @param $commentText string The text of the comment to post - * @return A Zend_Gdata_YouTube_CommentEntry representing the posted - * comment + * @param Zend_Gdata_YouTube_CommentEntry $commentEntry The comment entry + * to reply to + * @param string $commentText The text of the + * comment to post + * @return Zend_Gdata_YouTube_CommentEntry the posted comment */ public function replyToCommentEntry($commentEntry, $commentText) {