1
0
Fork 0

Appending 'packages.json' only if not present in URL

pull/1038/head
Christoph Hochstrasser 2012-08-29 15:08:04 +02:00
parent e2f8098f53
commit 841efc98a6
1 changed files with 7 additions and 1 deletions

View File

@ -191,7 +191,13 @@ class ComposerRepository extends ArrayRepository implements NotifiableRepository
}
try {
$json = new JsonFile($this->url.'/packages.json', new RemoteFilesystem($this->io));
if ($parts = parse_url($this->url) and isset($parts['path']) and strpos($parts['path'], '/packages.json') !== false) {
$jsonUrl = $this->url;
} else {
$jsonUrl = $this->url . '/packages.json';
}
$json = new JsonFile($jsonUrl, new RemoteFilesystem($this->io));
$data = $json->read();
if (!empty($data['notify'])) {