Skip to content

Commit

Permalink
Github API links fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
moldcraft committed Jan 8, 2015
1 parent 2effbd1 commit cc22369
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions extensions/github-update/class-fw-extension-github-update.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit cc22369

Please sign in to comment.