diff options
author | Lukas Fleischer <archlinux@cryptocrack.de> | 2012-07-14 01:57:19 +0200 |
---|---|---|
committer | Lukas Fleischer <archlinux@cryptocrack.de> | 2012-07-15 22:48:32 +0200 |
commit | 03486c3b6feafb18f00b0e0c092a1bd4ac2f3903 (patch) | |
tree | f91bbdf64c725e35c7f08ac930e7fcd2a1f066c6 /web/template/pkg_details.php | |
parent | 2425f963f8ad45292c217914b5fee1ed18104c26 (diff) | |
download | aur-03486c3b6feafb18f00b0e0c092a1bd4ac2f3903.tar.gz aur-03486c3b6feafb18f00b0e0c092a1bd4ac2f3903.tar.xz |
Use virtual paths for package details
Extend the routing front/back ends to allow for using
"/package/$pkgname/" for individual packages.
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Diffstat (limited to 'web/template/pkg_details.php')
-rw-r--r-- | web/template/pkg_details.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/web/template/pkg_details.php b/web/template/pkg_details.php index 4cb86021..b4b52d52 100644 --- a/web/template/pkg_details.php +++ b/web/template/pkg_details.php @@ -57,7 +57,7 @@ if ($SID && ($uid == $row["MaintainerUID"] || ($atype == "Developer" || $atype == "Trusted User"))): ?> <td> - <form method="post" action="<?php echo get_uri('/packages/'); ?>?ID=<?php echo $pkgid ?>"> + <form method="post" action="<?php echo htmlspecialchars(get_pkg_uri($row['Name']), ENT_QUOTES); ?>"> <div> <input type="hidden" name="action" value="do_ChangeCategory" /> <?php if ($SID): ?> @@ -139,7 +139,7 @@ if ($atype == "Developer" || $atype == "Trusted User"): # darr: (DepName, DepCondition, PackageID), where ID is NULL if it didn't exist if (!is_null($darr[2])): ?> - <li><a href="<?php echo get_uri('/packages/'); ?>?ID=<?php echo $darr[2]?>" title="<?php echo __('View packages details for').' '.$darr[0].$darr[1]?>"><?php echo $darr[0].$darr[1]?></a></li> + <li><a href="<?php echo htmlspecialchars(get_pkg_uri($darr[0]), ENT_QUOTES); ?>" title="<?php echo __('View packages details for').' '.$darr[0].$darr[1]?>"><?php echo $darr[0].$darr[1]?></a></li> <?php else: ?> <li><a href="http://www.archlinux.org/packages/?q=<?php echo urlencode($darr[0])?>" title="<?php echo __('View packages details for').' '.$darr[0].$darr[1] ?>"><?php echo $darr[0].$darr[1] ?></a></li> <?php endif; ?> @@ -155,7 +155,7 @@ if ($atype == "Developer" || $atype == "Trusted User"): # darr: (PackageName, PackageID) while (list($k, $darr) = each($requiredby)): ?> - <li><a href="<?php echo get_uri('/packages/'); ?>?ID=<?php echo $darr[1] ?>" title="<?php echo __('View packages details for').' '.$darr[0]?>"><?php echo $darr[0] ?></a></li> + <li><a href="<?php echo htmlspecialchars(get_pkg_uri($darr[0]), ENT_QUOTES); ?>" title="<?php echo __('View packages details for').' '.$darr[0]?>"><?php echo $darr[0] ?></a></li> <?php endwhile; ?> </ul> <?php endif; ?> |