Changeset 6243
- Timestamp:
- 01/13/2017 07:29:26 PM (4 years ago)
- Location:
- trunk/src/includes/core
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/core/abstraction.php
r6106 r6243 155 155 return (float) $wp_version; 156 156 } 157 158 /** 159 * Is this a large bbPress installation? 160 * 161 * @since 2.6.0 bbPress (r6242) 162 * 163 * @return bool True if more than 10000 users, false not 164 */ 165 function bbp_is_large_install() { 166 167 // Default to false 168 $retval = false; 169 170 // Multisite has a function specifically for this 171 if ( function_exists( 'wp_is_large_network' ) ) { 172 $retval = wp_is_large_network( 'users' ); 173 } else { 174 $bbp_db = bbp_db(); 175 $count = $bbp_db->get_var( "SELECT COUNT(ID) as c FROM {$bbp_db->users} WHERE user_status = '0'" ); 176 $retval = apply_filters( 'wp_is_large_network', ( $count > 10000 ), 'users', $count ); 177 } 178 179 return (bool) $retval; 180 } -
trunk/src/includes/core/update.php
r6242 r6243 323 323 * @link https://bbpress.trac.wordpress.org/ticket/2959 324 324 */ 325 if ( ! wp_is_large_network( 'users') ) {325 if ( ! bbp_is_large_install() ) { 326 326 bbp_admin_upgrade_user_favorites(); 327 327 bbp_admin_upgrade_user_topic_subscriptions();
Note: See TracChangeset
for help on using the changeset viewer.