Index: branches/5.3.x/install/upgrades.sql =================================================================== diff -u -N -r15899 -r15925 --- branches/5.3.x/install/upgrades.sql (.../upgrades.sql) (revision 15899) +++ branches/5.3.x/install/upgrades.sql (.../upgrades.sql) (revision 15925) @@ -293,3 +293,5 @@ WHERE `Name` = 'In-Commerce'; # ===== v 5.2.1-RC1 ===== + +# ===== v 5.3.0-B1 ===== Index: branches/5.3.x/units/coupons/coupons_event_handler.php =================================================================== diff -u -N -r15807 -r15925 --- branches/5.3.x/units/coupons/coupons_event_handler.php (.../coupons_event_handler.php) (revision 15807) +++ branches/5.3.x/units/coupons/coupons_event_handler.php (.../coupons_event_handler.php) (revision 15925) @@ -1,6 +1,6 @@ getObject(); /* @var $object kDBItem */ - $exp_date = adodb_mktime(); + $exp_date = time(); $default_duration = $this->Application->ConfigValue('Comm_DefaultCouponDuration'); if ( $default_duration && $default_duration > 0 ) { Index: branches/5.3.x/units/shipping_quote_engines/usps.php =================================================================== diff -u -N -r15899 -r15925 --- branches/5.3.x/units/shipping_quote_engines/usps.php (.../usps.php) (revision 15899) +++ branches/5.3.x/units/shipping_quote_engines/usps.php (.../usps.php) (revision 15925) @@ -1,6 +1,6 @@ Application->getClientIp(), $usps_server . '/' . $api_dll . '?' . urldecode($request), $body Index: branches/5.3.x/units/gateways/gw_classes/google_checkout.php =================================================================== diff -u -N -r15899 -r15925 --- branches/5.3.x/units/gateways/gw_classes/google_checkout.php (.../google_checkout.php) (revision 15899) +++ branches/5.3.x/units/gateways/gw_classes/google_checkout.php (.../google_checkout.php) (revision 15925) @@ -1,6 +1,6 @@ addFilter('not_virtual', '%1$s.Virtual = 0'); if ( !$this->Application->isAdminUser ) { - $object->addFilter('expire_filter', '%1$s.Expire IS NULL OR %1$s.Expire > ' . adodb_mktime()); + $object->addFilter('expire_filter', '%1$s.Expire IS NULL OR %1$s.Expire > ' . time()); } return $type_clauses; @@ -698,7 +698,7 @@ AND DataType="Rating"'; $res = $this->Conn->GetRow($sql); - if ( $res && $res['Expire'] < adodb_mktime() ) { + if ( $res && $res['Expire'] < time() ) { $sql = ' DELETE FROM ' . TABLE_PREFIX . 'SpamControl WHERE ItemResourceId=' . $object->GetDBField('ResourceId') . ' AND IPaddress="' . $this->Application->getClientIp() . '" @@ -720,7 +720,7 @@ $object->SetDBField('CachedVotesQty', $new_votes); $object->Update(); - $expire = adodb_mktime() + $this->Application->ConfigValue('product_ReviewDelay_Value') * $this->Application->ConfigValue('product_ReviewDelay_Interval'); + $expire = time() + $this->Application->ConfigValue('product_ReviewDelay_Value') * $this->Application->ConfigValue('product_ReviewDelay_Interval'); $sql = ' INSERT INTO ' . TABLE_PREFIX . 'SpamControl (ItemResourceId, IPaddress, PortalUserId, DataType, Expire) VALUES (' . $object->GetDBField('ResourceId') . ', @@ -913,11 +913,11 @@ $user_groups = $this->Conn->Query($sql, 'GroupId'); if ( !isset($user_groups[$group_id]) ) { - $expire = adodb_mktime() + $duration; + $expire = time() + $duration; } else { $expire = $user_groups[$group_id]['MembershipExpires']; - $expire = $expire < adodb_mktime() ? adodb_mktime() + $duration : $expire + $duration; + $expire = $expire < time() ? time() + $duration : $expire + $duration; } /*// Customization healtheconomics.org Index: branches/5.3.x/units/affiliates/affiliates_event_handler.php =================================================================== diff -u -N -r15695 -r15925 --- branches/5.3.x/units/affiliates/affiliates_event_handler.php (.../affiliates_event_handler.php) (revision 15695) +++ branches/5.3.x/units/affiliates/affiliates_event_handler.php (.../affiliates_event_handler.php) (revision 15925) @@ -1,6 +1,6 @@ Application->ConfigValue('Comm_AffiliateCookieDuration'); // days - return adodb_mktime() + $expire * 24 * 60 * 60; + return time() + $expire * 24 * 60 * 60; } /** @@ -492,7 +492,7 @@ $affiliates_table = $event->getUnitConfig()->getTableName(); $affiliate_plan_table = $this->Application->getUnitConfig('ap')->getTableName(); - $base_time = adodb_mktime(); + $base_time = time(); $where_clause = Array (); foreach ($intervals as $interval_length => $interval_description) { @@ -538,14 +538,14 @@ switch ($period_length) { case 86400: // day - $start_timestamp = adodb_mktime(0, 0, 0, adodb_date('m', $base_time), adodb_date('d', $base_time), adodb_date('Y', $base_time)); + $start_timestamp = mktime(0, 0, 0, date('m', $base_time), date('d', $base_time), date('Y', $base_time)); break; case 604800: // week $day_seconds = 86400; $first_week_day = $this->Application->ConfigValue('FirstDayOfWeek'); - $morning = adodb_mktime(0, 0, 0, adodb_date('m', $base_time), adodb_date('d', $base_time), adodb_date('Y', $base_time)); - $week_day = adodb_date('w', $morning); + $morning = mktime(0, 0, 0, date('m', $base_time), date('d', $base_time), date('Y', $base_time)); + $week_day = date('w', $morning); if ( $week_day == $first_week_day ) { // if it is already first week day, then don't search for previous week day $day_diff = 0; @@ -558,16 +558,16 @@ break; case 2628000: // month - $start_timestamp = adodb_mktime(0, 0, 0, adodb_date('m', $base_time), 1, adodb_date('Y', $base_time)); + $start_timestamp = mktime(0, 0, 0, date('m', $base_time), 1, date('Y', $base_time)); break; case 7884000: // quartal - $first_quartal_month = (ceil(adodb_date('m', $base_time) / 3) - 1) * 3 + 1; - $start_timestamp = adodb_mktime(0, 0, 0, $first_quartal_month, 1, adodb_date('Y', $base_time)); + $first_quartal_month = (ceil(date('m', $base_time) / 3) - 1) * 3 + 1; + $start_timestamp = mktime(0, 0, 0, $first_quartal_month, 1, date('Y', $base_time)); break; case 31536000: - $start_timestamp = adodb_mktime(0, 0, 0, 1, 1, adodb_date('Y', $base_time)); + $start_timestamp = mktime(0, 0, 0, 1, 1, date('Y', $base_time)); break; } Index: branches/5.3.x/units/orders/orders_event_handler.php =================================================================== diff -u -N -r15899 -r15925 --- branches/5.3.x/units/orders/orders_event_handler.php (.../orders_event_handler.php) (revision 15899) +++ branches/5.3.x/units/orders/orders_event_handler.php (.../orders_event_handler.php) (revision 15925) @@ -1,6 +1,6 @@ GetDBField('Expiration'); $number_of_use = $coupon->GetDBField('NumberOfUses'); - if ( $coupon->GetDBField('Status') != 1 || ($expire_date && $expire_date < adodb_mktime()) || + if ( $coupon->GetDBField('Status') != 1 || ($expire_date && $expire_date < time()) || (isset($number_of_use) && $number_of_use <= 0)) { $event->status = kEvent::erFAIL; @@ -1220,7 +1220,7 @@ return ; } - $last_used = adodb_mktime(); + $last_used = time(); $coupon->SetDBField('LastUsedBy', $this->Application->RecallVar('user_id')); $coupon->SetDBField('LastUsedOn_date', $last_used); $coupon->SetDBField('LastUsedOn_time', $last_used); @@ -1654,7 +1654,7 @@ $this->setNextOrderNumber($event); $object->SetDBField('OriginalAmount', 0); } - $object->SetDBField('OrderDate', adodb_mktime()); + $object->SetDBField('OrderDate', time()); $object->UpdateFormattersSubFields(); $object->SetDBField('GWResult1', ''); $object->SetDBField('GWResult2', ''); @@ -2201,7 +2201,7 @@ $set_new_status = $this->approveOrder($order_items); // $set_new_status = $this->shipOrder($order_items); - $object->SetDBField('ShippingDate', adodb_mktime()); + $object->SetDBField('ShippingDate', time()); $object->UpdateFormattersSubFields(); $shipping_email = $object->GetDBField('ShippingEmail'); @@ -3516,7 +3516,7 @@ function OnCheckRecurringOrders($event) { $skip_clause = Array(); - $pre_expiration = adodb_mktime() + $this->Application->ConfigValue('Comm_RecurringChargeInverval') * 3600 * 24; + $pre_expiration = time() + $this->Application->ConfigValue('Comm_RecurringChargeInverval') * 3600 * 24; $to_charge = $this->getRecurringOrders($pre_expiration); if ($to_charge) { @@ -3568,7 +3568,7 @@ return ; } - $pre_expiration = adodb_mktime() + $this->Application->ConfigValue('User_MembershipExpirationReminder') * 3600 * 24; + $pre_expiration = time() + $this->Application->ConfigValue('User_MembershipExpirationReminder') * 3600 * 24; $to_charge = $this->getRecurringOrders($pre_expiration); foreach ($to_charge as $order_id => $record) { @@ -3891,7 +3891,7 @@ $debit = $gift_certificate->GetDBField('Debit'); $expire_date = $gift_certificate->GetDBField('Expiration'); - if ( $gift_certificate->GetDBField('Status') != 1 || ($expire_date && $expire_date < adodb_mktime()) || ($debit <= 0) ) { + if ( $gift_certificate->GetDBField('Status') != 1 || ($expire_date && $expire_date < time()) || ($debit <= 0) ) { $event->status = kEvent::erFAIL; $object->setCheckoutError(OrderCheckoutErrorType::GIFT_CERTIFICATE, OrderCheckoutError::GC_CODE_EXPIRED); $event->redirect = false; Index: branches/5.3.x/units/reports/reports_event_handler.php =================================================================== diff -u -N -r15695 -r15925 --- branches/5.3.x/units/reports/reports_event_handler.php (.../reports_event_handler.php) (revision 15695) +++ branches/5.3.x/units/reports/reports_event_handler.php (.../reports_event_handler.php) (revision 15925) @@ -1,6 +1,6 @@ GetDBField('InputTimeFormat'), $time); + $time = ($type == 'from') ? mktime(0, 0, 0) : mktime(23, 59, 59); + $time = date($lang_current->GetDBField('InputTimeFormat'), $time); $full_value = $value.$dt_separator.$time; Index: branches/5.3.x/units/currencies/currencies_event_handler.php =================================================================== diff -u -N -r15695 -r15925 --- branches/5.3.x/units/currencies/currencies_event_handler.php (.../currencies_event_handler.php) (revision 15695) +++ branches/5.3.x/units/currencies/currencies_event_handler.php (.../currencies_event_handler.php) (revision 15925) @@ -1,6 +1,6 @@ SetDBField('Status', 1); } - $object->SetDBField('Modified_date', adodb_mktime()); - $object->SetDBField('Modified_time', adodb_mktime()); + $object->SetDBField('Modified_date', time()); + $object->SetDBField('Modified_time', time()); if ( $object->GetDBField('Status') == 0 ) { $sql = 'DELETE FROM ' . $this->Application->getUnitConfig('ptc')->getTableName() . ' Index: branches/5.3.x/units/gateways/gw_classes/paypal.php =================================================================== diff -u -N -r15492 -r15925 --- branches/5.3.x/units/gateways/gw_classes/paypal.php (.../paypal.php) (revision 15492) +++ branches/5.3.x/units/gateways/gw_classes/paypal.php (.../paypal.php) (revision 15925) @@ -1,6 +1,6 @@ SetDBFieldsFromHash($org_order->GetFieldValues()); $order->SetDBField('SubTotal', $field_values['Price']); $order->SetDBField('OriginalAmout', $field_values['Price']); - $order->SetDBField('OrderDate', adodb_mktime()); + $order->SetDBField('OrderDate', time()); $order->UpdateFormattersSubFields(); $dup_item = false; Index: branches/5.3.x/install/upgrades.php =================================================================== diff -u -N -r15899 -r15925 --- branches/5.3.x/install/upgrades.php (.../upgrades.php) (revision 15899) +++ branches/5.3.x/install/upgrades.php (.../upgrades.php) (revision 15925) @@ -1,6 +1,6 @@ Array ('Core' => '5.2.1-B1'), '5.2.1-B2' => Array ('Core' => '5.2.1-B2'), '5.2.1-RC1' => Array ('Core' => '5.2.1-RC1'), + '5.3.0-B1' => Array ('Core' => '5.3.0-B1'), ); } Index: branches/5.3.x/units/orders/orders_tag_processor.php =================================================================== diff -u -N -r15695 -r15925 --- branches/5.3.x/units/orders/orders_tag_processor.php (.../orders_tag_processor.php) (revision 15695) +++ branches/5.3.x/units/orders/orders_tag_processor.php (.../orders_tag_processor.php) (revision 15925) @@ -1,6 +1,6 @@ SelectParam($params, 'render_as,block'); $o = ''; - $this_year = adodb_date('y'); + $this_year = date('y'); for($i = $this_year; $i <= $this_year + 10; $i++) { Index: branches/5.3.x/units/reports/reports_tag_processor.php =================================================================== diff -u -N -r15695 -r15925 --- branches/5.3.x/units/reports/reports_tag_processor.php (.../reports_tag_processor.php) (revision 15695) +++ branches/5.3.x/units/reports/reports_tag_processor.php (.../reports_tag_processor.php) (revision 15925) @@ -1,6 +1,6 @@ Conn->GetRow($sql); - $a_report_options['from'] = adodb_mktime(0, 0, 0, date('m', $a_dates['date_frm']), date('d', $a_dates['date_frm']), date('Y', $a_dates['date_frm'])); - $a_report_options['to'] = adodb_mktime(0, 0, 0, date('m', $a_dates['date_to']), date('d', $a_dates['date_to']) + 1, date('Y', $a_dates['date_to'])) - 1; + $a_report_options['from'] = mktime(0, 0, 0, date('m', $a_dates['date_frm']), date('d', $a_dates['date_frm']), date('Y', $a_dates['date_frm'])); + $a_report_options['to'] = mktime(0, 0, 0, date('m', $a_dates['date_to']), date('d', $a_dates['date_to']) + 1, date('Y', $a_dates['date_to'])) - 1; } $filter_value = 'AND o.OrderDate >= '.$a_report_options['from'].' AND o.OrderDate <= '.$a_report_options['to']; @@ -157,13 +157,13 @@ $start_month = date('m', $a_report_options['from']); $end_month_year = date('Ym', $a_report_options['to']); // big interval - move from date to the first day ot the month - $a_report_options['from'] = adodb_mktime(0, 0, 0, date('m', $a_report_options['from']), 1, date('Y', $a_report_options['from'])); + $a_report_options['from'] = mktime(0, 0, 0, date('m', $a_report_options['from']), 1, date('Y', $a_report_options['from'])); $curr_time = $a_report_options['from']; while (date('Ym', $curr_time) <= $end_month_year) { $step_labels[date('Ym', $curr_time)] = date('M-Y', $curr_time); // add month - $curr_time = adodb_mktime(0,0,0, date('m', $curr_time) + 1, 1, date('Y', $curr_time)); + $curr_time = mktime(0,0,0, date('m', $curr_time) + 1, 1, date('Y', $curr_time)); } $step_seconds = 0; } Index: branches/5.3.x/units/helpers/currency_rates.php =================================================================== diff -u -N -r15695 -r15925 --- branches/5.3.x/units/helpers/currency_rates.php (.../currency_rates.php) (revision 15695) +++ branches/5.3.x/units/helpers/currency_rates.php (.../currency_rates.php) (revision 15925) @@ -1,6 +1,6 @@ Clear(); $curr_object->Load($id, 'ISO'); $curr_object->SetDBField('RateToPrimary', $rate); - $curr_object->SetDBField('Modified_date', adodb_mktime()); - $curr_object->SetDBField('Modified_time', adodb_mktime()); + $curr_object->SetDBField('Modified_date', time()); + $curr_object->SetDBField('Modified_time', time()); $curr_object->Update(); } } Index: branches/5.3.x/units/reports/reports_config.php =================================================================== diff -u -N -r15656 -r15925 --- branches/5.3.x/units/reports/reports_config.php (.../reports_config.php) (revision 15656) +++ branches/5.3.x/units/reports/reports_config.php (.../reports_config.php) (revision 15925) @@ -1,6 +1,6 @@ 1, 'default' => 12, ), 'FromDateTime' => Array ('formatter' => 'kDateFormatter', 'default' => '', 'filter_type' => 'range_from', 'filter_field' => 'OrderDate' ), - 'ToDateTime' => Array ('formatter' => 'kDateFormatter', 'default' => '', 'filter_type' => 'range_to', 'filter_field' => 'OrderDate', 'empty_time' => adodb_mktime(23,59,59) ), + 'ToDateTime' => Array ('formatter' => 'kDateFormatter', 'default' => '', 'filter_type' => 'range_to', 'filter_field' => 'OrderDate', 'empty_time' => mktime(23, 59, 59) ), 'Recursive' => Array ( 'type' => 'int', 'formatter' => 'kOptionsFormatter', Index: branches/5.3.x/units/downloads/download_helper.php =================================================================== diff -u -N -r15695 -r15925 --- branches/5.3.x/units/downloads/download_helper.php (.../download_helper.php) (revision 15695) +++ branches/5.3.x/units/downloads/download_helper.php (.../download_helper.php) (revision 15925) @@ -1,6 +1,6 @@ RateSource, adodb_date('Y-m-d', $time)); + $time = time() - $i * 3600 * 24; + $source_file = sprintf($this->RateSource, date('Y-m-d', $time)); $xml = $curl_helper->Send($source_file); $xml_parser = xml_parser_create(); Index: branches/5.3.x/units/orders/order_validator.php =================================================================== diff -u -N -r15492 -r15925 --- branches/5.3.x/units/orders/order_validator.php (.../order_validator.php) (revision 15492) +++ branches/5.3.x/units/orders/order_validator.php (.../order_validator.php) (revision 15925) @@ -1,6 +1,6 @@ dataSource->GetDBField($field), $rets) ) { $month = $rets[1]; $year = $rets[2]; - $now_date = adodb_mktime(0, 0, 0, adodb_date('m'), adodb_date('d'), adodb_date('Y') ); - $day_count = adodb_date('t', adodb_mktime(0, 0, 0, $month, 1, $year) ); - $cc_date = adodb_mktime(23, 59, 59, $month, $day_count, $year); + $now_date = mktime(0, 0, 0, date('m'), date('d'), date('Y') ); + $day_count = date('t', mktime(0, 0, 0, $month, 1, $year) ); + $cc_date = mktime(23, 59, 59, $month, $day_count, $year); if ($cc_date < $now_date) { $error_field = isset($params['error_field']) ? $params['error_field'] : $field; Index: branches/5.3.x/units/gift_certificates/gift_certificates_eh.php =================================================================== diff -u -N -r15671 -r15925 --- branches/5.3.x/units/gift_certificates/gift_certificates_eh.php (.../gift_certificates_eh.php) (revision 15671) +++ branches/5.3.x/units/gift_certificates/gift_certificates_eh.php (.../gift_certificates_eh.php) (revision 15925) @@ -1,6 +1,6 @@ getObject(); /* @var $object kDBItem */ - $exp_date = adodb_mktime(); + $exp_date = time(); $default_duration = $this->Application->ConfigValue('Comm_DefaultCouponDuration'); if ( $default_duration ) {