From 243f3f0c4c2831f4cf27c33f1d4cc748843d24da Mon Sep 17 00:00:00 2001 From: Simon Könnecke Date: Mon, 25 Nov 2013 12:26:03 +0100 Subject: No decimal points for Kilobyte and Byte #5371. --- lib/private/helper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/private/helper.php') diff --git a/lib/private/helper.php b/lib/private/helper.php index c82d3bd4ef4..4fe3097af26 100644 --- a/lib/private/helper.php +++ b/lib/private/helper.php @@ -252,7 +252,7 @@ class OC_Helper { if ($bytes < 1024) { return "$bytes B"; } - $bytes = round($bytes / 1024, 1); + $bytes = round($bytes / 1024, 0); if ($bytes < 1024) { return "$bytes kB"; } -- cgit v1.2.3 From 9d869ab5968b737531a0f0bb3c648d7ffe920341 Mon Sep 17 00:00:00 2001 From: Thomas Müller Date: Tue, 7 Jan 2014 14:53:02 +0100 Subject: we shall explode on ',' only --- lib/private/helper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/private/helper.php') diff --git a/lib/private/helper.php b/lib/private/helper.php index 4fe3097af26..a06932a11f9 100644 --- a/lib/private/helper.php +++ b/lib/private/helper.php @@ -858,7 +858,7 @@ class OC_Helper { if (!function_exists($function_name)) { return false; } - $disabled = explode(', ', ini_get('disable_functions')); + $disabled = explode(',', ini_get('disable_functions')); if (in_array($function_name, $disabled)) { return false; } -- cgit v1.2.3 From 09d7882571e047de4ed907f0f0317dae056cf890 Mon Sep 17 00:00:00 2001 From: Thomas Müller Date: Tue, 7 Jan 2014 19:47:01 +0100 Subject: trimming all array elements --- lib/private/helper.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/private/helper.php') diff --git a/lib/private/helper.php b/lib/private/helper.php index a06932a11f9..1c8d01c141f 100644 --- a/lib/private/helper.php +++ b/lib/private/helper.php @@ -859,10 +859,12 @@ class OC_Helper { return false; } $disabled = explode(',', ini_get('disable_functions')); + $disabled = array_map('trim', $disabled); if (in_array($function_name, $disabled)) { return false; } - $disabled = explode(', ', ini_get('suhosin.executor.func.blacklist')); + $disabled = explode(',', ini_get('suhosin.executor.func.blacklist')); + $disabled = array_map('trim', $disabled); if (in_array($function_name, $disabled)) { return false; } -- cgit v1.2.3 From 47ea7704ca796a23fc5e9ec8f4a7668d1bbe9446 Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Thu, 23 Jan 2014 02:46:05 +0100 Subject: Fix icons for xml,ppt,dot,dotx files. --- lib/private/helper.php | 2 ++ lib/private/mimetypes.list.php | 2 ++ 2 files changed, 4 insertions(+) (limited to 'lib/private/helper.php') diff --git a/lib/private/helper.php b/lib/private/helper.php index 1c8d01c141f..90ef704c3cc 100644 --- a/lib/private/helper.php +++ b/lib/private/helper.php @@ -161,6 +161,7 @@ class OC_Helper { 'application/vnd.oasis.opendocument.text-template' => 'x-office/document', 'application/vnd.oasis.opendocument.text-web' => 'x-office/document', 'application/vnd.oasis.opendocument.text-master' => 'x-office/document', + 'application/mspowerpoint' => 'x-office/presentation', 'application/vnd.ms-powerpoint' => 'x-office/presentation', 'application/vnd.openxmlformats-officedocument.presentationml.presentation' => 'x-office/presentation', 'application/vnd.openxmlformats-officedocument.presentationml.template' => 'x-office/presentation', @@ -171,6 +172,7 @@ class OC_Helper { 'application/vnd.ms-powerpoint.slideshow.macroEnabled.12' => 'x-office/presentation', 'application/vnd.oasis.opendocument.presentation' => 'x-office/presentation', 'application/vnd.oasis.opendocument.presentation-template' => 'x-office/presentation', + 'application/msexcel' => 'x-office/spreadsheet', 'application/vnd.ms-excel' => 'x-office/spreadsheet', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' => 'x-office/spreadsheet', 'application/vnd.openxmlformats-officedocument.spreadsheetml.template' => 'x-office/spreadsheet', diff --git a/lib/private/mimetypes.list.php b/lib/private/mimetypes.list.php index 9db396e9fd2..1ad333b5084 100644 --- a/lib/private/mimetypes.list.php +++ b/lib/private/mimetypes.list.php @@ -36,6 +36,8 @@ return array( 'c++' => 'text/x-c++src', 'doc'=>'application/msword', 'docx'=>'application/vnd.openxmlformats-officedocument.wordprocessingml.document', + 'dot'=>'application/msword', + 'dotx'=>'application/vnd.openxmlformats-officedocument.wordprocessingml.template', 'dv'=>'video/dv', 'epub' => 'application/epub+zip', 'exe'=>'application/x-ms-dos-executable', -- cgit v1.2.3 From 96f194c0f6038444aae4270d2481a2ee1ccd7691 Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Thu, 23 Jan 2014 03:06:14 +0100 Subject: Add icons for mdb and accdb files. --- lib/private/helper.php | 1 + lib/private/mimetypes.list.php | 2 ++ 2 files changed, 3 insertions(+) (limited to 'lib/private/helper.php') diff --git a/lib/private/helper.php b/lib/private/helper.php index 90ef704c3cc..58bee9c6300 100644 --- a/lib/private/helper.php +++ b/lib/private/helper.php @@ -182,6 +182,7 @@ class OC_Helper { 'application/vnd.ms-excel.sheet.binary.macroEnabled.12' => 'x-office/spreadsheet', 'application/vnd.oasis.opendocument.spreadsheet' => 'x-office/spreadsheet', 'application/vnd.oasis.opendocument.spreadsheet-template' => 'x-office/spreadsheet', + 'application/msaccess' => 'database', ); if (isset($alias[$mimetype])) { diff --git a/lib/private/mimetypes.list.php b/lib/private/mimetypes.list.php index 1ad333b5084..40fb1d2d97d 100644 --- a/lib/private/mimetypes.list.php +++ b/lib/private/mimetypes.list.php @@ -24,6 +24,7 @@ * Array mapping file extensions to mimetypes (in alphabetical order). */ return array( + 'accdb'=>'application/msaccess', 'ai' => 'application/illustrator', 'avi'=>'video/x-msvideo', 'bash' => 'text/x-shellscript', @@ -60,6 +61,7 @@ return array( 'markdown' => 'text/markdown', 'mdown' => 'text/markdown', 'md' => 'text/markdown', + 'mdb'=>'application/msaccess', 'mdwn' => 'text/markdown', 'mobi' => 'application/x-mobipocket-ebook', 'mov'=>'video/quicktime', -- cgit v1.2.3