Merge pull request #697 from MVUG/upload-fixes-2.1

Fixed bug in Upload library
tmp_path does not exists, should be tmp_name.
diff --git a/application/config/mimes.php b/application/config/mimes.php
index f00e5b6..100f7d4 100644
--- a/application/config/mimes.php
+++ b/application/config/mimes.php
@@ -93,8 +93,8 @@
 				'avi'	=>	'video/x-msvideo',
 				'movie'	=>	'video/x-sgi-movie',
 				'doc'	=>	'application/msword',
-				'docx'	=>	'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
-				'xlsx'	=>	'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
+				'docx'	=>	array('application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/zip'),
+				'xlsx'	=>	array('application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'application/zip'),
 				'word'	=>	array('application/msword', 'application/octet-stream'),
 				'xl'	=>	'application/excel',
 				'eml'	=>	'message/rfc822',
diff --git a/system/libraries/Upload.php b/system/libraries/Upload.php
index 05511b5..fe5907a 100644
--- a/system/libraries/Upload.php
+++ b/system/libraries/Upload.php
@@ -1055,7 +1055,7 @@
 		if (DIRECTORY_SEPARATOR !== '\\' && function_exists('exec'))
 		{
 			$output = array();
-			@exec('file --brief --mime-type ' . escapeshellarg($file['tmp_path']), $output, $return_code);
+			@exec('file --brief --mime-type ' . escapeshellarg($file['tmp_name']), $output, $return_code);
 			if ($return_code === 0 && strlen($output[0]) > 0) // A return status code != 0 would mean failed execution
 			{
 				$this->file_type = rtrim($output[0]);
diff --git a/user_guide/changelog.html b/user_guide/changelog.html
index 167616e..a20f279 100644
--- a/user_guide/changelog.html
+++ b/user_guide/changelog.html
@@ -57,6 +57,23 @@
 
 <h1>Change Log</h1>
 
+<h2>Version 2.1.1</h2>
+<p>Release Date: not yet released</p>
+
+<ul>
+	<li>General Changes
+		<ul>
+			<li>Fixed support for docx, xlsx files in mimes.php.</li>
+		</ul>
+	</li>
+</ul>
+
+<h3>Bug fixes for 2.1.1</h3>
+<ul>
+	<li>Fixed a bug (#697) - A wrong array key was used in the Upload library to check for mime-types.</li>
+</ul>
+
+
 <h2>Version 2.1.0</h2>
 <p>Release Date: November 14, 2011</p>