Make WordPress Core

Ticket #22900: 22900.hotfix.diff

File 22900.hotfix.diff, 2.3 KB (added by dd32, 13 years ago)
  • hotfix.php

     
    3535
    3636        switch ( $wp_version ) {
    3737                case '3.5' :
    38                         $hotfixes = array( '350_twentytwelve' );
     38                        $hotfixes = array( '350_twentytwelve', '350_iis_http_failure' );
    3939                        break;
    4040                case '3.4.2' :
    4141                        $hotfixes = array( '342_custom_fields' );
     
    217217        return wp_remote_post( $url, $args );
    218218}
    219219
     220function wp_hotfix_350_iis_http_failure() {
     221        add_filter( 'filesystem_method', 'wp_hotfix_350_iis_http_failure_define' );
     222}
     223
     224function wp_hotfix_350_iis_http_failure_define( $filter ) {
     225        if ( ! defined( 'WP_TEMP_DIR' ) )
     226                define( 'WP_TEMP_DIR', wp_hotfix_350_iis_http_failure_get_temp_dir() );
     227        remove_filter( 'filesystem_method', 'wp_hotfix_350_iis_http_failure_define' );
     228        return $filter;
     229}
     230
     231function wp_hotfix_350_iis_http_failure_get_temp_dir() {
     232        $temp = ini_get('upload_tmp_dir');
     233        if ( is_dir( $temp ) && @is_writable( $temp ) )
     234                return trailingslashit( rtrim( $temp, '\\' ) );
     235
     236        $temp = WP_CONTENT_DIR . '/';
     237        if ( is_dir( $temp ) && @is_writable( $temp ) )
     238                return $temp;
     239        return false;
     240}
     241 No newline at end of file
  • readme.txt

     
    1515
    1616* **WordPress 3.5**
    1717        * Lets you update Twenty Twelve if it is shown as "broken" after installing 3.5
     18        * Lets you update WordPress, or, install/update Themes, and Plugins on IIS7 under certain conditions
    1819
    1920* **WordPress 3.4.2**
    2021        * Fix adding and updating Custom Fields
     
    3435Read the "Complete Hotfix List" section in the description. A later version of the plugin may list the hotfixes in a special WordPress admin page.
    3536
    3637== Changelog ==
     38= 1.1 =
     39* Lets you update WordPress, or, install/update Themes, and Plugins on IIS7 under certain conditions
     40
    3741= 1.0 =
    3842* Lets you update Twenty Twelve if it is shown as "broken" after installing 3.5
    3943
     
    9397== Complete Hotfix List ==
    9498* **WordPress 3.5**
    9599        * Lets you update Twenty Twelve if it is shown as "broken" after installing 3.5
     100        * Lets you update WordPress, or, install/update Themes, and Plugins on IIS7 under certain conditions
    96101
    97102* **WordPress 3.4.2**
    98103        * Fix adding and updating Custom Fields