Discussion:
svn: /pear/pearweb/trunk/public_html/channels/ edit.php
Daniel O'Connor
2011-04-27 15:12:11 UTC
Permalink
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()) {

Loading...