Common Changes
- Upgrade center. The schema of a content upgrade package is now an object of \Tygh\UpgradeCenter\ContentSchema. Backward compatibility is preserved. You can use this schema as an object in your own upgrade validators.
- Behaviour of the {btn} backend template function has changed:
- Permission checks for the $href parameter now use the GET method. Permission checks for $dispatch use POST.
- The method parameter has been added. Its value can be GET or POST. This parameter affects permission checks. Also, if method == "POST", the cm-post class will be added to the link automatically.
- We don't recommend passing cm-post in the $class parameter.
- All requests performed with methods of \Tygh\Http class now have default connect timeout value of 10 seconds.
Hooks Changes
New Hooks
- fn_set_hook('is_order_allowed_post', $order_id, $auth, $allowed); - Checks if an order is available for a customer.
- fn_set_hook('checkout_place_orders_pre_route', $cart, $auth, $params); - Performs actions before order placement redirect on checkout.
- fn_set_hook('get_languages', $params, $hash_key, $field_list, $join, $condition, $group_by, $order_by, $limit); - Modifies the get languages list by specified parameters SQL query parameters.
- fn_set_hook('get_all_languages', $edit, $field_list, $join, $condition, $group_by, $order_by, $limit); - Modifies the all languages list SQL query parameters.
- fn_set_hook('get_simple_languages', $include_hidden, $field_list, $join, $condition, $group_by, $order_by, $limit); - Modifies the simple languages list SQL query parameters.
- fn_set_hook('get_available_languages', $area, $include_hidden, $field_list, $join, $condition, $group_by, $order_by, $limit); - Modifies the available languages list SQL query parameters.
Changed Hooks
- fn_set_hook('is_order_allowed', $order_id, $allowed); is now deprecated.
-fn_set_hook('buy_together_get_chains_pre', $parms, $auth, $lang_code); +fn_set_hook('buy_together_get_chains_pre', $params, $auth, $lang_code);
-fn_set_hook('convert_price_pre', $price); +fn_set_hook('convert_price_pre', $price, $currency_code);
-fn_set_hook('convert_price_post', $result, $price); +fn_set_hook('convert_price_post', $result, $price, $currency_code);
fn_set_hook('send_form', $page_data, $form_values, $result, $from, $sender, $attachments, $is_html); fn_set_hook('send_form', $page_data, $form_values, $result, $from, $sender, $attachments, $is_html, $subject);
Core Functions
Changed Functions
-function db_paginate(&$page, $items_per_page, $total_items = 0) +function db_paginate(&$page, &$items_per_page, $total_items = 0)
-function fn_blog_get_pages($params, $join, $condition, $fields, $group_by, &$sortings, $lang_code) +function fn_blog_get_pages(&$params, $join, $condition, $fields, $group_by, &$sortings, $lang_code)
New Functions
- \Tygh\Database\Connection::hasTable($table_name, $set_prefix = true) - Checks if the table exists in the database.
- db_has_table($table_name, $set_prefix = true) - Short code for \Tygh\Database\Connection::hasTable, checks if the table exists on current connection.
- fn_get_subscriber_id_by_email($email = '') - Gets a subscriber identifier by email.
- fn_exim_find_feature_group_id($name, $lang_code) - Finds a product feature group id by the name.
- fn_exim_find_feature_id($name, $type, $group_id, $lang_code) - Finds a product feature id by params.
- fn_extract_addon_package($file_name) - Extracts an add-on package to a temporary directory.
- fn_validate_addon_structure($addon_name, $path) - Validates an ad-on package structure.
- fn_get_subscribers($params, $items_per_page = 0, $lang_code = CART_LANGUAGE) - Gets the list of subscribers.
- fn_update_subscriber($subscriber_data, $subscriber_id = 0) - Updates subscribers and subscriptions.
- fn_is_order_allowed($order_id, $auth) - Checks if an order is available to view for a customer.
- fn_discussion_check_thread_permissions($thread, $auth) - Checks access permissions to a thread object (e.g. an order).
- fn_paypal_checkout_place_orders_pre_route(&$cart, $auth, $params) - Provides the token and handles errors for checkout with In-Context Checkout.
- fn_form_builder_get_form_subject($form_structure, $form_data) - Gets an email subject for the submitted form.
- fn_sort_tree($items, $subitems_field = 'subitems', $order_by = array('position'), $order = 'asc') - Sorts the multi-level tree.
- \Tygh\Web\Session::requestGetSessionID() - Returns the session identifier contained in the HTTP request or nulls, if the request doesn't contain the session ID.
- \Tygh\Snapshot::getModifiedFiles($ext = 'php', array $directories = array(), array $exclude = array()) - Gets modified files.