Changeset 3209
- Timestamp:
- 05/24/2011 09:39:29 AM (15 years ago)
- File:
-
- 1 edited
-
branches/plugin/bbp-admin/bbp-functions.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/plugin/bbp-admin/bbp-functions.php
r3196 r3209 859 859 860 860 // Forums need to know what their last active item is as well. Now it gets a bit more complex to do in the database. 861 $forums = $wpdb->get_col( "SELECT `ID` FROM `$wpdb->posts` WHERE `post_type` = 'forum' ;" );861 $forums = $wpdb->get_col( "SELECT `ID` FROM `$wpdb->posts` WHERE `post_type` = 'forum' and `post_status` != 'auto-draft';" ); 862 862 if ( is_wp_error( $forums ) ) 863 863 return array( 10, sprintf( $statement, $result ) ); 864 864 865 foreach ( $forums as $forum ) {866 bbp_update_forum_last_active_id( $forum );867 bbp_update_forum _last_active_time( $forum);868 } 869 865 // Loop through each forum and update them 866 foreach ( $forums as $forum_id ) 867 bbp_update_forum( array( 'forum_id' => $forum_id ) ); 868 869 // Complete results 870 870 $result = __( 'Complete!', 'bbpress' ); 871 871 return array( 0, sprintf( $statement, $result ) );
Note: See TracChangeset
for help on using the changeset viewer.