aboutsummaryrefslogtreecommitdiff
path: root/mod
diff options
context:
space:
mode:
Diffstat (limited to 'mod')
-rw-r--r--mod/externalpages/start.php7
-rw-r--r--mod/groups/start.php2
-rw-r--r--mod/groups/views/default/groups/membershiprequests.php3
-rw-r--r--mod/likes/start.php5
-rw-r--r--mod/logbrowser/start.php2
-rw-r--r--mod/logbrowser/views/default/admin/administer_utilities/logbrowser.php12
-rw-r--r--mod/logbrowser/views/default/logbrowser/refine.php7
-rw-r--r--mod/messages/views/default/forms/messages/process.php3
-rw-r--r--mod/profile/views/default/profile/owner_block.php5
-rw-r--r--mod/search/pages/search/index.php7
-rw-r--r--mod/search/views/default/search/search_box.php7
-rw-r--r--mod/thewire/pages/thewire/everyone.php3
-rw-r--r--mod/thewire/pages/thewire/friends.php2
-rw-r--r--mod/thewire/pages/thewire/owner.php2
-rw-r--r--mod/thewire/start.php2
15 files changed, 48 insertions, 21 deletions
diff --git a/mod/externalpages/start.php b/mod/externalpages/start.php
index 13235af53..152a8b4d9 100644
--- a/mod/externalpages/start.php
+++ b/mod/externalpages/start.php
@@ -43,8 +43,11 @@ function expages_setup_footer_menu() {
$pages = array('about', 'terms', 'privacy');
foreach ($pages as $page) {
$url = "$page";
- $item = new ElggMenuItem($page, elgg_echo("expages:$page"), $url);
- elgg_register_menu_item('walled_garden', $item);
+ $wg_item = new ElggMenuItem($page, elgg_echo("expages:$page"), $url);
+ elgg_register_menu_item('walled_garden', $wg_item);
+
+ $footer_item = clone $wg_item;
+ elgg_register_menu_item('footer', $footer_item);
}
}
diff --git a/mod/groups/start.php b/mod/groups/start.php
index 7dcf6b7c4..09362cbbc 100644
--- a/mod/groups/start.php
+++ b/mod/groups/start.php
@@ -830,7 +830,7 @@ function discussion_add_to_river_menu($hook, $type, $return, $params) {
if (elgg_instanceof($object, 'object', 'groupforumtopic')) {
if ($item->annotation_id == 0) {
$group = $object->getContainerEntity();
- if ($group->canWriteToContainer() || elgg_is_admin_logged_in()) {
+ if ($group && ($group->canWriteToContainer() || elgg_is_admin_logged_in())) {
$options = array(
'name' => 'reply',
'href' => "#groups-reply-$object->guid",
diff --git a/mod/groups/views/default/groups/membershiprequests.php b/mod/groups/views/default/groups/membershiprequests.php
index 9cd28262f..2bac0e32b 100644
--- a/mod/groups/views/default/groups/membershiprequests.php
+++ b/mod/groups/views/default/groups/membershiprequests.php
@@ -7,7 +7,6 @@
*/
if (!empty($vars['requests']) && is_array($vars['requests'])) {
- $user = elgg_get_logged_in_user_entity();
echo '<ul class="elgg-list">';
foreach ($vars['requests'] as $user) {
$icon = elgg_view_entity_icon($user, 'tiny', array('use_hover' => 'true'));
@@ -44,5 +43,5 @@ if (!empty($vars['requests']) && is_array($vars['requests'])) {
}
echo '</ul>';
} else {
- echo '<p class="mtm">' . elgg_echo('groups:requests:none') . "</p>";
+ echo '<p class="mtm">' . elgg_echo('groups:requests:none') . '</p>';
}
diff --git a/mod/likes/start.php b/mod/likes/start.php
index 690d7c052..0f8e12159 100644
--- a/mod/likes/start.php
+++ b/mod/likes/start.php
@@ -65,6 +65,11 @@ function likes_river_menu_setup($hook, $type, $return, $params) {
if ($item->type == "group" && $item->view != "river/group/create") {
return $return;
}
+
+ // don't like users #4116
+ if ($item->type == "user") {
+ return $return;
+ }
$object = $item->getObjectEntity();
if (!elgg_in_context('widgets') && $item->annotation_id == 0) {
diff --git a/mod/logbrowser/start.php b/mod/logbrowser/start.php
index 3bffe800a..22659877b 100644
--- a/mod/logbrowser/start.php
+++ b/mod/logbrowser/start.php
@@ -23,7 +23,7 @@ function logbrowser_init() {
function logbrowser_user_hover_menu($hook, $type, $return, $params) {
$user = $params['entity'];
- $url = "admin/utilities/logbrowser?user_guid={$user->guid}";
+ $url = "admin/administer_utilities/logbrowser?user_guid={$user->guid}";
$item = new ElggMenuItem('logbrowser', elgg_echo('logbrowser:explore'), $url);
$item->setSection('admin');
$return[] = $item;
diff --git a/mod/logbrowser/views/default/admin/administer_utilities/logbrowser.php b/mod/logbrowser/views/default/admin/administer_utilities/logbrowser.php
index 2be1f33dc..a04ef686a 100644
--- a/mod/logbrowser/views/default/admin/administer_utilities/logbrowser.php
+++ b/mod/logbrowser/views/default/admin/administer_utilities/logbrowser.php
@@ -13,14 +13,14 @@ $offset = get_input('offset');
$search_username = get_input('search_username');
if ($search_username) {
if ($user = get_user_by_username($search_username)) {
- $user = $user->guid;
+ $user_guid = $user->guid;
}
} else {
$user_guid = get_input('user_guid',0);
if ($user_guid) {
- $user = (int) $user_guid;
+ $user_guid = (int) $user_guid;
} else {
- $user = "";
+ $user_guid = null;
}
}
@@ -35,14 +35,14 @@ if ($timeupper) {
}
$refine = elgg_view('logbrowser/refine', array(
- 'user_guid' => $user,
+ 'user_guid' => $user_guid,
'timeupper' => $timeupper,
'timelower' => $timelower,
));
// Get log entries
-$log = get_system_log($user, "", "", "","", $limit, $offset, false, $timeupper, $timelower);
-$count = get_system_log($user, "", "", "","", $limit, $offset, true, $timeupper, $timelower);
+$log = get_system_log($user_guid, "", "", "","", $limit, $offset, false, $timeupper, $timelower);
+$count = get_system_log($user_guid, "", "", "","", $limit, $offset, true, $timeupper, $timelower);
$table = elgg_view('logbrowser/table', array('log_entries' => $log));
diff --git a/mod/logbrowser/views/default/logbrowser/refine.php b/mod/logbrowser/views/default/logbrowser/refine.php
index 27cb6042f..86460c79e 100644
--- a/mod/logbrowser/views/default/logbrowser/refine.php
+++ b/mod/logbrowser/views/default/logbrowser/refine.php
@@ -18,13 +18,18 @@ $toggle_link = elgg_view('output/url', array(
'rel' => 'toggle',
));
+$form_class = 'elgg-module elgg-module-inline';
+if (!isset($vars['user_guid'])) {
+ $form_class .= ' hidden';
+}
+
?>
<div id="logbrowser-search-area" class="mbm">
<div>
<?php echo $toggle_link; ?>
</div>
- <div id="log-browser-search-form" class="elgg-module elgg-module-inline hidden">
+ <div id="log-browser-search-form" class="<?php echo $form_class; ?>">
<div class="elgg-head">
<h3><?php echo elgg_echo('logbrowser:search'); ?></h3>
</div>
diff --git a/mod/messages/views/default/forms/messages/process.php b/mod/messages/views/default/forms/messages/process.php
index 7e182b8f0..f86c3217a 100644
--- a/mod/messages/views/default/forms/messages/process.php
+++ b/mod/messages/views/default/forms/messages/process.php
@@ -10,7 +10,8 @@
$messages = $vars['list'];
if (!$messages) {
- $messages = elgg_echo('messages:nomessages');
+ echo elgg_echo('messages:nomessages');
+ return true;
}
echo '<div class="messages-container">';
diff --git a/mod/profile/views/default/profile/owner_block.php b/mod/profile/views/default/profile/owner_block.php
index 35199726a..63cb5391a 100644
--- a/mod/profile/views/default/profile/owner_block.php
+++ b/mod/profile/views/default/profile/owner_block.php
@@ -11,7 +11,10 @@ if (!$user) {
return TRUE;
}
-$icon = elgg_view_entity_icon($user, 'large', array('use_hover' => 'true'));
+$icon = elgg_view_entity_icon($user, 'large', array(
+ 'use_hover' => false,
+ 'use_link' => false,
+));
// grab the actions and admin menu items from user hover
$menu = elgg_trigger_plugin_hook('register', "menu:user_hover", array('entity' => $user), array());
diff --git a/mod/search/pages/search/index.php b/mod/search/pages/search/index.php
index c4e8d2219..efa3ec037 100644
--- a/mod/search/pages/search/index.php
+++ b/mod/search/pages/search/index.php
@@ -19,7 +19,12 @@ $query = stripslashes(get_input('q', get_input('tag', '')));
// @todo - create function for sanitization of strings for display in 1.8
// encode <,>,&, quotes and characters above 127
-$display_query = mb_convert_encoding($query, 'HTML-ENTITIES', 'UTF-8');
+if (function_exists('mb_convert_encoding')) {
+ $display_query = mb_convert_encoding($query, 'HTML-ENTITIES', 'UTF-8');
+} else {
+ // if no mbstring extension, we just strip characters
+ $display_query = preg_replace("/[^\x01-\x7F]/", "", $query);
+}
$display_query = htmlspecialchars($display_query, ENT_QUOTES, 'UTF-8', false);
// check that we have an actual query
diff --git a/mod/search/views/default/search/search_box.php b/mod/search/views/default/search/search_box.php
index 9440dd1de..87d59519c 100644
--- a/mod/search/views/default/search/search_box.php
+++ b/mod/search/views/default/search/search_box.php
@@ -24,7 +24,12 @@ $value = stripslashes($value);
// @todo - create function for sanitization of strings for display in 1.8
// encode <,>,&, quotes and characters above 127
-$display_query = mb_convert_encoding($value, 'HTML-ENTITIES', 'UTF-8');
+if (function_exists('mb_convert_encoding')) {
+ $display_query = mb_convert_encoding($value, 'HTML-ENTITIES', 'UTF-8');
+} else {
+ // if no mbstring extension, we just strip characters
+ $display_query = preg_replace("/[^\x01-\x7F]/", "", $value);
+}
$display_query = htmlspecialchars($display_query, ENT_QUOTES, 'UTF-8', false);
diff --git a/mod/thewire/pages/thewire/everyone.php b/mod/thewire/pages/thewire/everyone.php
index 4e88d17af..909f0caf2 100644
--- a/mod/thewire/pages/thewire/everyone.php
+++ b/mod/thewire/pages/thewire/everyone.php
@@ -8,13 +8,14 @@ elgg_push_breadcrumb(elgg_echo('thewire'));
$title = elgg_echo('thewire:everyone');
+$content = '';
if (elgg_is_logged_in()) {
$form_vars = array('class' => 'thewire-form');
$content .= elgg_view_form('thewire/add', $form_vars);
$content .= elgg_view('input/urlshortener');
}
-$content = elgg_list_entities(array(
+$content .= elgg_list_entities(array(
'type' => 'object',
'subtype' => 'thewire',
'limit' => 15,
diff --git a/mod/thewire/pages/thewire/friends.php b/mod/thewire/pages/thewire/friends.php
index 26ad03da6..e7f5eed59 100644
--- a/mod/thewire/pages/thewire/friends.php
+++ b/mod/thewire/pages/thewire/friends.php
@@ -14,7 +14,7 @@ elgg_push_breadcrumb(elgg_echo('thewire'), "thewire/all");
elgg_push_breadcrumb($owner->name, "thewire/owner/$owner->username");
elgg_push_breadcrumb(elgg_echo('friends'));
-if (get_loggedin_userid() == $owner->guid) {
+if (elgg_get_logged_in_user_guid() == $owner->guid) {
$form_vars = array('class' => 'thewire-form');
$content = elgg_view_form('thewire/add', $form_vars);
$content .= elgg_view('input/urlshortener');
diff --git a/mod/thewire/pages/thewire/owner.php b/mod/thewire/pages/thewire/owner.php
index a95786b0a..f544aa655 100644
--- a/mod/thewire/pages/thewire/owner.php
+++ b/mod/thewire/pages/thewire/owner.php
@@ -14,7 +14,7 @@ $title = elgg_echo('thewire:user', array($owner->name));
elgg_push_breadcrumb(elgg_echo('thewire'), "thewire/all");
elgg_push_breadcrumb($owner->name);
-if (get_loggedin_userid() == $owner->guid) {
+if (elgg_get_logged_in_user_guid() == $owner->guid) {
$form_vars = array('class' => 'thewire-form');
$content = elgg_view_form('thewire/add', $form_vars);
$content .= elgg_view('input/urlshortener');
diff --git a/mod/thewire/start.php b/mod/thewire/start.php
index c0890344f..328e5d46c 100644
--- a/mod/thewire/start.php
+++ b/mod/thewire/start.php
@@ -217,7 +217,7 @@ function thewire_filter($text) {
// usernames
$text = preg_replace(
- '/(^|[^\w])@([\w]+)/',
+ '/(^|[^\w])@([\w.]+)/',
'$1<a href="' . $CONFIG->wwwroot . 'thewire/owner/$2">@$2</a>',
$text);