From c6806bfc1dd23f06840ad3fa56d469f67e1e00d4 Mon Sep 17 00:00:00 2001 From: Juan Molina Date: Sun, 14 Oct 2012 13:17:55 +0200 Subject: [PATCH] BUGFIX: Use locale decimals in ->setColumnWidths() --- code/DataObjectManager.php | 4 ++-- code/DataObjectManager_nestedurls.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/code/DataObjectManager.php b/code/DataObjectManager.php index 264d30f..f7c6d2a 100644 --- a/code/DataObjectManager.php +++ b/code/DataObjectManager.php @@ -315,7 +315,7 @@ public function Headings() )), "SortDirection" => $dir, "IsSorted" => (isset($_REQUEST['ctf'][$this->Name()]['sort'])) && ($_REQUEST['ctf'][$this->Name()]['sort'] == $fieldName), - "ColumnWidthCSS" => !empty($this->column_widths) ? sprintf("style='width:%f%%;'",($this->column_widths[$fieldName] - 0.1)) : "" + "ColumnWidthCSS" => !empty($this->column_widths) ? sprintf("style='width:%F%%;'",($this->column_widths[$fieldName] - 0.1)) : "" )); } return new DataObjectSet($headings); @@ -660,7 +660,7 @@ function Fields() { $widths = $this->parent->getColumnWidths(); if(!empty($widths)) { foreach($fields as $field) { - $field->ColumnWidthCSS = sprintf("style='width:%f%%;'",($widths[$field->Name] - 0.1)); + $field->ColumnWidthCSS = sprintf("style='width:%F%%;'",($widths[$field->Name] - 0.1)); } } return $fields; diff --git a/code/DataObjectManager_nestedurls.php b/code/DataObjectManager_nestedurls.php index 3ec5c40..35a2190 100644 --- a/code/DataObjectManager_nestedurls.php +++ b/code/DataObjectManager_nestedurls.php @@ -153,7 +153,7 @@ public function Headings() )), "SortDirection" => $dir, "IsSorted" => (isset($_REQUEST['ctf'][$this->Name()]['sort'])) && ($_REQUEST['ctf'][$this->Name()]['sort'] == $fieldName), - "ColumnWidthCSS" => !empty($this->column_widths) ? sprintf("style='width:%f%%;'",($this->column_widths[$fieldName] - 0.1)) : "" + "ColumnWidthCSS" => !empty($this->column_widths) ? sprintf("style='width:%F%%;'",($this->column_widths[$fieldName] - 0.1)) : "" )); } return new DataObjectSet($headings); @@ -380,7 +380,7 @@ function Fields() { $widths = $this->parent->getColumnWidths(); if(!empty($widths)) { foreach($fields as $field) { - $field->ColumnWidthCSS = sprintf("style='width:%f%%;'",($widths[$field->Name] - 0.1)); + $field->ColumnWidthCSS = sprintf("style='width:%F%%;'",($widths[$field->Name] - 0.1)); } } return $fields;