]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Fixes #4042 made sure empty content pages had a message about no content
authorCash Costello <cash.costello@gmail.com>
Thu, 3 Nov 2011 11:17:38 +0000 (07:17 -0400)
committerCash Costello <cash.costello@gmail.com>
Thu, 3 Nov 2011 11:17:38 +0000 (07:17 -0400)
mod/bookmarks/pages/bookmarks/all.php
mod/bookmarks/pages/bookmarks/friends.php
mod/file/languages/en.php
mod/file/pages/file/world.php
mod/groups/languages/en.php
mod/groups/lib/discussion.php
mod/groups/lib/groups.php
mod/groups/views/default/discussion/group_module.php

index d9ac2767fccc99bc2e627625c9b4388824b2e56c..f577767521c9880b4c2d47cdff587ee41edf2f3b 100644 (file)
@@ -20,6 +20,10 @@ $content = elgg_list_entities(array(
        'view_toggle_type' => false
 ));
 
+if (!$content) {
+       $content = elgg_echo('bookmarks:none');
+}
+
 $title = elgg_echo('bookmarks:everyone');
 
 $body = elgg_view_layout('content', array(
index be164fcecf0a049333df68983c3d44b3644acf6f..15b1da0981f3443b86fc274465bebcc1f4ce7aaa 100644 (file)
@@ -5,19 +5,19 @@
  * @package ElggBookmarks
  */
 
-$owner = elgg_get_page_owner_entity();
+$page_owner = elgg_get_page_owner_entity();
 if (!$page_owner) {
        forward('bookmarks/all');
 }
 
-elgg_push_breadcrumb($owner->name, "bookmarks/owner/$owner->username");
+elgg_push_breadcrumb($page_owner->name, "bookmarks/owner/$page_owner->username");
 elgg_push_breadcrumb(elgg_echo('friends'));
 
 elgg_register_title_button();
 
 $title = elgg_echo('bookmarks:friends');
 
-$content = list_user_friends_objects($owner->guid, 'bookmarks', 10, false);
+$content = list_user_friends_objects($page_owner->guid, 'bookmarks', 10, false);
 if (!$content) {
        $content = elgg_echo('bookmarks:none');
 }
@@ -30,4 +30,4 @@ $params = array(
 
 $body = elgg_view_layout('content', $params);
 
-echo elgg_view_page($title, $body);
\ No newline at end of file
+echo elgg_view_page($title, $body);
index 96fbd1c485181b3e7989a5643e241b37ec0e4399..c4d5a4f88e33cb83d7cedf310d5b343282635d85 100644 (file)
@@ -95,7 +95,7 @@ $english = array(
         * Error messages
         */
 
-               'file:none' => "No files uploaded.",
+               'file:none' => "No files.",
                'file:uploadfailed' => "Sorry; we could not save your file.",
                'file:downloadfailed' => "Sorry; this file is not available at this time.",
                'file:deletefailed' => "Your file could not be deleted at this time.",
index e438ca2f0d2614aaa35906b931e679424da73c7f..770dfd6e84e3bf1a07b5631ead71be247202d0cb 100644 (file)
@@ -19,6 +19,9 @@ $content = elgg_list_entities(array(
        'limit' => $limit,
        'full_view' => FALSE
 ));
+if (!$content) {
+       $content = elgg_echo('file:none');
+}
 
 $sidebar = file_get_type_cloud();
 $sidebar = elgg_view('file/sidebar');
index 9f8bed9a4485d3878e429a44eb5554ff7dff4cff..0818e56023037ed0e979f423375a29f9d53d35b6 100644 (file)
@@ -69,9 +69,9 @@ $english = array(
        'groups:notfound' => "Group not found",
        'groups:notfound:details' => "The requested group either does not exist or you do not have access to it",
 
-       'groups:requests:none' => 'There are no outstanding membership requests at this time.',
+       'groups:requests:none' => 'There are no current membership requests.',
 
-       'groups:invitations:none' => 'There are no outstanding invitations at this time.',
+       'groups:invitations:none' => 'There are no current invitations.',
 
        'item:object:groupforumtopic' => "Discussion topics",
 
@@ -113,6 +113,7 @@ $english = array(
        'discussion:add' => 'Add discussion topic',
        'discussion:latest' => 'Latest discussion',
        'discussion:group' => 'Group discussion',
+       'discussion:none' => 'No discussion',
 
        'discussion:topic:created' => 'The discussion topic was created.',
        'discussion:topic:updated' => 'The discussion topic was updated.',
index e129e0f9d3c0b08da0677d6bdd3efda78d03d0ce..68e5e48845ae8ff23df6e6d6b459d0d6822b7464 100644 (file)
@@ -60,6 +60,9 @@ function discussion_handle_list_page($guid) {
                'full_view' => false,
        );
        $content = elgg_list_entities($options);
+       if (!$content) {
+               $content = elgg_echo('discussion:none');
+       }
 
 
        $params = array(
index 44143d440293d9c2d9df870302699afd9db2e9da..590ba2b35031f54958d6590aa6630301008f7fc1 100644 (file)
@@ -24,6 +24,9 @@ function groups_handle_all_page() {
                                'inverse_relationship' => false,
                                'full_view' => false,
                        ));
+                       if (!$content) {
+                               $content = elgg_echo('groups:none');
+                       }
                        break;
                case 'discussion':
                        $content = elgg_list_entities(array(
@@ -33,6 +36,9 @@ function groups_handle_all_page() {
                                'limit' => 40,
                                'full_view' => false,
                        ));
+                       if (!$content) {
+                               $content = elgg_echo('discussion:none');
+                       }
                        break;
                case 'newest':
                default:
@@ -40,6 +46,9 @@ function groups_handle_all_page() {
                                'type' => 'group',
                                'full_view' => false,
                        ));
+                       if (!$content) {
+                               $content = elgg_echo('groups:none');
+                       }
                        break;
        }
 
@@ -107,6 +116,9 @@ function groups_handle_owned_page() {
                'owner_guid' => elgg_get_page_owner_guid(),
                'full_view' => false,
        ));
+       if (!$content) {
+               $content = elgg_echo('groups:none');
+       }
 
        $params = array(
                'content' => $content,
@@ -137,6 +149,9 @@ function groups_handle_mine_page() {
                'inverse_relationship' => false,
                'full_view' => false,
        ));
+       if (!$content) {
+               $content = elgg_echo('groups:none');
+       }
 
        $params = array(
                'content' => $content,
index 3c9961f828d114e1824f289dc99a8263237cd636..e0bcd55d64836b023651c3072e48aafa1d79727c 100644 (file)
@@ -31,7 +31,7 @@ $content = elgg_list_entities($options);
 elgg_pop_context();
 
 if (!$content) {
-       $content = '<p>' . elgg_echo('grouptopic:notcreated') . '</p>';
+       $content = '<p>' . elgg_echo('discussion:none') . '</p>';
 }
 
 $new_link = elgg_view('output/url', array(