USE [% osc %];

## mysqldiff 0.43
## 
## Run on Wed Oct 30 12:44:18 2013
## Options: debug=0
##
## --- file: 2.3.3.cp1.mysql
## +++ file: 2.3.3.4.mysql

ALTER TABLE whos_online ADD INDEX idx_whos_online_session_id (session_id);

# Update the image name for the banner
UPDATE banners SET banners_group='footer' WHERE banners_id=1 LIMIT 1;

# Add new configuration options
INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable Partner News Module', 'MODULE_ADMIN_DASHBOARD_PARTNER_NEWS_STATUS', 'True', 'Do you want to show the latest osCommerce Partner News on the dashboard?', '6', '1', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now());
INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_ADMIN_DASHBOARD_PARTNER_NEWS_SORT_ORDER', '820', 'Sort order of display. Lowest is displayed first.', '6', '0', now());

# Add another module to the admin dashboard (d_partner_news.php)
UPDATE configuration SET configuration_value='d_total_revenue.php;d_total_customers.php;d_orders.php;d_customers.php;d_admin_logins.php;d_security_checks.php;d_latest_news.php;d_latest_addons.php;d_partner_news.php;d_version_check.php;d_reviews.php' WHERE configuration_key='MODULE_ADMIN_DASHBOARD_INSTALLED' AND configuration_value='d_total_revenue.php;d_total_customers.php;d_orders.php;d_customers.php;d_admin_logins.php;d_security_checks.php;d_latest_news.php;d_latest_addons.php;d_version_check.php;d_reviews.php' LIMIT 1;

# Remove the initial quote (") from the EMAIL_FROM configuration value
SELECT configuration_value INTO @value FROM configuration WHERE configuration_key='EMAIL_FROM' AND configuration_value LIKE '"%' LIMIT 1;
UPDATE configuration SET configuration_value=SUBSTR(@value, 2) WHERE configuration_key='EMAIL_FROM' AND configuration_value=@value LIMIT 1;
