From 7b8a18ab7f993aa5f4f7f643478f06a8e3f7ed52 Mon Sep 17 00:00:00 2001 From: cash Date: Sat, 1 Jan 2011 17:55:18 +0000 Subject: almost finished updating the file plugin to work with new html/css git-svn-id: http://code.elgg.org/elgg/trunk@7804 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/file/lib/file.php | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 mod/file/lib/file.php (limited to 'mod/file/lib') diff --git a/mod/file/lib/file.php b/mod/file/lib/file.php new file mode 100644 index 000000000..6ca49e95b --- /dev/null +++ b/mod/file/lib/file.php @@ -0,0 +1,42 @@ + defaults + $values = array( + 'title' => '', + 'description' => '', + 'access_id' => ACCESS_DEFAULT, + 'tags' => '', + 'container_guid' => elgg_get_page_owner_guid(), + 'guid' => null, + 'entity' => $file, + ); + + if ($file) { + foreach (array_keys($values) as $field) { + $values[$field] = $file->$field; + } + } + + if (elgg_is_sticky_form('file')) { + foreach (array_keys($values) as $field) { + $values[$field] = elgg_get_sticky_value('file', $field); + } + } + + elgg_clear_sticky_form('file'); + + return $values; +} -- cgit v1.2.3