diff options
Diffstat (limited to 'web/template')
-rw-r--r-- | web/template/actions_form.php | 2 | ||||
-rw-r--r-- | web/template/pkg_comments.php | 4 | ||||
-rw-r--r-- | web/template/pkg_details.php | 6 | ||||
-rw-r--r-- | web/template/pkg_search_results.php | 2 | ||||
-rw-r--r-- | web/template/stats/updates_table.php | 2 |
5 files changed, 8 insertions, 8 deletions
diff --git a/web/template/actions_form.php b/web/template/actions_form.php index 9cd50244..045022d8 100644 --- a/web/template/actions_form.php +++ b/web/template/actions_form.php @@ -1,5 +1,5 @@ <div class="box"> - <form action="<?php echo get_uri('/packages/'); ?>?ID=<?php echo $row['ID'] ?>" method="post"> + <form action="<?php echo htmlspecialchars(get_pkg_uri($row['Name']), ENT_QUOTES); ?>" method="post"> <fieldset> <input type="hidden" name="IDs[<?php echo $row['ID'] ?>]" value="1" /> <input type="hidden" name="ID" value="<?php echo $row['ID'] ?>" /> diff --git a/web/template/pkg_comments.php b/web/template/pkg_comments.php index 5b5f6104..40b2fd18 100644 --- a/web/template/pkg_comments.php +++ b/web/template/pkg_comments.php @@ -4,7 +4,7 @@ $count = package_comments_count($_GET['ID']); ?> <div id="news"> <h3> - <a href="<?php echo htmlentities($_SERVER['REQUEST_URI'], ENT_QUOTES) ?>&comments=all" title="<?php echo __('View all %s comments' , $count) ?>"><?php echo __('Latest Comments') ?></a> + <a href="<?php echo htmlentities($_SERVER['REQUEST_URI'], ENT_QUOTES) ?>?comments=all" title="<?php echo __('View all %s comments' , $count) ?>"><?php echo __('Latest Comments') ?></a> <span class="arrow"></span> </h3> @@ -14,7 +14,7 @@ $count = package_comments_count($_GET['ID']); endif; ?> <h4> <?php if (canDeleteCommentArray($row, $atype, $uid)): ?> - <form method="post" action="<?php echo get_uri('/packages/'); ?>?ID=<?php echo $row['ID'] ?>"> + <form method="post" action="<?php echo htmlspecialchars(get_pkg_uri($row['Name']), ENT_QUOTES); ?>"> <fieldset style="display:inline;"> <input type="hidden" name="action" value="do_DeleteComment" /> <input type="hidden" name="comment_id" value="<?php echo $row['ID'] ?>" /> 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; ?> diff --git a/web/template/pkg_search_results.php b/web/template/pkg_search_results.php index 440698ba..11db7a14 100644 --- a/web/template/pkg_search_results.php +++ b/web/template/pkg_search_results.php @@ -52,7 +52,7 @@ if (!$result): ?> <td><input type="checkbox" name="IDs[<?php echo $row["ID"] ?>]" value="1" /></td> <?php endif; ?> <td><?php echo htmlspecialchars($row["Category"]) ?></td> - <td><a href="<?php echo get_uri('/packages/'); ?>?ID=<?php echo $row["ID"] ?>"><?php echo htmlspecialchars($row["Name"]) . ' ' . htmlspecialchars($row["Version"]) ?></a></td> + <td><a href="<?php echo htmlspecialchars(get_pkg_uri($row["Name"]), ENT_QUOTES); ?>"><?php echo htmlspecialchars($row["Name"]) . ' ' . htmlspecialchars($row["Version"]) ?></a></td> <td><?php echo $row["NumVotes"] ?></td> <?php if ($SID): ?> <td> diff --git a/web/template/stats/updates_table.php b/web/template/stats/updates_table.php index 835d956f..6e43e224 100644 --- a/web/template/stats/updates_table.php +++ b/web/template/stats/updates_table.php @@ -6,7 +6,7 @@ <?php foreach ($newest_packages->getIterator() as $row): ?> <tr> <td> - <a href="<?php echo get_uri('/packages/'); ?>?ID=<?php print intval($row["ID"]); ?>"><?php print htmlspecialchars($row["Name"]) . ' ' . htmlspecialchars($row["Version"]); ?></a> + <a href="<?php echo get_pkg_uri($row["Name"]); ?>"><?php print htmlspecialchars($row["Name"]) . ' ' . htmlspecialchars($row["Version"]); ?></a> </td> <td> <span><?php print gmdate("Y-m-d H:i", intval($row["ModifiedTS"])); ?></span> |