Page 1 of 1

Better Patch Instructions?

PostPosted: November 15th, 2011, 4:25 pm
by akhanukov
I justinstalled v11105 and after I tried to run the Multisite Wordpress Patch Automatically, I received an error that said the files could not be written to, so I want to manually patch the files. However, the instructions just say:

Patch #1 ( /wp-login.php )

case 'register' :
if ( is_multisite() ) {
// Multisite uses wp-signup.php
// Modified for full plugin compatiblity.
//wp_redirect( apply_filters( 'wp_signup_location', get_bloginfo('wpurl') . '/wp-signup.php' ) );
//exit;
}

Patch #2 ( /wp-includes/load.php )

// Modified for full plugin compatiblity.
//if ( empty( $active_plugins ) || defined( 'WP_INSTALLING' ) )
if ( empty( $active_plugins ) || ( defined( 'WP_INSTALLING' ) && !preg_match("/\/wp-activate\.php/", $_SERVER["REQUEST_URI"]) ) )
return $plugins;

Patch #3 ( /wp-admin/user-new.php )

// Modified for full plugin compatiblity.
//wpmu_signup_user( $new_user_login, $_REQUEST[ 'email' ], array( 'add_to_blog' => $wpdb->blogid, 'new_role' => $_REQUEST[ 'role' ] ) );
wpmu_signup_user( $new_user_login, $_REQUEST[ 'email' ], apply_filters( 'add_signup_meta', array( 'add_to_blog' => $wpdb->blogid, 'new_role' => $_REQUEST[ 'role' ] ) ) );

Patch #4 ( /wp-includes/ms-functions.php )

// Modified for full plugin compatiblity.
//return new WP_Error( 'user_already_exists', __( 'That username is already activated.' ), $signup);
return apply_filters('_wpmu_activate_existing_error_', new WP_Error( 'user_already_exists', __( 'That username is already activated.' ), $signup), get_defined_vars());

Don't forget to patch these files again, each time you upgrade the WordPress® core.


So I would like to know:

1. Do I throw each bit of code at the end of each file? OR
2. So I find the area of the file where the case or code exists and insert the new code there?
3. How and where does the auto patcher put this? Thanks!

Re: Better Patch Instructions?

PostPosted: November 15th, 2011, 10:33 pm
by akhanukov
OK. I'm pretty embarrassed now. I basically went into each file and replaced the very similar lines. Duh. I guess having that one extra line of instructions would clarify this problem for dummies like me. :)

Re: Better Patch Instructions?

PostPosted: November 16th, 2011, 8:15 am
by Eduan
Good work on figuring it out!
Just for future reference, where did you place it?