Cleanup comments. Small bugfixes. Second run
[fa-stable.git] / includes / ui / ui_controls.inc
index afc02589bf78db1193b07d28e3655aa20efadc11..54712f9c8ab76bb2f902943be21b14476abaa043 100644 (file)
@@ -134,7 +134,6 @@ function table_section($number=1, $width=false)
                echo "</table>\n";
                output_hidden();
                $width = ($width ? "width='$width'" : "");
-               //echo "</td><td class='tableseparator' $width>\n"; // outer table
                echo "</td><td style='border-left:1px solid #cccccc;' $width>\n"; // outer table
        }
        echo "<table class='tablestyle_inner'>\n";
@@ -265,8 +264,15 @@ function viewer_link($label, $url='', $class='', $id='',  $icon=null)
 
 function menu_link($url, $label, $id=null)
 {
+       global $path_to_root;
+
        $id = default_focus($id);
        $pars = access_string($label);
+
+       if ($url[0] != '/')
+               $url = '/'.$url;
+       $url = $path_to_root.$url;
+
        return "<a href='$url' class='menu_option' id='$id' $pars[1]>$pars[0]</a>";
 }
 
@@ -663,7 +669,7 @@ function page_processing($msg = false)
        global $Ajax;
 
        if ($msg === true)
-               $msg = _('Entered data has not been saved yet.\nDo you want to abandon changes?');
+               $msg = _("Entered data has not been saved yet.\nDo you want to abandon changes?");
 
        $js = "_validate._processing=" . (
                $msg ? '\''.strtr($msg, array("\n"=>'\\n')) . '\';' : 'null;');