From 9dafdf41bb69a421c367565b8b560ff1cba819f8 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Tue, 26 Aug 2014 09:49:15 +0200 Subject: [PATCH 1/6] Fix: error in strict mode --- htdocs/core/menus/standard/eldy.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index fba04593b5b..b1e9ccffd52 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -1247,7 +1247,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu else dol_print_error($db); $db->free($resql); } - if ($conf->ftp->enabled && $mainmenu == 'ftp') // Entry for FTP + if (!empty($conf->ftp->enabled) && $mainmenu == 'ftp') // Entry for FTP { $MAXFTP=20; $i=1; From a31fec1b0b50ee08d89b3659aaf2f78b5f992249 Mon Sep 17 00:00:00 2001 From: Juanjo Menent Date: Tue, 26 Aug 2014 19:55:35 +0200 Subject: [PATCH 2/6] Fix tab active to real tab active --- htdocs/comm/action/listactions.php | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/htdocs/comm/action/listactions.php b/htdocs/comm/action/listactions.php index 055086bbdbb..ae145d4be21 100644 --- a/htdocs/comm/action/listactions.php +++ b/htdocs/comm/action/listactions.php @@ -197,12 +197,7 @@ if ($resql) $newtitle=$langs->trans($title); - $tabactive=''; - if ($action == 'show_month') $tabactive='cardmonth'; - if ($action == 'show_week') $tabactive='cardweek'; - if ($action == 'show_day') $tabactive='cardday'; - if ($action == 'show_list') $tabactive='cardlist'; - if ($action == 'show_peruser') $tabactive='cardperuser'; + $tabactive='cardlist'; $head = calendars_prepare_head($param); From 4b4360af32ac43e4f2bc7ad8fa829515e9d5e1ec Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 26 Aug 2014 23:02:21 +0200 Subject: [PATCH 3/6] Fix: sql syntax errors --- htdocs/install/mysql/migration/3.6.0-3.7.0.sql | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/htdocs/install/mysql/migration/3.6.0-3.7.0.sql b/htdocs/install/mysql/migration/3.6.0-3.7.0.sql index 868496f3316..ac16eefefa9 100644 --- a/htdocs/install/mysql/migration/3.6.0-3.7.0.sql +++ b/htdocs/install/mysql/migration/3.6.0-3.7.0.sql @@ -975,14 +975,13 @@ CREATE TABLE llx_holiday_types ( ); -- Change on table c_civilite -DROP INDEX uk_c_civilite ON llx_c_civilite; +ALTER TABLE llx_c_civilite DROP INDEX uk_c_civilite; ALTER TABLE llx_c_civilite RENAME TO llx_c_civility; ALTER TABLE llx_c_civility CHANGE civilite label VARCHAR(50); ALTER TABLE llx_c_civility ADD UNIQUE INDEX uk_c_civility(code); ALTER TABLE llx_adherent CHANGE civilite civility VARCHAR(6); ALTER TABLE llx_socpeople CHANGE civilite civility VARCHAR(6); ALTER TABLE llx_user CHANGE civilite civility VARCHAR(6); -) ENGINE=innodb; ALTER TABLE llx_c_type_fees CHANGE libelle label VARCHAR(30); ALTER TABLE llx_c_type_fees ADD COLUMN accountancy_code varchar(32) DEFAULT NULL AFTER label; From c3fe0c1ae9c4c69204503df976a2cf403c5137bd Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 26 Aug 2014 23:08:06 +0200 Subject: [PATCH 4/6] Fix: sql errors into migration scripts --- htdocs/install/mysql/migration/3.6.0-3.7.0.sql | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/install/mysql/migration/3.6.0-3.7.0.sql b/htdocs/install/mysql/migration/3.6.0-3.7.0.sql index ac16eefefa9..cbe07b2fbdf 100644 --- a/htdocs/install/mysql/migration/3.6.0-3.7.0.sql +++ b/htdocs/install/mysql/migration/3.6.0-3.7.0.sql @@ -101,6 +101,7 @@ ALTER TABLE llx_product MODIFY COLUMN fk_barcode_type INTEGER NULL DEFAULT NULL; -- VPGSQL8.2 ALTER TABLE llx_product ALTER COLUMN fk_barcode_type SET DEFAULT NULL; UPDATE llx_product SET fk_barcode_type = NULL WHERE fk_barcode_type = 0; ALTER TABLE llx_product ADD INDEX idx_product_fk_barcode_type (fk_barcode_type); +UPDATE llx_product SET fk_barcode_type = NULL WHERE fk_barcode_type NOT IN (SELECT rowid from llx_c_barcode_type); ALTER TABLE llx_product ADD CONSTRAINT fk_product_barcode_type FOREIGN KEY (fk_barcode_type) REFERENCES llx_c_barcode_type (rowid); From 071c405bad5b7630bcbd463beba78631bfdb743f Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Wed, 27 Aug 2014 10:44:40 +0200 Subject: [PATCH 5/6] Fix: error with php strict mode --- htdocs/core/menus/standard/eldy.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index b1e9ccffd52..5585f2ccc55 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -1217,7 +1217,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu $newmenu = $menuArbo->menuLeftCharger($newmenu,$mainmenu,$leftmenu,(empty($user->societe_id)?0:1),'eldy',$tabMenu); // We update newmenu for special dynamic menus - if ($user->rights->banque->lire && $mainmenu == 'bank') // Entry for each bank account + if (!empty($user->rights->banque->lire) && $mainmenu == 'bank') // Entry for each bank account { $sql = "SELECT rowid, label, courant, rappro, courant"; $sql.= " FROM ".MAIN_DB_PREFIX."bank_account"; From 76cb6f760a93018d8192e038f68f7de04139a676 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Wed, 27 Aug 2014 19:02:13 +0200 Subject: [PATCH 6/6] Fix: strict mode anarchy ;-) check your variable please --- htdocs/core/tpl/document_actions_pre_headers.tpl.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/tpl/document_actions_pre_headers.tpl.php b/htdocs/core/tpl/document_actions_pre_headers.tpl.php index b74c4bedf4d..a4d97e7defb 100644 --- a/htdocs/core/tpl/document_actions_pre_headers.tpl.php +++ b/htdocs/core/tpl/document_actions_pre_headers.tpl.php @@ -79,7 +79,7 @@ if ($action == 'confirm_deletefile' && $confirm == 'yes') setEventMessage($langs->trans("ErrorFailedToDeleteLink", $link->label), 'errors'); } } - header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id.($withproject?'&withproject=1':'')); + header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id.(!empty($withproject)?'&withproject=1':'')); exit; } }