Skip to:
Content

BuddyPress.org

Ticket #1843: no-activity-delete-for-user-0.patch

File no-activity-delete-for-user-0.patch, 961 bytes (added by boonebgorges, 15 years ago)
  • bp-activity/bp-activity-templatetags.php

     
    489489        $meta = ' &middot; <a href="' . bp_activity_get_permalink( $activities_template->activity->id, $activities_template->activity ) . '" class="view" title="' . __( 'View Thread / Permalink', 'buddypress' ) . '">' . __( 'View', 'buddypress' ) . '</a>';
    490490
    491491        /* Add the delete link if the user has permission on this item */
    492         if ( ( $activities_template->activity->user_id == $bp->loggedin_user->id ) || $bp->is_item_admin || is_site_admin() )
     492        if ( $bp->loggedin_user->id != 0 && (( $activities_template->activity->user_id == $bp->loggedin_user->id ) || $bp->is_item_admin || is_site_admin() ))
    493493                 $meta .= ' &middot; ' . bp_get_activity_delete_link();
    494494
    495495        $content[1] = $meta . '</span>' . $content[1];