aboutsummaryrefslogtreecommitdiff
path: root/mod/messageboard/ajax_endpoint/load.php
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-19 19:31:34 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-19 19:31:34 +0000
commit02a52af62e1579ad174b1160071b82ec11ee31e3 (patch)
treecd14f5338df64b69dffb03499ce7222f93c9f988 /mod/messageboard/ajax_endpoint/load.php
parent93cf8041ef996eae3912116cee572f7ff26efc92 (diff)
downloadelgg-02a52af62e1579ad174b1160071b82ec11ee31e3.tar.gz
elgg-02a52af62e1579ad174b1160071b82ec11ee31e3.tar.bz2
Refs #2916. More cleanup of the messageboard widget.
git-svn-id: http://code.elgg.org/elgg/trunk@8344 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/messageboard/ajax_endpoint/load.php')
-rw-r--r--mod/messageboard/ajax_endpoint/load.php42
1 files changed, 0 insertions, 42 deletions
diff --git a/mod/messageboard/ajax_endpoint/load.php b/mod/messageboard/ajax_endpoint/load.php
deleted file mode 100644
index 4509c30ef..000000000
--- a/mod/messageboard/ajax_endpoint/load.php
+++ /dev/null
@@ -1,42 +0,0 @@
-<?php
-
-/**
- * Elgg message board widget ajax logic page
- *
- * @package ElggMessageBoard
- */
-
-// Load Elgg engine will not include plugins
-require_once(dirname(dirname(dirname(dirname(__FILE__)))) . "/engine/start.php");
-
-//get the required info
-
-//the actual message
-$message = get_input('messageboard_content');
-//the number of messages to display
-$numToDisplay = get_input('numToDisplay');
-//get the full page owner entity
-$user = get_entity(get_input('pageOwner'));
-
-//stage one - if a message was posted, add it as an annotation
-if ($message) {
-
- if (!messageboard_add(elgg_get_logged_in_user_entity(), $user, $message, $user->access_id)) {
- echo elgg_echo("messageboard:failure");
- }
-
-} else {
- echo elgg_echo('messageboard:somethingwentwrong');
-}
-
-
-//step two - grab the latest messageboard contents, this will include the message above, unless an issue
-//has occurred.
-$contents = $user->getAnnotations('messageboard', $numToDisplay, 0, 'desc');
-
-//step three - display the latest results
-if ($contents) {
- foreach ($contents as $content) {
- echo elgg_view("messageboard/messageboard_content", array('annotation' => $content));
- }
-}