Changeset 25397
- Timestamp:
- 09/12/2013 07:16:30 AM (11 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/ms-functions.php
r25229 r25397 1477 1477 global $wpdb; 1478 1478 $user = get_userdata( (int) $user_id ); 1479 $wpdb->insert( $wpdb->registration_log, array('email' => $user->user_email, 'IP' => preg_replace( '/[^0-9., ]/', '', wp_unslash( $_SERVER['REMOTE_ADDR'] ) ), 'blog_id' => $blog_id, 'date_registered' => current_time('mysql')) ); 1479 if ( $user ) 1480 $wpdb->insert( $wpdb->registration_log, array('email' => $user->user_email, 'IP' => preg_replace( '/[^0-9., ]/', '', wp_unslash( $_SERVER['REMOTE_ADDR'] ) ), 'blog_id' => $blog_id, 'date_registered' => current_time('mysql')) ); 1480 1481 } 1481 1482 -
trunk/tests/phpunit/tests/ms.php
r25197 r25397 11 11 12 12 protected $plugin_hook_count = 0; 13 14 function setUp() { 15 parent::setUp(); 16 17 $_SERVER['REMOTE_ADDR'] = ''; 18 add_action( 'deprecated_function_run', array( $this, 'deprecated_function_run_check' ) ); 19 } 20 21 function tearDown() { 22 parent::tearDown(); 23 remove_action( 'deprecated_function_run', array( $this, 'deprecated_function_run_check' ) ); 24 } 25 26 function deprecated_function_run_check( $function ) { 27 if ( in_array( $function, array( 'is_blog_user', 'get_dashboard_blog' ) ) ) 28 add_filter( 'deprecated_function_trigger_error', array( $this, 'filter_deprecated_function_trigger_error' ) ); 29 } 30 31 function filter_deprecated_function_trigger_error() { 32 remove_filter( 'deprecated_function_trigger_error', array( $this, 'filter_deprecated_function_trigger_error' ) ); 33 return false; 34 } 13 35 14 36 function test_create_and_delete_blog() { … … 309 331 $this->assertTrue( is_upload_space_available() ); 310 332 311 if ( ! file_exists( BLOGSUPLOADDIR ) )333 if ( defined( 'BLOGSUPLOADDIR' ) && ! file_exists( BLOGSUPLOADDIR ) ) 312 334 $this->markTestSkipped( 'This test is broken when blogs.dir does not exist. '); 313 335 … … 526 548 /** 527 549 * Test fetching a blog that doesn't exist and again after it exists. 528 * 550 * 529 551 * @ticket 23405 530 552 */ … … 1014 1036 ) ); 1015 1037 update_user_status( $spam_user_id, 'spam', '1' ); 1016 1038 1017 1039 $this->assertTrue( is_user_spammy( $spam_username ) ); 1018 1040 $this->assertFalse( is_user_spammy( 'testuser1' ) ); -
trunk/tests/phpunit/tests/option/blogOption.php
r25002 r25397 6 6 */ 7 7 class Tests_Option_BlogOption extends WP_UnitTestCase { 8 function setUp() { 9 parent::setUp(); 10 11 $_SERVER['REMOTE_ADDR'] = null; 12 } 13 8 14 function test_from_same_site() { 9 15 $key = rand_str(); … … 82 88 global $current_site, $base; 83 89 90 $title = 'Fooblog'; 84 91 $domain = 'blogoptiontest'; 85 92
Note: See TracChangeset
for help on using the changeset viewer.