summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9829e4f)
raw | patch | inline | side by side (parent: 9829e4f)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 14 Oct 2010 07:48:47 +0000 (07:48 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 14 Oct 2010 07:48:47 +0000 (07:48 +0000) |
-Move them to a place where we can access uploaded files, even if save-mode is enabled.
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20039 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20039 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/html/main.php | patch | blob | history |
index 254d4de495331c461a21e074b416a36c172e433e..7b17a5d3e8003bff320431e908a8b4a06fa53752 100644 (file)
--- a/gosa-core/html/main.php
+++ b/gosa-core/html/main.php
bindtextdomain($domain, LOCALE_DIR);
textdomain($domain);
+
/* Remember everything we did after the last click */
session::start();
session::set('errorsAlreadyPosted',array());
session::set('clicks', $clicks);
+/* On some systems we can not operate on uploaded tmp files. We need to
+ * explicitely copy them first
+ */
+foreach($_FILES as $postName => $entry){
+ $tempfile = tempnam(sys_get_temp_dir(), 'GOsa');
+ if(move_uploaded_file($_FILES[$postName]['tmp_name'], $tempfile)){
+ $_FILES[$postName]['tmp_name'] = $tempfile;
+ }
+}
+
+
pathNavigator::clear();
if ($_SERVER["REQUEST_METHOD"] == "POST"){