Code

Updated objectListing
[gosa.git] / gosa-core / html / main.php
index 4be9b39448dfff8d771305364060a6d84500d7bc..7b17a5d3e8003bff320431e908a8b4a06fa53752 100644 (file)
@@ -23,6 +23,9 @@
 /* Save start time */
 $start = microtime();
 
+// Will be used in the "stats" plugin later, to be able calculate the elapsed render time.
+$overallRenderTimer = microtime(TRUE);
+
 /* Basic setup, remove eventually registered sessions */
 require_once ("../include/php_setup.inc");
 require_once ("functions.inc");
@@ -35,6 +38,7 @@ $domain = 'messages';
 bindtextdomain($domain, LOCALE_DIR);
 textdomain($domain);
 
+
 /* Remember everything we did after the last click */
 session::start();
 session::set('errorsAlreadyPosted',array());
@@ -50,6 +54,17 @@ $clicks ++ ;
 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"){
@@ -484,8 +499,6 @@ if($config->get_cfg_value("core","storeFilterSettings") == "true"){
   @setcookie("GOsa_Filter_Settings",base64_encode(serialize($cookie)),time() + (60*60*24));
 }
 
-stats::show();
-
 /* Show page... */
 echo $display;