Skip to:
Content

BuddyPress.org

Changeset 378


Ignore:
Timestamp:
10/09/2008 05:38:14 AM (18 years ago)
Author:
apeatling
Message:
  • Switched activity stream caching back on after changes were committed with it turned off.
  • Updated admin bar to not show blog authors on root blog.
Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-activity/bp-activity-classes.php

    r375 r378  
    107107                $last_cached = get_usermeta( $bp['current_userid'], 'bp_activity_last_cached' );
    108108               
    109                 if ( strtotime( BP_ACTIVITY_CACHE_LENGTH, (int)$last_cached ) <= time() ) {
     109                if ( strtotime( BP_ACTIVITY_CACHE_LENGTH, (int)$last_cached ) >= time() ) {
    110110                       
    111111                        //echo '<small style="color: green">** Debug: Using Cache **</small>';
  • trunk/bp-core/bp-core-adminbar.php

    r373 r378  
    22
    33function bp_core_admin_bar() {
    4         global $bp, $wpdb;
     4        global $bp, $wpdb, $current_blog;
    55
    66        if ( is_user_logged_in() && bp_core_user_has_home() ) {
     
    7171                        echo '</li>';
    7272                }
     73               
     74                if ( $current_blog->blog_id > 1 ) {
     75                        if ( bp_core_is_home_base( $current_blog->blog_id ) ) {
     76                                // TODO: possible menu for current group/user/photo etc
     77                        } else {
     78                                $authors = get_users_of_blog();
     79                       
     80                                if ( is_array( $authors ) ) {
     81                                        /* This is a blog, render a menu with links to all authors */
     82                                        echo '<li><a href="/">';
     83                                        _e('Blog Authors');
     84                                        echo '</a>';
     85                               
     86                                        echo '<ul class="author-list">';
     87                                        foreach( $authors as $author ) {
     88                                                $author = new BP_Core_User( $author->user_id );
     89                                                echo '<li>';
    7390
    74                 if ( bp_core_is_home_base( $wpdb->blogid ) ) {
    75                         // TODO: possible menu for current group/user/photo etc
    76                 } else {
    77                         $authors = get_users_of_blog();
    78                        
    79                         if ( is_array( $authors ) ) {
    80                                 /* This is a blog, render a menu with links to all authors */
    81                                 echo '<li><a href="/">';
    82                                 _e('Blog Authors');
    83                                 echo '</a>';
    84                                
    85                                 echo '<ul class="author-list">';
    86                                 foreach( $authors as $author ) {
    87                                         $author = new BP_Core_User( $author->user_id );
    88                                         echo '<li>';
    89 
    90                                         echo '<div class="admin-bar-clear"><a href="' . $author->user_url . '">';
    91                                         echo $author->avatar_mini;
    92                                         echo ' ' . $author->fullname;
    93                                         echo '<span class="activity">' . $author->last_active . '</span>';
    94                                         echo '</a>';
    95                                         echo '</div>';
     91                                                echo '<div class="admin-bar-clear"><a href="' . $author->user_url . '">';
     92                                                echo $author->avatar_mini;
     93                                                echo ' ' . $author->fullname;
     94                                                echo '<span class="activity">' . $author->last_active . '</span>';
     95                                                echo '</a>';
     96                                                echo '</div>';
     97                                                echo '</li>';
     98                                        }
     99                                        echo '</ul>';
    96100                                        echo '</li>';
    97101                                }
    98                                 echo '</ul>';
    99                                 echo '</li>';
    100102                        }
    101103                }
    102                                
     104                       
    103105                echo '</ul>';
    104106                echo '</div>';
Note: See TracChangeset for help on using the changeset viewer.