1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-30 19:30:25 +02:00

Merge pull request #1358 from LaocheXe/LaocheXe-patch-1357

#1357 Youtube API
This commit is contained in:
Cameron
2016-02-15 09:32:54 -08:00

View File

@@ -1458,7 +1458,7 @@ class media_admin_ui extends e_admin_ui
*/
function videoTab($parm='')
{
// $apiKey = e107::pref('core','youtube_apikey');
$apiKey = e107::pref('core','youtube_apikey');
$searchQry = $this->getQuery('search');
@@ -1525,7 +1525,7 @@ class media_admin_ui extends e_admin_ui
$accFeed = "https://www.googleapis.com/youtube/v3/channels?part=contentDetails&forUsername=".$defaultAccount."&key=".$apiKey;
$accData = e107::getFile()->getRemoteContent($accFeed);
$accData = json_decode($accData,true);
$channelID = null;
$channelID = e107::pref('core', 'youtube_default_account');
foreach($accData['items'] as $val)
{
@@ -3041,4 +3041,4 @@ if(!e_AJAX_REQUEST) require_once("footer.php");
?>
?>