From cc2236977cbf140dab0d4722987f8b6f4680fdc3 Mon Sep 17 00:00:00 2001 From: moldcraft Date: Thu, 8 Jan 2015 22:14:39 +0200 Subject: [PATCH] Github API links fixes --- .../class-fw-extension-github-update.php | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/extensions/github-update/class-fw-extension-github-update.php b/extensions/github-update/class-fw-extension-github-update.php index c04c675..ca9b50e 100644 --- a/extensions/github-update/class-fw-extension-github-update.php +++ b/extensions/github-update/class-fw-extension-github-update.php @@ -67,7 +67,9 @@ private function fetch_latest_version($user_slash_repo) $http = new WP_Http(); - $response = $http->get('/repos/'. $user_slash_repo .'/releases'); + $response = $http->get( + $this->get_github_api_url('/repos/'. $user_slash_repo .'/releases') + ); unset($http); @@ -285,9 +287,12 @@ private function download($user_slash_repo, $version, $wp_filesystem_download_di $http = new WP_Http(); - $response = $http->request($release['zipball_url'], array( - 'timeout' => $this->download_timeout, - )); + $response = $http->request( + 'https://github.com/'. $user_slash_repo .'/archive/'. $release['tag_name'] .'.zip', + array( + 'timeout' => $this->download_timeout, + ) + ); unset($http);