Merged stable branch up to 2.3.10
[fa-stable.git] / includes / ui / ui_controls.inc
index fa4f62d78abed3af5ddc62e80ed75ee436c06351..d2e094ae45e7e462bb2d67a7969e42c4182f9ea5 100644 (file)
@@ -166,7 +166,7 @@ function access_string($label, $clean=false)
        return $clean ? $label : array($label, $access);
 }
 
-function hyperlink_back($center=true, $no_menu=true, $type_no=0, $trans_no=0)
+function hyperlink_back($center=true, $no_menu=true, $type_no=0, $trans_no=0, $final=false)
 {
        global $path_to_root;
 
@@ -186,8 +186,8 @@ function hyperlink_back($center=true, $no_menu=true, $type_no=0, $trans_no=0)
                if ($id != 0)
                        echo "<td align=center><a href='$path_to_root/admin/attachments.php?vw=$id' target='blanc_'>"._("View Attachment")."</a></td>\n";
                echo "<td align=center><a href='javascript:window.print();'>"._("Print")."</a></td>\n";
-       }       
-       echo "<td align=center><a href='javascript:goBack();'>".($no_menu ? _("Close") : _("Back"))."</a></td>\n";
+       }
+       echo "<td align=center><a href='javascript:goBack(".($final ? '-2' : '').");'>".($no_menu ? _("Close") : _("Back"))."</a></td>\n";
        end_row();
        end_table();
        if ($center)