diff options
author | Brett Profitt <brett.profitt@gmail.com> | 2011-06-18 19:56:33 -0400 |
---|---|---|
committer | Brett Profitt <brett.profitt@gmail.com> | 2011-06-18 19:56:33 -0400 |
commit | ec7b94a64aef23b85866ecdac8e8acc712d29bb6 (patch) | |
tree | a108205c3fa0b694d8ce0ebaafd259480d6b530a /mod/messages | |
parent | c80ba5aa03264dd64c20ed8ae222e87f9371a44d (diff) | |
parent | 2b68a4d217c35a5587c462620789493cf2804ba2 (diff) | |
download | elgg-ec7b94a64aef23b85866ecdac8e8acc712d29bb6.tar.gz elgg-ec7b94a64aef23b85866ecdac8e8acc712d29bb6.tar.bz2 |
Merge branch 'master' of github.com:Elgg/Elgg
Diffstat (limited to 'mod/messages')
-rw-r--r-- | mod/messages/languages/en.php | 3 | ||||
-rw-r--r-- | mod/messages/manifest.xml | 2 | ||||
-rw-r--r-- | mod/messages/views/default/object/messages.php | 31 |
3 files changed, 26 insertions, 10 deletions
diff --git a/mod/messages/languages/en.php b/mod/messages/languages/en.php index 8e4cd015f..2002905b7 100644 --- a/mod/messages/languages/en.php +++ b/mod/messages/languages/en.php @@ -88,6 +88,9 @@ $english = array( 'messages:nomessages' => "There are no messages.", 'messages:user:nonexist' => "We could not find the recipient in the user database.", 'messages:user:blank' => "You did not select someone to send this to.", + + 'messages:deleted_sender' => 'Deleted user', + ); add_translation("en", $english);
\ No newline at end of file diff --git a/mod/messages/manifest.xml b/mod/messages/manifest.xml index e70ec0dee..66ca4b444 100644 --- a/mod/messages/manifest.xml +++ b/mod/messages/manifest.xml @@ -4,6 +4,7 @@ <author>Core developers</author> <version>1.8</version> <category>bundled</category> + <category>communication</category> <description>Elgg internal messages plugin. This plugin lets user send each other messages.</description> <copyright>See COPYRIGHT.txt</copyright> <website>http://www.elgg.org/</website> @@ -12,5 +13,6 @@ <type>elgg_version</type> <version>2010030101</version> </requires> + <activate_on_install>true</activate_on_install> <admin_interface>simple</admin_interface> </plugin_manifest> diff --git a/mod/messages/views/default/object/messages.php b/mod/messages/views/default/object/messages.php index b52b86a3a..b2d127d85 100644 --- a/mod/messages/views/default/object/messages.php +++ b/mod/messages/views/default/object/messages.php @@ -19,11 +19,16 @@ if ($full) { if ($message->toId == elgg_get_page_owner_guid()) { // received $user = get_entity($message->fromId); - $icon = elgg_view_entity_icon($user, 'tiny'); - $user_link = elgg_view('output/url', array( - 'href' => "messages/compose?send_to=$user->guid", - 'text' => $user->name, - )); + if ($user) { + $icon = elgg_view_entity_icon($user, 'tiny'); + $user_link = elgg_view('output/url', array( + 'href' => "messages/compose?send_to=$user->guid", + 'text' => $user->name, + )); + } else { + $icon = ''; + $user_link = elgg_echo('messages:deleted_sender'); + } if ($message->readYet) { $class = 'message read'; @@ -34,11 +39,17 @@ if ($message->toId == elgg_get_page_owner_guid()) { } else { // sent $user = get_entity($message->toId); - $icon = elgg_view_entity_icon($user, 'tiny'); - $user_link = elgg_view('output/url', array( - 'href' => "messages/compose?send_to=$user->guid", - 'text' => elgg_echo('messages:to_user', array($user->name)), - )); + + if ($user) { + $icon = elgg_view_entity_icon($user, 'tiny'); + $user_link = elgg_view('output/url', array( + 'href' => "messages/compose?send_to=$user->guid", + 'text' => elgg_echo('messages:to_user', array($user->name)), + )); + } else { + $icon = ''; + $user_link = elgg_echo('messages:deleted_sender'); + } $class = 'message read'; } |