aboutsummaryrefslogtreecommitdiff
path: root/mod/messages/lib
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-01-15 22:28:46 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-01-15 22:28:46 +0000
commit43c33492d2ab65a783c17559cf8dabd7832e9ea1 (patch)
tree7107fed1b5424db1405b842972c7e4c47f11bfd3 /mod/messages/lib
parente8d148970261207efbe5435e1abcf68c5ed59cc8 (diff)
downloadelgg-43c33492d2ab65a783c17559cf8dabd7832e9ea1.tar.gz
elgg-43c33492d2ab65a783c17559cf8dabd7832e9ea1.tar.bz2
Updated the messages plugin to use the new CSS/HTML
git-svn-id: http://code.elgg.org/elgg/trunk@7886 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/messages/lib')
-rw-r--r--mod/messages/lib/messages.php32
1 files changed, 32 insertions, 0 deletions
diff --git a/mod/messages/lib/messages.php b/mod/messages/lib/messages.php
new file mode 100644
index 000000000..062670fe9
--- /dev/null
+++ b/mod/messages/lib/messages.php
@@ -0,0 +1,32 @@
+<?php
+/**
+ * Messages helper functions
+ *
+ * @package ElggMessages
+ */
+
+/**
+ * Prepare the compose form variables
+ *
+ * @return array
+ */
+function messages_prepare_form_vars($recipient_guid = 0) {
+
+ // input names => defaults
+ $values = array(
+ 'subject' => '',
+ 'body' => '',
+ 'recipient_guid' => $recipient_guid,
+ );
+
+ if (elgg_is_sticky_form('messages')) {
+ foreach (array_keys($values) as $field) {
+ $values[$field] = elgg_get_sticky_value('messages', $field);
+ }
+ }
+
+ elgg_clear_sticky_form('messages');
+
+ return $values;
+}
+