From: Alan Date: Wed, 9 Feb 2022 05:05:16 +0000 (+0800) Subject: DataObjects/Events.php X-Git-Url: http://git.roojs.org/?a=commitdiff_plain;h=488f7a3f683200112895a354ece6e9d835679e17;p=Pman.Core DataObjects/Events.php --- diff --git a/DataObjects/Events.php b/DataObjects/Events.php index a5f48dbb..962c0fe3 100644 --- a/DataObjects/Events.php +++ b/DataObjects/Events.php @@ -475,6 +475,26 @@ class Pman_Core_DataObjects_Events extends DB_DataObject static function writeEventLogExtra($data) { self::$extra_data = $data; } + static $files = array(); + + /** + * Add a file to the output log + * this needs to be called before addEvent, and the data format should be the same as $_FILES + * eg. + * + * DB_DataObject::factory('Events')->addFile(array( + * 'tmp_name' => real file location + * 'name' => real file name + * 'type' => mimetype + * 'size' => filesize + * + * )) + * + */ + function addFile($data) + { + self::$files[] = $data; + } function logDir($user = false) {