DataObjects/Events.php
authorChris <chris@roojs.com>
Fri, 12 Oct 2012 07:41:42 +0000 (15:41 +0800)
committerChris <chris@roojs.com>
Fri, 12 Oct 2012 07:41:42 +0000 (15:41 +0800)
DataObjects/Events.php

index f5c821e..343c594 100644 (file)
@@ -428,6 +428,11 @@ class Pman_Core_DataObjects_Events extends DB_DataObject
          
         foreach ($_FILES as $k=>$f){
             
+            $nf = $ff->Pman['event_log_dir']. '/'. $user. date('/Y/m/d/'). $this->id . ".file_{$f['name']}";
+            
+            if (!copy($f['tmp_name'], $nf)) {
+                echo "failed to copy $file...\n";
+            }
         }
         
         file_put_contents($file, json_encode(array(