Skip to:
Content

BuddyPress.org

Changeset 3240


Ignore:
Timestamp:
09/08/2010 01:04:32 AM (14 years ago)
Author:
johnjamesjacoby
Message:

Fixes #2621 props Paul Gibbs

Location:
branches/1.2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/1.2/bp-blogs.php

    r3218 r3240  
    321321}
    322322
     323/**
     324 * Makes BuddyPress aware of a new site so that it can track its activity.
     325 *
     326 * @global object $bp BuddyPress global settings
     327 * @param int $blog_id
     328 * @param int $user_id
     329 * @param $bool $no_activity ; optional.
     330 * @since 1.0
     331 * @uses BP_Blogs_Blog
     332 */
    323333function bp_blogs_record_blog( $blog_id, $user_id, $no_activity = false ) {
    324334    global $bp;
     
    343353    bp_blogs_update_blogmeta( $recorded_blog->blog_id, 'last_activity', bp_core_current_time() );
    344354
    345     /* Only record this activity if the blog is public */
     355    // Only record this activity if the blog is public
    346356    if ( (int)$_POST['blog_public'] && !$no_activity ) {
    347         /* Record this in activity streams */
     357        // Record this in activity streams
    348358        bp_blogs_record_activity( array(
    349             'user_id' => $recorded_blog->user_id,
    350             'action' => apply_filters( 'bp_blogs_activity_created_blog_action', sprintf( __( '%s created the blog %s', 'buddypress'), bp_core_get_userlink( $recorded_blog->user_id ), '<a href="' . get_blog_option( $recorded_blog->blog_id, 'siteurl' ) . '">' . esc_attr( $name ) . '</a>' ), &$recorded_blog, $name, $description ),
    351             'primary_link' => apply_filters( 'bp_blogs_activity_created_blog_primary_link', get_blog_option( $recorded_blog->blog_id, 'siteurl' ), $recorded_blog->blog_id ),
    352             'type' => 'new_blog',
    353             'item_id' => $recorded_blog->blog_id
     359            'user_id'      => $recorded_blog->user_id,
     360            'action'       => apply_filters( 'bp_blogs_activity_created_blog_action', sprintf( __( '%s created the blog %s', 'buddypress'), bp_core_get_userlink( $recorded_blog->user_id ), '<a href="' . get_site_url( $recorded_blog->blog_id ) . '">' . esc_attr( $name ) . '</a>' ), &$recorded_blog, $name, $description ),
     361            'primary_link' => apply_filters( 'bp_blogs_activity_created_blog_primary_link', get_site_url( $recorded_blog->blog_id ), $recorded_blog->blog_id ),
     362            'type'         => 'new_blog',
     363            'item_id'      => $recorded_blog->blog_id
    354364        ) );
    355365    }
     
    650660        $blog = bp_blogs_get_random_blogs( 1, 1 );
    651661
    652         bp_core_redirect( get_blog_option( $blog['blogs'][0]->blog_id, 'siteurl') );
     662        bp_core_redirect( get_site_url( $blog['blogs'][0]->blog_id ) );
    653663    }
    654664}
  • branches/1.2/bp-themes/bp-default/comments.php

    r2931 r3240  
    9696                    <?php do_action( 'bp_before_blog_comment_form' ) ?>
    9797
    98                     <form action="<?php echo get_option( 'siteurl' ); ?>/wp-comments-post.php" method="post" id="commentform" class="standard-form">
     98                    <form action="<?php echo site_url( 'wp-comments-post.php' ) ?>" method="post" id="commentform" class="standard-form">
    9999
    100100                        <?php if ( $user_ID ) : ?>
Note: See TracChangeset for help on using the changeset viewer.