Browse Source

Allow notifyUrl to be a complete URL

Jordi Boggiano 13 years ago
parent
commit
d80180c2b9
1 changed files with 5 additions and 1 deletions
  1. 5 1
      src/Composer/Repository/ComposerRepository.php

+ 5 - 1
src/Composer/Repository/ComposerRepository.php

@@ -87,7 +87,11 @@ class ComposerRepository extends ArrayRepository implements NotifiableRepository
             $data = $json->read();
 
             if (!empty($data['notify'])) {
-                $this->notifyUrl = preg_replace('{(https?://[^/]+).*}i', '$1' . $data['notify'], $this->url);
+                if ('/' === $data['notify'][0]) {
+                    $this->notifyUrl = preg_replace('{(https?://[^/]+).*}i', '$1' . $data['notify'], $this->url);
+                } else {
+                    $this->notifyUrl = $data['notify'];
+                }
             }
 
             $this->cache->write('packages.json', json_encode($data));