cvs: pearweb /public_html package-info.php
| From: | Tobias Schlitt | Date: | Wed, 19 Jan 2005 21:16:56 +0000 |
| Subject: | cvs: pearweb /public_html package-info.php | ||
| Groups: | php.pear.cvs php.pear.core | ||
| Request: | Send a blank email to pear-cvs+get-28691@lists.php.net to get a copy of this message | ||
toby Wed Jan 19 16:16:56 2005 EDT
Modified files:
/pearweb/public_html package-info.php
Log:
* Fixed URL missmatch bug (reported by Sebastian).
http://cvs.php.net/diff.php/pearweb/public_html/package-info.php?r1=1.88&r2=1.89&ty=u
Index: pearweb/public_html/package-info.php
diff -u pearweb/public_html/package-info.php:1.88 pearweb/public_html/package-info.php:1.89
--- pearweb/public_html/package-info.php:1.88 Wed Jan 19 16:01:14 2005
+++ pearweb/public_html/package-info.php Wed Jan 19 16:16:56 2005
@@ -16,7 +16,7 @@
| Authors: Martin Jansen <mj@php.net> |
| Tomas V.V.Cox <cox@idecnet.com> |
+----------------------------------------------------------------------+
- $Id: package-info.php,v 1.88 2005/01/19 21:01:14 toby Exp $
+ $Id: package-info.php,v 1.89 2005/01/19 21:16:56 toby Exp $
*/
require_once 'Damblan/Trackback.php';
@@ -121,17 +121,12 @@
// Information about the latest release below the summary
$versions = array_keys($pkg['releases']);
-$url = 'http://'.$_SERVER['SERVER_NAME'].'/';
-if (!isset($redirected) || ($redirected !== true)) {
- $url .= 'package/';
-}
-$url .= $params['package|pacid'];
-if ($action != 'trackbacks') {
- $url .= '/'.$action;
-}
-if (!empty($version)) {
- $url .= '/'.$version;
+ {
+$uri = (isset($redirected) && $redirected === true) ?
preg_replace('@/package(/[^/]+)/redirected@', '\1',
$_SERVER['REQUEST_URI']) : $_SERVER['REQUEST_URI'];
}
+
+$url = 'http://'.$_SERVER['SERVER_NAME'].$uri;
+
// Get trackback autodiscovery code
$tmpTrackback = Services_Trackback::create(array(
'id' => $name,