Skip to content

Commit

Permalink
Merge pull request #10442 from Elgg/2.2
Browse files Browse the repository at this point in the history
merge 2.2 into 2.x
  • Loading branch information
jdalsem committed Oct 13, 2016
2 parents 6bc3347 + b3e5dee commit d7a5dbd
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 16 deletions.
18 changes: 9 additions & 9 deletions mod/blog/start.php
Original file line number Diff line number Diff line change
Expand Up @@ -178,15 +178,15 @@ function blog_set_url($hook, $type, $url, $params) {
* Add a menu item to an ownerblock
*/
function blog_owner_block_menu($hook, $type, $return, $params) {
if (elgg_instanceof($params['entity'], 'user')) {
$url = "blog/owner/{$params['entity']->username}";
$item = new ElggMenuItem('blog', elgg_echo('blog'), $url);
$return[] = $item;
} else {
if ($params['entity']->blog_enable != "no") {
$url = "blog/group/{$params['entity']->guid}/all";
$item = new ElggMenuItem('blog', elgg_echo('blog:group'), $url);
$return[] = $item;
$entity = elgg_extract('entity', $params);
if ($entity instanceof ElggUser) {
$url = "blog/owner/{$entity->username}";
$return[] = new ElggMenuItem('blog', elgg_echo('blog'), $url);

} elseif ($entity instanceof ElggGroup) {
if ($entity->blog_enable != "no") {
$url = "blog/group/{$entity->guid}/all";
$return[] = new ElggMenuItem('blog', elgg_echo('blog:group'), $url);
}
}

Expand Down
6 changes: 4 additions & 2 deletions mod/likes/start.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,10 @@ function likes_entity_menu_setup($hook, $type, $return, $params) {
return $return;
}

$entity = $params['entity'];
/* @var ElggEntity $entity */
$entity = elgg_extract('entity', $params);
if (!($entity instanceof \ElggEntity)) {
return $return;
}

$type = $entity->type;
$subtype = $entity->getSubtype();
Expand Down
4 changes: 2 additions & 2 deletions mod/profile/views/default/profile/owner_block.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@

$admin_links = '<ul class="profile-admin-menu-wrapper">';
$admin_links .= "<li><a rel=\"toggle\" href=\"#profile-menu-admin\">$text&hellip;</a>";
$admin_links .= '<ul class="profile-admin-menu" id="profile-menu-admin">';
$admin_links .= '<ul class="elgg-menu profile-admin-menu" id="profile-menu-admin">';
foreach ($admin as $menu_item) {
$admin_links .= elgg_view('navigation/menu/elements/item', array('item' => $menu_item));
}
$admin_links .= '</ul>';
$admin_links .= '</li>';
$admin_links .= '</ul>';
$admin_links .= '</ul>';
}

// content links
Expand Down
3 changes: 0 additions & 3 deletions mod/uservalidationbyemail/start.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ function uservalidationbyemail_init() {
// prevent users from logging in if they aren't validated
register_pam_handler('uservalidationbyemail_check_auth_attempt', "required");

// when requesting a new password
elgg_register_plugin_hook_handler('action', 'user/requestnewpassword', 'uservalidationbyemail_check_request_password');

// prevent the engine from logging in users via login()
elgg_register_event_handler('login:before', 'user', 'uservalidationbyemail_check_manual_login');

Expand Down

0 comments on commit d7a5dbd

Please sign in to comment.