Activated strict SQL mode, minor SQL injection fix, fixed _vl() debug helper.
[fa-stable.git] / includes / ui / ui_view.inc
index 9030ca90c9db22d88a926c111347669bf70b33f0..35363f896bd519e2792499ab0e241f37e9589401 100644 (file)
@@ -1455,6 +1455,14 @@ function changeCCYear(change) {
 function changeCCMonth(change) {
   cC.changeMonth(change);
 }
+window.addEventListener('click', function(e) {
+  if (document.getElementById('CC').contains(e.target)){} else {
+    if (cC.visible()) {
+      cC.hide();
+    }
+  }
+});
+
 document.write(\"<iframe id='CCIframe' src='javascript:false;' frameBorder='0' scrolling='no'></iframe>\");
 document.write(\"<div id='CC'></div>\");";
 
@@ -1489,7 +1497,7 @@ if (!function_exists('_vd'))
 
 function _vl($mixed, $title = '', $exit = false)
 {
-       error_log((!empty($title) ? ($title .':') : '') . var_export($mixed, true));
+       error_log((!empty($title) ? ($title .':') : '') . print_r($mixed, true));
        if ($exit)
                exit;
 }
@@ -1562,7 +1570,7 @@ function trans_editor_link($type, $trans_no)
        //   35=> Cost Update,
        );
 
-       return !isset($editor_url[$type]) ? '' :
+       return !isset($editor_url[$type]) ? '--' :
                (is_closed_trans($type, $trans_no) ? set_icon(ICON_CLOSED, _('Closed')) :
                        pager_link(_("Edit"), sprintf($editor_url[$type], $trans_no, $type), ICON_EDIT));
 }