From c7863c71d0ea360d7b4d4e923841b7febd629100 Mon Sep 17 00:00:00 2001 From: Joe Hunt Date: Thu, 5 Jan 2012 11:38:07 +0100 Subject: [PATCH] Fixed a small bug in graphics editkeys (when search lists are enabled) --- includes/ui/ui_lists.inc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/includes/ui/ui_lists.inc b/includes/ui/ui_lists.inc index df6e4b17..1a1e658b 100644 --- a/includes/ui/ui_lists.inc +++ b/includes/ui/ui_lists.inc @@ -429,7 +429,14 @@ function add_edit_combo($combo_name,$url,$key_param='',$restrict_pages='') $key_param = ((strpos($url,'?')) ? '&' : '?') . $key_param; } - $return_url = ($key_param) ? "Add/Edit" : "Add/Edit"; + $href1 = "href='$url${key_param}='"; + $href2 = "href='$url${key_param}'"; + $onclick1 = "onclick=\"javascript:var sel=(document.forms[0].$combo_name.selectedIndex == -1 ? '' : document.forms[0].$combo_name.options[document.forms[0].$combo_name.selectedIndex].value);openWindow(this.href+sel,this.target); return false;\""; + $onclick2 = "onclick=\"javascript:openWindow(this.href,this.target); return false;\""; + $img = "Add/Edit"; + $return_url = ($key_param) ? + "$img" : + "$img"; // Don't pass edit button code If restrict_pages contains instructions but fails security check if ($restrict_pages && strpos($restrict_pages, $page_security) === false) { -- 2.30.2