Permalink
Browse files

precount sizeof for performance

  • Loading branch information...
1 parent 79b0252 commit d145710260e104f23abe3e53e045a28463564731 @acidvertigo acidvertigo committed Jan 11, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 catalog/install/includes/functions/database.php
@@ -107,7 +107,8 @@ function osc_db_install($database, $sql_file) {
osc_db_query("drop table if exists action_recorder, address_book, address_format, administrators, banners, banners_history, categories, categories_description, configuration, configuration_group, counter, counter_history, countries, currencies, customers, customers_basket, customers_basket_attributes, customers_info, geo_zones, languages, manufacturers, manufacturers_info, newsletters, orders, orders_products, orders_products_attributes, orders_products_download, orders_status, orders_status_history, orders_total, products, products_attributes, products_attributes_download, products_description, products_images, products_notifications, products_options, products_options_values, products_options_values_to_products_options, products_to_categories, reviews, reviews_description, sec_directory_whitelist, sessions, specials, tax_class, tax_rates, whos_online, zones, zones_to_geo_zones");
- for ($i=0; $i<sizeof($sql_array); $i++) {
+ $s=sizeof($sql_array);
+ for ($i=0; $i<$s; $i++) {
osc_db_query($sql_array[$i]);
}
} else {

0 comments on commit d145710

Please sign in to comment.