Index: in-auction/units/sections/ebay_eh.php =================================================================== --- in-auction/units/sections/ebay_eh.php (revision 15165) +++ in-auction/units/sections/ebay_eh.php (working copy) @@ -1771,7 +1771,7 @@ $product->Load($product_id); - $options_salt = crc32($Item->ItemID.$Transaction->TransactionID); + $options_salt = kUtil::crc32($Item->ItemID.$Transaction->TransactionID); $price = isset($Transaction->TransactionPrice->_) ? $Transaction->TransactionPrice->_ : $Transaction->TransactionPrice; Index: in-commerce/install/install_schema.sql =================================================================== --- in-commerce/install/install_schema.sql (revision 15165) +++ in-commerce/install/install_schema.sql (working copy) @@ -89,26 +89,26 @@ ); CREATE TABLE OrderItems ( - OrderItemId int(11) NOT NULL auto_increment, - OrderId int(11) NOT NULL default '0', - ProductId int(11) NOT NULL default '0', - ProductName varchar(255) NOT NULL default '', - Quantity int(11) NOT NULL default '0', - QuantityReserved int(11) default NULL, - FlatPrice decimal(10,4) NOT NULL default '0.0000', - Price decimal(10,4) NOT NULL default '0.0000', - Cost double(10,4) NOT NULL default '0.0000', - BackOrderFlag tinyint(4) default '0', - Weight double default NULL, - ShippingTypeId varchar(255) default NULL, + OrderItemId int(11) NOT NULL AUTO_INCREMENT, + OrderId int(11) NOT NULL DEFAULT '0', + ProductId int(11) NOT NULL DEFAULT '0', + ProductName varchar(255) NOT NULL DEFAULT '', + Quantity int(11) NOT NULL DEFAULT '0', + QuantityReserved int(11) DEFAULT NULL, + FlatPrice decimal(10,4) NOT NULL DEFAULT '0.0000', + Price decimal(10,4) NOT NULL DEFAULT '0.0000', + Cost double(10,4) NOT NULL DEFAULT '0.0000', + BackOrderFlag tinyint(4) DEFAULT '0', + Weight double DEFAULT NULL, + ShippingTypeId varchar(255) DEFAULT NULL, ItemData text, - OptionsSalt int(11) default '0', - SplitShippingGroup int(11) NOT NULL default '0', - PackageNum int(11) NOT NULL default '0', - ReturnType tinyint(3) unsigned NOT NULL default '0', - ReturnAmount decimal(10,2) NOT NULL default '0.00', - ReturnedOn int(10) unsigned default NULL, - PRIMARY KEY (OrderItemId), + OptionsSalt bigint(11) DEFAULT '0', + SplitShippingGroup int(11) NOT NULL DEFAULT '0', + PackageNum int(11) NOT NULL DEFAULT '0', + ReturnType tinyint(3) unsigned NOT NULL DEFAULT '0', + ReturnAmount decimal(10,2) NOT NULL DEFAULT '0.00', + ReturnedOn int(10) unsigned DEFAULT NULL, + PRIMARY KEY (OrderItemId), KEY OrderId (OrderId), KEY ProductId (ProductId), KEY BackOrderFlag (BackOrderFlag), @@ -672,7 +672,7 @@ CombinationId int(11) NOT NULL AUTO_INCREMENT, ProductId int(11) NOT NULL DEFAULT '0', Combination text, - CombinationCRC int(11) NOT NULL DEFAULT '0', + CombinationCRC bigint(11) NOT NULL DEFAULT '0', PriceType tinyint(1) DEFAULT '3', Price float DEFAULT NULL, WeightType tinyint(1) DEFAULT '3', Index: in-commerce/install/upgrades.sql =================================================================== --- in-commerce/install/upgrades.sql (revision 15213) +++ in-commerce/install/upgrades.sql (working copy) @@ -265,3 +265,12 @@ SET main_table.CachedReviewsQty = (SELECT COUNT(*) FROM <%TABLE_PREFIX%>CatalogReviews review_table WHERE review_table.ItemId = main_table.ResourceId); # ===== v 5.2.0-B3 ===== +ALTER TABLE OrderItems CHANGE OptionsSalt OptionsSalt BIGINT(11) NULL DEFAULT '0'; +UPDATE OrderItems +SET OptionsSalt = CAST((OptionsSalt & 0xFFFFFFFF) AS UNSIGNED INTEGER) +WHERE OptionsSalt < 0; + +ALTER TABLE ProductOptionCombinations CHANGE CombinationCRC CombinationCRC BIGINT(11) NOT NULL DEFAULT '0'; +UPDATE ProductOptionCombinations +SET CombinationCRC = CAST((CombinationCRC & 0xFFFFFFFF) AS UNSIGNED INTEGER) +WHERE CombinationCRC < 0; Index: in-commerce/units/product_option_combinations/product_option_combinations_event_handler.php =================================================================== --- in-commerce/units/product_option_combinations/product_option_combinations_event_handler.php (revision 15165) +++ in-commerce/units/product_option_combinations/product_option_combinations_event_handler.php (working copy) @@ -37,7 +37,7 @@ $options = unserialize($object->GetDBField('Combination')); ksort($options); - $object->SetDBField('CombinationCRC', crc32(serialize($options))); + $object->SetDBField('CombinationCRC', kUtil::crc32(serialize($options))); break; case 'OnMassDelete': @@ -97,7 +97,7 @@ $salt = $fields['Combination']; ksort($salt); - $object->Load(crc32(serialize($salt)), 'CombinationCRC'); + $object->Load(kUtil::crc32(serialize($salt)), 'CombinationCRC'); $object->SetFieldsFromHash($fields); $this->customProcessing($event,'before'); if ( $object->isLoaded() ) { // Update if such combination already exists @@ -142,7 +142,7 @@ $salt = $fields['Combination']; ksort($salt); // try to load combination by salt - if loaded, it will update the combination - $object->Load(crc32(serialize($salt)), 'CombinationCRC'); + $object->Load(kUtil::crc32(serialize($salt)), 'CombinationCRC'); if ( !$object->isLoaded() ) { $object->Load($edit_id); } @@ -350,7 +350,7 @@ ksort($n_combs); $n_combs = serialize($n_combs); - $n_crc = crc32($n_combs); + $n_crc = kUtil::crc32($n_combs); $object->SetDBField('Combination', $n_combs); $object->SetDBField('CombinationCRC', $n_crc); } Index: in-commerce/units/product_options/product_options_event_handler.php =================================================================== --- in-commerce/units/product_options/product_options_event_handler.php (revision 15165) +++ in-commerce/units/product_options/product_options_event_handler.php (working copy) @@ -72,7 +72,7 @@ } ksort($n_combs); $n_combs = serialize($n_combs); - $n_crc = crc32($n_combs); + $n_crc = kUtil::crc32($n_combs); $sql = 'UPDATE ' . $poc_table . ' SET Combination = ' . $this->Conn->qstr($n_combs) . ', Index: in-commerce/units/product_options/product_options_helper.php =================================================================== --- in-commerce/units/product_options/product_options_helper.php (revision 15165) +++ in-commerce/units/product_options/product_options_helper.php (working copy) @@ -74,7 +74,7 @@ } if ( !$comb_only ) { ksort($options); - return crc32(serialize($options)); + return kUtil::crc32(serialize($options)); } $option_keys = array_keys($options); Index: in-news/units/articles/articles_event_handler.php =================================================================== --- in-news/units/articles/articles_event_handler.php (revision 15165) +++ in-news/units/articles/articles_event_handler.php (working copy) @@ -290,7 +290,7 @@ } while ( ($sub_node =& $sub_node->NextSibling()) ); // create/update article - $article_crc = crc32($data['LINK'].$data['TITLE']); + $article_crc = kUtil::crc32($data['LINK'].$data['TITLE']); $article_id = getArrayValue($feed_articles, $article_crc); if ($article_id) { $object->Load($article_id); @@ -382,7 +382,7 @@ } while ( ($sub_node =& $sub_node->NextSibling()) ); // create/update article - $article_crc = crc32($data['LINK'].$data['TITLE']); + $article_crc = kUtil::crc32($data['LINK'].$data['TITLE']); $article_id = getArrayValue($feed_articles, $article_crc); if ($article_id) { $object->Load($article_id);