From 944dc33e93f8362fe2999c0ac0085b56807fe899 Mon Sep 17 00:00:00 2001
From: Robert Ricci <ricci@cs.utah.edu>
Date: Thu, 16 Dec 2004 16:53:13 +0000
Subject: [PATCH] Added an optional 'target' param for popping up new windows.

---
 www/menu.php3 | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/www/menu.php3 b/www/menu.php3
index 3606f53b52..1dd1427d9c 100644
--- a/www/menu.php3
+++ b/www/menu.php3
@@ -847,14 +847,20 @@ function PAGEERROR($msg) {
 #
 # Sub Page/Menu Stuff
 #
-function WRITESUBMENUBUTTON($text, $link) {
+function WRITESUBMENUBUTTON($text, $link, $target = "") {
 
+    #
+    # Optional 'target' agument, so that we can pop up new windows
+    #
+    if ($target) {
+	$targettext = "target='$target'";
+    }
 
     echo "<!-- Table row for button $text -->
           <tr>
             <td valign=center align=left nowrap>
                 <b>
-         	 <a class=sidebarbutton href='$link'>$text</a>\n";
+         	 <a class=sidebarbutton href='$link' $targettext>$text</a>\n";
 
     echo "      </b>
             </td>
-- 
GitLab