Merge branch 'master' of github.com:woothemes/woocommerce

This commit is contained in:
Claudio Sanches 2015-07-15 12:26:48 -03:00
commit 9408364bb5
5 changed files with 12 additions and 8 deletions

View File

@ -608,7 +608,7 @@ class WC_Admin_Setup_Wizard {
'tax_rate_order' => $loop ++, 'tax_rate_order' => $loop ++,
'tax_rate_class' => '' 'tax_rate_class' => ''
); );
$tax_rate_id = WC_Tax::_insert_tax_rate( $tax_rate ); WC_Tax::_insert_tax_rate( $tax_rate );
} }
} }
} }

View File

@ -75,7 +75,9 @@ class WC_Tax_Rate_Importer extends WP_Importer {
if ( function_exists( 'gc_enable' ) ) { if ( function_exists( 'gc_enable' ) ) {
gc_enable(); gc_enable();
} }
@set_time_limit(0); if ( function_exists( 'set_time_limit' ) && false === strpos( ini_get( 'disable_functions' ), 'set_time_limit' ) && ! ini_get( 'safe_mode' ) ) {
set_time_limit( 0 );
}
@ob_flush(); @ob_flush();
@flush(); @flush();
@ini_set( 'auto_detect_line_endings', '1' ); @ini_set( 'auto_detect_line_endings', '1' );

View File

@ -687,7 +687,7 @@ if ( ! defined( 'ABSPATH' ) ) {
$theme_file = false; $theme_file = false;
} }
if ( $theme_file ) { if ( ! empty( $theme_file ) ) {
$core_version = WC_Admin_Status::get_file_version( WC()->plugin_path() . '/templates/' . $file ); $core_version = WC_Admin_Status::get_file_version( WC()->plugin_path() . '/templates/' . $file );
$theme_version = WC_Admin_Status::get_file_version( $theme_file ); $theme_version = WC_Admin_Status::get_file_version( $theme_file );

View File

@ -844,7 +844,9 @@ class WC_AJAX {
die(-1); die(-1);
} }
@set_time_limit(0); if ( function_exists( 'set_time_limit' ) && false === strpos( ini_get( 'disable_functions' ), 'set_time_limit' ) && ! ini_get( 'safe_mode' ) ) {
set_time_limit( 0 );
}
$post_id = intval( $_POST['post_id'] ); $post_id = intval( $_POST['post_id'] );

View File

@ -338,11 +338,11 @@ class WC_Download_Handler {
* Check and set certain server config variables to ensure downloads work as intended. * Check and set certain server config variables to ensure downloads work as intended.
*/ */
private static function check_server_config() { private static function check_server_config() {
if ( ! ini_get('safe_mode') ) { if ( function_exists( 'set_time_limit' ) && false === strpos( ini_get( 'disable_functions' ), 'set_time_limit' ) && ! ini_get( 'safe_mode' ) ) {
@set_time_limit(0); set_time_limit( 0 );
} }
if ( function_exists( 'get_magic_quotes_runtime' ) && get_magic_quotes_runtime() ) { if ( function_exists( 'get_magic_quotes_runtime' ) && get_magic_quotes_runtime() && version_compare( phpversion(), '5.4', '<' ) ) {
@set_magic_quotes_runtime(0); set_magic_quotes_runtime( 0 );
} }
if ( function_exists( 'apache_setenv' ) ) { if ( function_exists( 'apache_setenv' ) ) {
@apache_setenv( 'no-gzip', 1 ); @apache_setenv( 'no-gzip', 1 );