summaryrefslogtreecommitdiffstats
path: root/web/html/packages.php
diff options
context:
space:
mode:
Diffstat (limited to 'web/html/packages.php')
-rw-r--r--web/html/packages.php15
1 files changed, 9 insertions, 6 deletions
diff --git a/web/html/packages.php b/web/html/packages.php
index 094c221..c1e54e1 100644
--- a/web/html/packages.php
+++ b/web/html/packages.php
@@ -20,9 +20,12 @@ if (!isset($pkgid) || !isset($pkgname)) {
}
}
-# Set the title to the current query if required
+# Set the title to the current query and get package details if required
+$details = array();
+
if (isset($pkgname)) {
$title = $pkgname;
+ $details = get_package_details($pkgid);
} else if (!empty($_GET['K'])) {
$title = __("Search Criteria") . ": " . $_GET['K'];
} else {
@@ -51,9 +54,9 @@ if (isset($_POST['IDs'])) {
$output = "";
if (check_token()) {
if (current_action("do_Flag")) {
- $output = pkg_flag($atype, $ids, true);
+ $output = pkg_flag($atype, $ids);
} elseif (current_action("do_UnFlag")) {
- $output = pkg_flag($atype, $ids, False);
+ $output = pkg_unflag($atype, $ids);
} elseif (current_action("do_Adopt")) {
$output = pkg_adopt($atype, $ids, true);
} elseif (current_action("do_Disown")) {
@@ -93,7 +96,7 @@ if (check_token()) {
}
}
-html_header($title);
+html_header($title, $details);
?>
<?php if ($output): ?>
@@ -105,10 +108,10 @@ if (isset($pkgid)) {
include('pkg_search_form.php');
if ($pkgid) {
if (isset($_COOKIE["AURSID"])) {
- package_details($pkgid, $_COOKIE["AURSID"]);
+ display_package_details($pkgid, $details, $_COOKIE["AURSID"]);
}
else {
- package_details($pkgid, null);
+ display_package_details($pkgid, $details, null);
}
} else {
print __("Error trying to retrieve package details.")."<br />\n";