svn: /pear/pearweb/trunk/public_html/channels/ edit.php

[email protected] ("Daniel O'Connor") Wed, 27 Apr 2011 15:12:11 +0000
Newsgroups php.pear.cvs,php.pear.core
Message-ID <[email protected]>
--0ae8cb226b80c05e5ec95b6db3a8e69d36bd575e
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit

clockwerx                                Wed, 27 Apr 2011 15:12:11 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=310566

Log:
Bug #18484 Can't register some pear channels - ease restrictions

Bug: http://pear.php.net/bugs/18484 (unknown) 
      
Changed paths:
    U   pear/pearweb/trunk/public_html/channels/edit.php

Modified: pear/pearweb/trunk/public_html/channels/edit.php
===================================================================
--- pear/pearweb/trunk/public_html/channels/edit.php	2011-04-27 15:09:09 UTC (rev 310565)
+++ pear/pearweb/trunk/public_html/channels/edit.php	2011-04-27 15:12:11 UTC (rev 310566)
@@ -104,13 +104,17 @@
     try {
         $req = new HTTP_Request2;

-        $req->setURL($url->getScheme() . "://" . $url->getHost() . ":" . $url->getPort() . "/channel.xml");
+        $dir = explode("/", $url->getPath());
+        if (!empty($dir)) {
+            array_pop($dir);
+        }
+        $dir[] = 'channel.xml';
+
+        $url->setPath(implode("/", $dir));
+
+        $req->setURL($url->getURL());
         channel::validate($req, $chan);

-        if ($url->getHost() != $chan->getServer()) {
-            throw new Exception("Channel server for wrong host");
-        }
-
         channel::edit($channel['name'], $project_label->getValue(), $project_link->getValue(), $contact_name->getValue(), $contact_email->getValue());

         if ($is_active->getValue()) {

--0ae8cb226b80c05e5ec95b6db3a8e69d36bd575e--