Skip to:
Content

BuddyPress.org

Changeset 2352 for trunk/bp-groups.php


Ignore:
Timestamp:
01/19/2010 11:27:58 AM (15 years ago)
Author:
apeatling
Message:

Removing "Group News" setting since the new activity stream updates replaces this with a much more intuitive interface. Fixes #1525

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-groups.php

    r2345 r2352  
    697697                    return false;
    698698
    699                 if ( !groups_edit_base_group_details( $_POST['group-id'], $_POST['group-name'], $_POST['group-desc'], $_POST['group-news'], (int)$_POST['group-notify-members'] ) ) {
     699                if ( !groups_edit_base_group_details( $_POST['group-id'], $_POST['group-name'], $_POST['group-desc'], (int)$_POST['group-notify-members'] ) ) {
    700700                    bp_core_add_message( __( 'There was an error updating group details, please try again.', 'buddypress' ), 'error' );
    701701                } else {
     
    726726        // If the edit form has been submitted, save the edited details
    727727        if ( isset( $_POST['save'] ) ) {
    728             $enable_wire = ( isset($_POST['group-show-wire'] ) ) ? 1 : 0;
    729728            $enable_forum = ( isset($_POST['group-show-forum'] ) ) ? 1 : 0;
    730729            $enable_photos = ( isset($_POST['group-show-photos'] ) ) ? 1 : 0;
     
    738737                return false;
    739738
    740             if ( !groups_edit_group_settings( $_POST['group-id'], $enable_wire, $enable_forum, $enable_photos, $photos_admin_only, $status ) ) {
     739            if ( !groups_edit_group_settings( $_POST['group-id'], $enable_forum, $enable_photos, $photos_admin_only, $status ) ) {
    741740                bp_core_add_message( __( 'There was an error updating group settings, please try again.', 'buddypress' ), 'error' );
    742741            } else {
     
    10971096            }
    10981097
    1099             if ( !$bp->groups->new_group_id = groups_create_group( array( 'group_id' => $bp->groups->new_group_id, 'name' => $_POST['group-name'], 'description' => $_POST['group-desc'], 'news' => $_POST['group-news'], 'slug' => groups_check_slug( sanitize_title($_POST['group-name']) ), 'date_created' => time() ) ) ) {
     1098            if ( !$bp->groups->new_group_id = groups_create_group( array( 'group_id' => $bp->groups->new_group_id, 'name' => $_POST['group-name'], 'description' => $_POST['group-desc'], 'slug' => groups_check_slug( sanitize_title($_POST['group-name']) ), 'date_created' => time() ) ) ) {
    11001099                bp_core_add_message( __( 'There was an error saving group details, please try again.', 'buddypress' ), 'error' );
    11011100                bp_core_redirect( $bp->root_domain . '/' . $bp->groups->slug . '/create/step/' . $bp->groups->current_create_step . '/' );
     
    11081107        if ( 'group-settings' == $bp->groups->current_create_step ) {
    11091108            $group_status = 'public';
    1110             $group_enable_wire = 1;
    11111109            $group_enable_forum = 1;
    1112 
    1113             if ( !isset($_POST['group-show-wire']) )
    1114                 $group_enable_wire = 0;
    11151110
    11161111            if ( !isset($_POST['group-show-forum']) ) {
     
    11281123                $group_status = 'hidden';
    11291124
    1130             if ( !$bp->groups->new_group_id = groups_create_group( array( 'group_id' => $bp->groups->new_group_id, 'status' => $group_status, 'enable_wire' => $group_enable_wire, 'enable_forum' => $group_enable_forum ) ) ) {
     1125            if ( !$bp->groups->new_group_id = groups_create_group( array( 'group_id' => $bp->groups->new_group_id, 'status' => $group_status, 'enable_forum' => $group_enable_forum ) ) ) {
    11311126                bp_core_add_message( __( 'There was an error saving group details, please try again.', 'buddypress' ), 'error' );
    11321127                bp_core_redirect( $bp->root_domain . '/' . $bp->groups->slug . '/create/step/' . $bp->groups->current_create_step . '/' );
     
    14781473     *  'name'
    14791474     *  'description'
    1480      *  'news'
    14811475     *  'slug'
    14821476     *  'status'
    1483      *  'enable_wire'
    14841477     *  'enable_forum'
    14851478     *  'date_created'
     
    15021495        $group->description = $description;
    15031496
    1504     if ( isset( $news ) )
    1505         $group->news = $news;
    1506 
    15071497    if ( isset( $slug ) && groups_check_slug( $slug ) )
    15081498        $group->slug = $slug;
     
    15121502            $group->status = $status;
    15131503    }
    1514 
    1515     if ( isset( $enable_wire ) )
    1516         $group->enable_wire = $enable_wire;
    1517     else if ( !$group_id && !isset( $enable_wire ) )
    1518         $group->enable_wire = 1;
    15191504
    15201505    if ( isset( $enable_forum ) )
     
    15461531}
    15471532
    1548 function groups_edit_base_group_details( $group_id, $group_name, $group_desc, $group_news, $notify_members ) {
     1533function groups_edit_base_group_details( $group_id, $group_name, $group_desc, $notify_members ) {
    15491534    global $bp;
    15501535
     
    15551540    $group->name = $group_name;
    15561541    $group->description = $group_desc;
    1557     $group->news = $group_news;
    15581542
    15591543    if ( !$group->save() )
     
    15701554}
    15711555
    1572 function groups_edit_group_settings( $group_id, $enable_wire, $enable_forum, $enable_photos, $photos_admin_only, $status ) {
     1556function groups_edit_group_settings( $group_id, $enable_forum, $enable_photos, $photos_admin_only, $status ) {
    15731557    global $bp;
    15741558
    15751559    $group = new BP_Groups_Group( $group_id, false, false );
    1576     $group->enable_wire = $enable_wire;
    15771560    $group->enable_forum = $enable_forum;
    15781561    $group->enable_photos = $enable_photos;
Note: See TracChangeset for help on using the changeset viewer.