Make WordPress Core

Ticket #12595: mt-import-max-execution-time-fix.0.patch

File mt-import-max-execution-time-fix.0.patch, 580 bytes (added by stevecrozz, 15 years ago)

patch fixing max_execution_time hardcoding in mt.php

  • wp-admin/import/mt.php

     
    241241
    242242        function save_post(&$post, &$comments, &$pings) {
    243243                // Reset the counter
    244                 set_time_limit(30);
     244                $max_execution_time = ini_get('max_execution_time');
     245                if ( $max_execution_time == '' ) {
     246                        set_time_limit(30);
     247                } else {
     248                        set_time_limit($max_execution_time);
     249                }
    245250                $post = get_object_vars($post);
    246251                $post = add_magic_quotes($post);
    247252                $post = (object) $post;