Rerun of implemented Selectable Print Orientation (Portrait, Landscape) for all repor...
[fa-stable.git] / includes / current_user.inc
index ae0a4d753dcf152924a014a28d8520c7b2c90bf7..e3a28b0617d34e3e8b6fdc89688d50bd4138448e 100644 (file)
@@ -631,6 +631,14 @@ function array_search_key($needle, $haystack, $valuekey=null)
        return @$keys[0];
 }
 
+// Recalculate report columns if orientation is landscape.
+function recalculate_cols(&$cols)
+{
+       $factor = (user_pagesize() == "A4" ? 1.4 : 1.3);
+       foreach($cols as $key => $col)
+               $cols[$key] = intval($col * $factor); 
+}
+
 function flush_dir($path, $wipe = false) 
 {
        $dir = opendir($path);