aboutsummaryrefslogtreecommitdiff
path: root/mod/messageboard
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-11-03 22:13:10 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-11-03 22:13:10 +0000
commiteff4faea7f3c95440f02ea45d0be4f67236e2bf3 (patch)
tree57d51ef4bc84547d60c9a6faae7d5ff5d82d00f9 /mod/messageboard
parent4b501dda1d62195531e4c2ab1bd84971c0cd4e37 (diff)
downloadelgg-eff4faea7f3c95440f02ea45d0be4f67236e2bf3.tar.gz
elgg-eff4faea7f3c95440f02ea45d0be4f67236e2bf3.tar.bz2
Fixes #1320: Bundled mods use elgg_echo()'s internal string substitution.
git-svn-id: http://code.elgg.org/elgg/trunk@7229 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/messageboard')
-rw-r--r--mod/messageboard/index.php2
-rw-r--r--mod/messageboard/start.php11
-rw-r--r--mod/messageboard/views/default/river/object/messageboard/create.php4
3 files changed, 8 insertions, 9 deletions
diff --git a/mod/messageboard/index.php b/mod/messageboard/index.php
index 816f9480f..e0ab13f0e 100644
--- a/mod/messageboard/index.php
+++ b/mod/messageboard/index.php
@@ -30,5 +30,5 @@ if (isloggedin()) {
$body = elgg_view_layout("two_column_left_sidebar", '', $area2);
// Display page
-echo elgg_view_page(sprintf(elgg_echo('messageboard:user'),$entity->name),$body);
+echo elgg_view_page(elgg_echo('messageboard:user', array($entity->name)), $body);
diff --git a/mod/messageboard/start.php b/mod/messageboard/start.php
index 88d7c72f3..f97e77999 100644
--- a/mod/messageboard/start.php
+++ b/mod/messageboard/start.php
@@ -4,7 +4,7 @@
* Elgg Message board
* This plugin allows users and groups to attach a message board to their profile for other users
* to post comments.
- *
+ *
* @package ElggMessageBoard
*/
@@ -36,7 +36,7 @@ function messageboard_page_handler($page) {
if (isset($page[0])) {
set_input('username', $page[0]);
}
-
+
// Include the standard messageboard index
include($CONFIG->pluginspath . "messageboard/index.php");
}
@@ -52,7 +52,7 @@ function messageboard_page_handler($page) {
*/
function messageboard_add($poster, $owner, $message, $access_id = ACCESS_PUBLIC) {
global $CONFIG;
-
+
$result = $owner->annotate('messageboard', $message, $access_id, $poster->guid);
if (!$result) {
return FALSE;
@@ -69,14 +69,13 @@ function messageboard_add($poster, $owner, $message, $access_id = ACCESS_PUBLIC)
// only send notification if not self
if ($poster->guid != $owner->guid) {
$subject = elgg_echo('messageboard:email:subject');
- $body = sprintf(
- elgg_echo('messageboard:email:body'),
+ $body = elgg_echo('messageboard:email:body', array(
$poster->name,
$message,
elgg_get_site_url() . "pg/messageboard/" . $owner->username,
$poster->name,
$poster->getURL()
- );
+ ));
notify_user($owner->guid, $poster->guid, $subject, $body);
}
diff --git a/mod/messageboard/views/default/river/object/messageboard/create.php b/mod/messageboard/views/default/river/object/messageboard/create.php
index 88bbd56aa..3bdf595d1 100644
--- a/mod/messageboard/views/default/river/object/messageboard/create.php
+++ b/mod/messageboard/views/default/river/object/messageboard/create.php
@@ -4,7 +4,7 @@ $performed_by = get_entity($vars['item']->subject_guid);
$performed_on = get_entity($vars['item']->object_guid);
$url = "<a href=\"{$performed_by->getURL()}\">{$performed_by->name}</a>";
-$string = sprintf(elgg_echo("messageboard:river:added"),$url) . " <a href=\"{$performed_on->getURL()}\">" . $performed_on->name . "'s</a> " . elgg_echo("messageboard:river:messageboard");
+$string = elgg_echo("messageboard:river:added", array($url)) . " <a href=\"{$performed_on->getURL()}\">" . $performed_on->name . "'s</a> " . elgg_echo("messageboard:river:messageboard");
-echo $string;
+echo $string;