Skip to:
Content

BuddyPress.org

Changeset 2209 for trunk/bp-groups.php


Ignore:
Timestamp:
12/27/2009 10:41:10 AM (16 years ago)
Author:
apeatling
Message:

Single WP support. Yes, you read that correctly.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-groups.php

    r2189 r2209  
    19591959        $group_id = $bp->groups->current_group->id;
    19601960
    1961     $path  = get_blog_option( BP_ROOT_BLOG, 'upload_path' );
    1962     $newdir = WP_CONTENT_DIR . str_replace( 'wp-content', '', $path );
    1963     $newdir .= '/group-avatars/' . $group_id;
    1964 
    1965     $newbdir = $newdir;
    1966 
    1967     if ( !file_exists( $newdir ) )
    1968         @wp_mkdir_p( $newdir );
    1969 
    1970     $newurl = WP_CONTENT_URL . '/blogs.dir/' . BP_ROOT_BLOG . '/files/group-avatars/' . $group_id;
     1961    $path = BP_AVATAR_UPLOAD_PATH . '/group-avatars/' . $group_id;
     1962    $newbdir = $path;
     1963
     1964    if ( !file_exists( $path ) )
     1965        @wp_mkdir_p( $path );
     1966
     1967    $newurl = str_replace( WP_CONTENT_DIR, WP_CONTENT_URL, $path );
    19711968    $newburl = $newurl;
    19721969    $newsubdir = '/group-avatars/' . $group_id;
    19731970
    1974     return apply_filters( 'groups_avatar_upload_dir', array( 'path' => $newdir, 'url' => $newurl, 'subdir' => $newsubdir, 'basedir' => $newbdir, 'baseurl' => $newburl, 'error' => false ) );
     1971    return apply_filters( 'groups_avatar_upload_dir', array( 'path' => $path, 'url' => $newurl, 'subdir' => $newsubdir, 'basedir' => $newbdir, 'baseurl' => $newburl, 'error' => false ) );
    19751972}
    19761973
Note: See TracChangeset for help on using the changeset viewer.