From 57a5cbfd88b2b91722ce0bf6911b416d051dde65 Mon Sep 17 00:00:00 2001 From: Dan Vratil Date: Sun, 21 Nov 2010 02:59:07 -0500 Subject: Auto redirect from confirmation screens. Finally move comment deletion and category editing into functions and remove pkgedit.php Signed-off-by: Loui Chang -Fix indentation -Fix variable naming conflict $id vs $cid --- web/template/pkg_comments.php | 23 ++++++++++++++--------- web/template/pkg_details.php | 23 +++++++++++++++++------ 2 files changed, 31 insertions(+), 15 deletions(-) (limited to 'web/template') diff --git a/web/template/pkg_comments.php b/web/template/pkg_comments.php index 02171a0..e4a9da1 100644 --- a/web/template/pkg_comments.php +++ b/web/template/pkg_comments.php @@ -3,20 +3,25 @@ $uid = uid_from_sid($SID); while (list($indx, $carr) = each($comments)) { ?>
'; - - echo $durl; - } if ($SID) { $carr['UserName'] = "{$carr['UserName']}"; } - echo __('Comment by: %s on %s', $carr['UserName'], gmdate('r', $carr['CommentTS'])); + $commentHeader =__('Comment by: %s on %s', $carr['UserName'], gmdate('r', $carr['CommentTS'])); + + if (canDeleteCommentArray($carr, $atype, $uid)) { + $durl = '
'; + $durl.= ''; + $durl.= ''; + $durl.= '"; + } + + echo $commentHeader; ?>
diff --git a/web/template/pkg_details.php b/web/template/pkg_details.php index a4b8f95..7c6356d 100644 --- a/web/template/pkg_details.php +++ b/web/template/pkg_details.php @@ -4,13 +4,24 @@ $pkgid = intval($_REQUEST['ID']); if ($row["Location"] == "unsupported" and ($uid == $row["MaintainerUID"] or ($atype == "Developer" or $atype == "Trusted User"))) { - $edit_cat = "".$row["Category"].""; - $edit_cat .= "  ("; - $edit_cat .= __("change category").")"; + $catarr = pkgCategories(); + $edit_cat = "\n"; + $edit_cat.= ""; + $edit_cat.= $row['Location']." :: "; + $edit_cat.= " "; + $edit_cat.= ""; + } else { - $edit_cat = $row['Category']; + $edit_cat = $row['Location']." :: ".$row['Category']; } if ($row["MaintainerUID"]) { @@ -49,7 +60,7 @@ $out_of_date_time = ($row["OutOfDateTS"] == 0) ? $msg : gmdate("r", intval($row[

-
+

-- cgit v1.2.3-70-g09d2