From 7b53ad5580a5018653b7275b2450cb5f1af5571c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 18 Oct 2013 01:09:41 +0200 Subject: [PATCH 1/2] Fix: Missing field required by update_price --- htdocs/install/mysql/migration/3.4.0-3.5.0.sql | 1 + htdocs/install/mysql/tables/llx_contratdet.sql | 1 + 2 files changed, 2 insertions(+) diff --git a/htdocs/install/mysql/migration/3.4.0-3.5.0.sql b/htdocs/install/mysql/migration/3.4.0-3.5.0.sql index 05372efbf30..f6b7abcf9f8 100755 --- a/htdocs/install/mysql/migration/3.4.0-3.5.0.sql +++ b/htdocs/install/mysql/migration/3.4.0-3.5.0.sql @@ -301,6 +301,7 @@ ALTER TABLE llx_facture_fourn MODIFY COLUMN fk_cond_reglement integer NULL; insert into llx_c_action_trigger (rowid,code,label,description,elementtype,rang) values (9,'COMPANY_SENTBYMAIL','Mails sent from third party card','Executed when you send email from third party card','societe',1); +ALTER TABLE llx_contratdet ADD column product_type integer DEFAULT 1 after total_ttc; create table llx_contrat_extrafields ( diff --git a/htdocs/install/mysql/tables/llx_contratdet.sql b/htdocs/install/mysql/tables/llx_contratdet.sql index 9424bc4b4b4..78091d3a3d9 100644 --- a/htdocs/install/mysql/tables/llx_contratdet.sql +++ b/htdocs/install/mysql/tables/llx_contratdet.sql @@ -52,6 +52,7 @@ create table llx_contratdet total_localtax1 double(24,8) DEFAULT 0, -- Total Local tax 1 de la ligne total_localtax2 double(24,8) DEFAULT 0, -- Total Local tax 2 de la ligne total_ttc double(24,8) DEFAULT 0, -- Total TTC de la ligne toute quantite et incluant remise ligne et globale + product_type integer DEFAULT 1, -- Product type (1=service by default) info_bits integer DEFAULT 0, -- TVA NPR ou non buy_price_ht double(24,8) DEFAULT NULL, -- buying price From bf3ca7a0f0dc973f07dcd241007e107d86bcdec4 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 18 Oct 2013 01:20:25 +0200 Subject: [PATCH 2/2] Fix: Avoid syntax error --- htdocs/core/lib/xcal.lib.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/htdocs/core/lib/xcal.lib.php b/htdocs/core/lib/xcal.lib.php index 6559e8043c0..08212f807ce 100644 --- a/htdocs/core/lib/xcal.lib.php +++ b/htdocs/core/lib/xcal.lib.php @@ -519,7 +519,8 @@ function quotedPrintDecode($str) * preg_replace /e modifier is deprecated in PHP 5.5 * but anonymous functions for use in preg_replace_callback are only available from 5.3.0 */ - if (version_compare(PHP_VERSION, '5.3.0') >= 0) { +/* if (version_compare(PHP_VERSION, '5.3.0') >= 0) + { $out = preg_replace_callback( '/=([A-F0-9]{2})/', function ($m) { @@ -527,9 +528,11 @@ function quotedPrintDecode($str) }, $out ); - } else { - $out = preg_replace('/=([A-F0-9]{2})/e', chr(hexdec('\\1')), $out); } + else + {*/ + $out = @preg_replace('/=([A-F0-9]{2})/e', chr(hexdec('\\1')), $out); +// } return trim($out); }